From 1daf84838af60d65e85c186b116a90b8a67cb07f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 7 Nov 2024 09:01:23 +0000 Subject: [PATCH 1/4] feat: add DNS endpoint of Google Kubernetes Engine cluster control plane feat: add more detailed drop causes to corresponding enum docs: update outdated comments PiperOrigin-RevId: 693988820 Source-Link: https://github.com/googleapis/googleapis/commit/10c81bbb557eb47043c3cf637fee2d93bf138f2f Source-Link: https://github.com/googleapis/googleapis-gen/commit/aa18bdb343fd84c47e71596a7daa5ddc018ebf63 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmttYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiJhYTE4YmRiMzQzZmQ4NGM0N2U3MTU5NmE3ZGFhNWRkYzAxOGViZjYzIn0= --- .../v1/.eslintignore | 7 + .../v1/.eslintrc.json | 3 + .../v1/.gitignore | 14 + .../v1/.jsdoc.js | 55 + .../v1/.mocharc.js | 33 + .../v1/.prettierrc.js | 22 + .../v1/README.md | 1 + .../v1/package.json | 58 + .../v1/connectivity_test.proto | 416 + .../networkmanagement/v1/reachability.proto | 309 + .../cloud/networkmanagement/v1/trace.proto | 1865 + .../v1/protos/protos.d.ts | 14640 ++++++ .../v1/protos/protos.js | 40420 +++++++++++++++ .../v1/protos/protos.json | 4271 ++ ...bility_service.create_connectivity_test.js | 79 + ...bility_service.delete_connectivity_test.js | 63 + ...chability_service.get_connectivity_test.js | 62 + ...ability_service.list_connectivity_tests.js | 95 + ...ability_service.rerun_connectivity_test.js | 63 + ...bility_service.update_connectivity_test.js | 68 + ...ata_google.cloud.networkmanagement.v1.json | 283 + .../v1/src/index.ts | 25 + .../v1/src/v1/gapic_metadata.json | 87 + .../v1/src/v1/index.ts | 19 + .../v1/src/v1/reachability_service_client.ts | 1595 + .../reachability_service_client_config.json | 56 + .../v1/reachability_service_proto_list.json | 5 + .../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_reachability_service_v1.ts | 2018 + .../v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + .../v1beta1/.eslintignore | 7 + .../v1beta1/.eslintrc.json | 3 + .../v1beta1/.gitignore | 14 + .../v1beta1/.jsdoc.js | 55 + .../v1beta1/.mocharc.js | 33 + .../v1beta1/.prettierrc.js | 22 + .../v1beta1/README.md | 1 + .../v1beta1/package.json | 59 + .../v1beta1/connectivity_test.proto | 422 + .../v1beta1/reachability.proto | 304 + .../networkmanagement/v1beta1/trace.proto | 1876 + .../v1beta1/vpc_flow_logs.proto | 228 + .../v1beta1/vpc_flow_logs_config.proto | 152 + .../v1beta1/protos/protos.d.ts | 15637 ++++++ .../v1beta1/protos/protos.js | 42968 ++++++++++++++++ .../v1beta1/protos/protos.json | 4682 ++ ...bility_service.create_connectivity_test.js | 79 + ...bility_service.delete_connectivity_test.js | 63 + ...chability_service.get_connectivity_test.js | 62 + ...ability_service.list_connectivity_tests.js | 95 + ...ability_service.rerun_connectivity_test.js | 63 + ...bility_service.update_connectivity_test.js | 68 + ...oogle.cloud.networkmanagement.v1beta1.json | 511 + ...ogs_service.create_vpc_flow_logs_config.js | 73 + ...ogs_service.delete_vpc_flow_logs_config.js | 63 + ...w_logs_service.get_vpc_flow_logs_config.js | 62 + ...logs_service.list_vpc_flow_logs_configs.js | 83 + ...ogs_service.update_vpc_flow_logs_config.js | 68 + .../v1beta1/src/index.ts | 27 + .../v1beta1/src/v1beta1/gapic_metadata.json | 155 + .../v1beta1/src/v1beta1/index.ts | 20 + .../v1beta1/reachability_service_client.ts | 1647 + .../reachability_service_client_config.json | 56 + .../reachability_service_proto_list.json | 7 + .../v1beta1/vpc_flow_logs_service_client.ts | 1523 + .../vpc_flow_logs_service_client_config.json | 46 + .../vpc_flow_logs_service_proto_list.json | 7 + .../system-test/fixtures/sample/src/index.js | 28 + .../system-test/fixtures/sample/src/index.ts | 38 + .../v1beta1/system-test/install.ts | 49 + .../gapic_reachability_service_v1beta1.ts | 2064 + .../gapic_vpc_flow_logs_service_v1beta1.ts | 1948 + .../v1beta1/tsconfig.json | 19 + .../v1beta1/webpack.config.js | 64 + 77 files changed, 142274 insertions(+) create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/README.md create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/package.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js new file mode 100644 index 00000000000..22d92e8132c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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/network-management', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1/README.md new file mode 100644 index 00000000000..90c3778ad46 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/README.md @@ -0,0 +1 @@ +Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1/package.json new file mode 100644 index 00000000000..607215c940a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/network-management", + "version": "0.1.0", + "description": "Networkmanagement client for Node.js", + "repository": "googleapis/nodejs-networkmanagement", + "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 networkmanagement", + "networkmanagement", + "reachability service" + ], + "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-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto new file mode 100644 index 00000000000..0759773e2ab --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -0,0 +1,416 @@ +// 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.networkmanagement.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1/trace.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TestOuterClass"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// A Connectivity Test for a network reachability analysis. +message ConnectivityTest { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + pattern: "projects/{project}/locations/global/connectivityTests/{test}" + }; + + // Identifier. Unique name of the resource using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + string description = 2; + + // Required. Source specification of the Connectivity Test. + // + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify + // the source location. + // + // Examples: + // If the source IP address is an internal IP address within a Google Cloud + // Virtual Private Cloud (VPC) network, then you must also specify the VPC + // network. Otherwise, specify the VM instance, which already contains its + // internal IP address and VPC network information. + // + // If the source of the test is within an on-premises network, then you must + // provide the destination VPC network. + // + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to identify the + // endpoint. So, you must also specify the source IP address or VPC network. + // + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that you don't + // intend to test. + Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination specification of the Connectivity Test. + // + // You can use a combination of destination IP address, Compute Engine + // VM instance, or VPC network to uniquely identify the destination + // location. + // + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either + // a destination IP address or VPC network to identify the destination + // interface. + // + // A reachability analysis proceeds even if the destination location is + // ambiguous. However, the result can include endpoints that you don't + // intend to test. + Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; + + // IP Protocol of the test. When not provided, "TCP" is assumed. + string protocol = 5; + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project boundaries. + repeated string related_projects = 6; + + // Output only. The display name of a Connectivity Test. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user-provided metadata. + map labels = 8; + + // Output only. The time the test was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the test's configuration was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reachability details of this test from the latest run. + // The details are updated when creating a new test, updating an + // existing test, or triggering a one-time rerun of an existing test. + ReachabilityDetails reachability_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The probing details of this test from the latest run, present + // for applicable tests only. The details are updated when creating a new + // test, updating an existing test, or triggering a one-time rerun of an + // existing test. + ProbingDetails probing_details = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the test should skip firewall checking. + // If not provided, we assume false. + bool bypass_firewall_checks = 17; +} + +// Source or destination of the Connectivity Test. +message Endpoint { + // The type definition of an endpoint's network. Use one of the + // following choices: + enum NetworkType { + // Default type if unspecified. + NETWORK_TYPE_UNSPECIFIED = 0; + + // A network hosted within Google Cloud. + // To receive more detailed output, specify the URI for the source or + // destination network. + GCP_NETWORK = 1; + + // A network hosted outside of Google Cloud. + // This can be an on-premises network, or a network hosted by another cloud + // provider. + NON_GCP_NETWORK = 2; + } + + // Type of the target of a forwarding rule. + enum ForwardingRuleTarget { + // Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + + // Compute Engine instance for protocol forwarding. + INSTANCE = 1; + + // Load Balancer. The specific type can be found from [load_balancer_type] + // [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2; + + // Classic Cloud VPN Gateway. + VPN_GATEWAY = 3; + + // Forwarding Rule is a Private Service Connect endpoint. + PSC = 4; + } + + // Wrapper for Cloud Function attributes. + message CloudFunctionEndpoint { + // A [Cloud Function](https://cloud.google.com/functions) name. + string uri = 1; + } + + // Wrapper for the App Engine service version attributes. + message AppEngineVersionEndpoint { + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + // name. + string uri = 1; + } + + // Wrapper for Cloud Run revision attributes. + message CloudRunRevisionEndpoint { + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + // URI. The format is: + // projects/{project}/locations/{location}/revisions/{revision} + string uri = 1; + } + + // The IP address of the endpoint, which can be an external or internal IP. + string ip_address = 1; + + // The IP protocol port of the endpoint. + // Only applicable when protocol is TCP or UDP. + int32 port = 2; + + // A Compute Engine instance URI. + string instance = 3; + + // A forwarding rule and its corresponding IP address represent the frontend + // configuration of a Google Cloud load balancer. Forwarding rules are also + // used for protocol forwarding, Private Service Connect and other network + // services to provide forwarding information in the control plane. Format: + // projects/{project}/global/forwardingRules/{id} or + // projects/{project}/regions/{region}/forwardingRules/{id} + string forwarding_rule = 13; + + // Output only. Specifies the type of the target of the forwarding rule. + optional ForwardingRuleTarget forwarding_rule_target = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the load balancer the forwarding rule points to. Empty + // for forwarding rules not related to load balancers. + optional string load_balancer_id = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the load balancer the forwarding rule points to. + optional LoadBalancerType load_balancer_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A cluster URI for [Google Kubernetes Engine + // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + string gke_master_cluster = 7; + + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. + string cloud_sql_instance = 8; + + // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + // URI. + string redis_instance = 17; + + // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + // URI. + string redis_cluster = 18; + + // A [Cloud Function](https://cloud.google.com/functions). + CloudFunctionEndpoint cloud_function = 10; + + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + AppEngineVersionEndpoint app_engine_version = 11; + + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + CloudRunRevisionEndpoint cloud_run_revision = 12; + + // A Compute Engine network URI. + string network = 4; + + // Type of the network where the endpoint is located. + // Applicable only to source endpoint, as destination network type can be + // inferred from the source. + NetworkType network_type = 5; + + // Project ID where the endpoint is located. + // The Project ID can be derived from the URI if you provide a VM instance or + // network URI. + // The following are two cases where you must provide the project ID: + // 1. Only the IP address is specified, and the IP address is within a Google + // Cloud project. + // 2. When you are using Shared VPC and the IP address that you provide is + // from the service project. In this case, the network that the IP address + // resides in is defined in the host project. + string project_id = 6; +} + +// Results of the configuration analysis from the last run of the test. +message ReachabilityDetails { + // The overall result of the test's configuration analysis. + enum Result { + // No result was specified. + RESULT_UNSPECIFIED = 0; + + // Possible scenarios are: + // + // * The configuration analysis determined that a packet originating from + // the source is expected to reach the destination. + // * The analysis didn't complete because the user lacks permission for + // some of the resources in the trace. However, at the time the user's + // permission became insufficient, the trace had been successful so far. + REACHABLE = 1; + + // A packet originating from the source is expected to be dropped before + // reaching the destination. + UNREACHABLE = 2; + + // The source and destination endpoints do not uniquely identify + // the test location in the network, and the reachability result contains + // multiple traces. For some traces, a packet could be delivered, and for + // others, it would not be. This result is also assigned to + // configuration analysis of return path if on its own it should be + // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. + AMBIGUOUS = 4; + + // The configuration analysis did not complete. Possible reasons are: + // + // * A permissions error occurred--for example, the user might not have + // read permission for all of the resources named in the test. + // * An internal error occurred. + // * The analyzer received an invalid or unsupported argument or was unable + // to identify a known endpoint. + UNDETERMINED = 5; + } + + // The overall result of the test's configuration analysis. + Result result = 1; + + // The time of the configuration analysis. + google.protobuf.Timestamp verify_time = 2; + + // The details of a failure or a cancellation of reachability analysis. + google.rpc.Status error = 3; + + // Result may contain a list of traces if a test has multiple possible + // paths in the network, such as when destination endpoint is a load balancer + // with multiple backends. + repeated Trace traces = 5; +} + +// Latency percentile rank and value. +message LatencyPercentile { + // Percentage of samples this data point applies to. + int32 percent = 1; + + // percent-th percentile of latency observed, in microseconds. + // Fraction of percent/100 of samples have latency lower or + // equal to the value of this field. + int64 latency_micros = 2; +} + +// Describes measured latency distribution. +message LatencyDistribution { + // Representative latency percentiles. + repeated LatencyPercentile latency_percentiles = 1; +} + +// Results of active probing from the last run of the test. +message ProbingDetails { + // Overall probing result of the test. + enum ProbingResult { + // No result was specified. + PROBING_RESULT_UNSPECIFIED = 0; + + // At least 95% of packets reached the destination. + REACHABLE = 1; + + // No packets reached the destination. + UNREACHABLE = 2; + + // Less than 95% of packets reached the destination. + REACHABILITY_INCONSISTENT = 3; + + // Reachability could not be determined. Possible reasons are: + // * The user lacks permission to access some of the network resources + // required to run the test. + // * No valid source endpoint could be derived from the request. + // * An internal error occurred. + UNDETERMINED = 4; + } + + // Abort cause types. + enum ProbingAbortCause { + // No reason was specified. + PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + + // The user lacks permission to access some of the + // network resources required to run the test. + PERMISSION_DENIED = 1; + + // No valid source endpoint could be derived from the request. + NO_SOURCE_LOCATION = 2; + } + + // Representation of a network edge location as per + // https://cloud.google.com/vpc/docs/edge-locations. + message EdgeLocation { + // Name of the metropolitan area. + string metropolitan_area = 1; + } + + // The overall result of active probing. + ProbingResult result = 1; + + // The time that reachability was assessed through active probing. + google.protobuf.Timestamp verify_time = 2; + + // Details about an internal failure or the cancellation of active probing. + google.rpc.Status error = 3; + + // The reason probing was aborted. + ProbingAbortCause abort_cause = 4; + + // Number of probes sent. + int32 sent_probe_count = 5; + + // Number of probes that reached the destination. + int32 successful_probe_count = 6; + + // The source and destination endpoints derived from the test input and used + // for active probing. + EndpointInfo endpoint_info = 7; + + // Latency as measured by active probing in one direction: + // from the source to the destination endpoint. + LatencyDistribution probing_latency = 8; + + // The EdgeLocation from which a packet destined for/originating from the + // internet will egress/ingress the Google network. + // This will only be populated for a connectivity test which has an internet + // destination/source address. + // The absence of this field *must not* be used as an indication that the + // destination/source is part of the Google network. + EdgeLocation destination_egress_location = 9; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto new file mode 100644 index 00000000000..e6ece7d335f --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto @@ -0,0 +1,309 @@ +// 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.networkmanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1/connectivity_test.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "ReachabilityServiceProto"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// The Reachability service in Google Cloud Network Management API + +// The Reachability service in the Google Cloud Network Management API provides +// services that analyze the reachability within a single Google Virtual Private +// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises +// networks, or between VPC networks and internet hosts. A reachability analysis +// is based on Google Cloud network configurations. +// +// You can use the analysis results to verify these configurations and +// to troubleshoot connectivity issues. +service ReachabilityService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Connectivity Tests owned by a project. + rpc ListConnectivityTests(ListConnectivityTestsRequest) + returns (ListConnectivityTestsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/global}/connectivityTests" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific Connectivity Test. + rpc GetConnectivityTest(GetConnectivityTestRequest) + returns (ConnectivityTest) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Connectivity Test. + // After you create a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, containing non-existent resources in the network, or you + // don't have read permissions to the network configurations of listed + // projects), then the reachability result returns a value of `UNKNOWN`. + // + // If the endpoint specifications in `ConnectivityTest` are + // incomplete, the reachability result returns a value of + // AMBIGUOUS. For more information, + // see the Connectivity Test documentation. + rpc CreateConnectivityTest(CreateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/global}/connectivityTests" + body: "resource" + }; + option (google.api.method_signature) = "parent,test_id,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configuration of an existing `ConnectivityTest`. + // After you update a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // The Reachability state in the test resource is updated with the new result. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, they contain non-existent resources in the network, or the + // user does not have read permissions to the network configurations of + // listed projects), then the reachability result returns a value of + // UNKNOWN. + // + // If the endpoint specifications in `ConnectivityTest` are incomplete, the + // reachability result returns a value of `AMBIGUOUS`. See the documentation + // in `ConnectivityTest` for more details. + rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}" + body: "resource" + }; + option (google.api.method_signature) = "update_mask,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Rerun an existing `ConnectivityTest`. + // After the user triggers the rerun, the reachability analysis is performed + // as part of the long running operation, which completes when the analysis + // completes. + // + // Even though the test configuration remains the same, the reachability + // result may change due to underlying network configuration changes. + // + // If the endpoint specifications in `ConnectivityTest` become invalid (for + // example, specified resources are deleted in the network, or you lost + // read permissions to the network configurations of listed projects), then + // the reachability result returns a value of `UNKNOWN`. + rpc RerunConnectivityTest(RerunConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a specific `ConnectivityTest`. + rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListConnectivityTests` method. +message ListConnectivityTestsRequest { + // Required. The parent resource of the Connectivity Tests: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Number of `ConnectivityTests` to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; + + // Lists the `ConnectivityTests` that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form ` ` where operators: `<`, `>`, + // `<=`, + // `>=`, + // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + // roughly synonymous with equality). can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/proj-1/locations/global/connectivityTests/test-1 + // + // - Filter by labels: + // - Resources that have a key called `foo` + // labels.foo:* + // - Resources that have a key called `foo` whose value is `bar` + // labels.foo = bar + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// Response for the `ListConnectivityTests` method. +message ListConnectivityTestsResponse { + // List of Connectivity Tests. + repeated ConnectivityTest resources = 1; + + // Page token to fetch the next set of Connectivity Tests. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetConnectivityTest` method. +message GetConnectivityTestRequest { + // Required. `ConnectivityTest` resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `CreateConnectivityTest` method. +message CreateConnectivityTestRequest { + // Required. The parent resource of the Connectivity Test to create: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The logical name of the Connectivity Test in your project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project + string test_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A `ConnectivityTest` resource + ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateConnectivityTest` method. +message UpdateConnectivityTestRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteConnectivityTest` method. +message DeleteConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `RerunConnectivityTest` method. +message RerunConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/locations/global/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto new file mode 100644 index 00000000000..0a39fc3ffa5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto @@ -0,0 +1,1865 @@ +// 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.networkmanagement.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// Trace represents one simulated packet forwarding path. +// +// * Each trace contains multiple ordered steps. +// * Each step is in a particular state with associated configuration. +// * State is categorized as final or non-final states. +// * Each final state has a reason associated. +// * Each trace must end with a final state (the last step). +// ``` +// |---------------------Trace----------------------| +// Step1(State) Step2(State) --- StepN(State(final)) +// ``` +message Trace { + // Derived from the source and destination endpoints definition specified by + // user request, and validated by the data plane model. + // If there are multiple traces starting from different source locations, then + // the endpoint_info may be different between traces. + EndpointInfo endpoint_info = 1; + + // A trace of a test contains multiple steps from the initial state to the + // final state (delivered, dropped, forwarded, or aborted). + // + // The steps are ordered by the processing sequence within the simulated + // network state machine. It is critical to preserve the order of the steps + // and avoid reordering or sorting them. + repeated Step steps = 2; + + // ID of trace. For forward traces, this ID is unique for each trace. For + // return traces, it matches ID of associated forward trace. A single forward + // trace can be associated with none, one or more than one return trace. + int32 forward_trace_id = 4; +} + +// A simulated forwarding path is composed of multiple steps. +// Each step has a well-defined state and an associated configuration. +message Step { + // Type of states that are defined in the network state machine. + // Each step in the packet trace is in a specific state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Initial state: packet originating from a Compute Engine instance. + // An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1; + + // Initial state: packet originating from the internet. + // The endpoint information is populated. + START_FROM_INTERNET = 2; + + // Initial state: packet originating from a Google service. + // The google_service information is populated. + START_FROM_GOOGLE_SERVICE = 27; + + // Initial state: packet originating from a VPC or on-premises network + // with internal source IP. + // If the source is a VPC network visible to the user, a NetworkInfo + // is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3; + + // Initial state: packet originating from a Google Kubernetes Engine cluster + // master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21; + + // Initial state: packet originating from a Cloud SQL instance. + // A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22; + + // Initial state: packet originating from a Redis instance. + // A RedisInstanceInfo is populated with starting instance information. + START_FROM_REDIS_INSTANCE = 32; + + // Initial state: packet originating from a Redis Cluster. + // A RedisClusterInfo is populated with starting Cluster information. + START_FROM_REDIS_CLUSTER = 33; + + // Initial state: packet originating from a Cloud Function. + // A CloudFunctionInfo is populated with starting function information. + START_FROM_CLOUD_FUNCTION = 23; + + // Initial state: packet originating from an App Engine service version. + // An AppEngineVersionInfo is populated with starting version information. + START_FROM_APP_ENGINE_VERSION = 25; + + // Initial state: packet originating from a Cloud Run revision. + // A CloudRunRevisionInfo is populated with starting revision information. + START_FROM_CLOUD_RUN_REVISION = 26; + + // Initial state: packet originating from a Storage Bucket. Used only for + // return traces. + // The storage_bucket information is populated. + START_FROM_STORAGE_BUCKET = 29; + + // Initial state: packet originating from a published service that uses + // Private Service Connect. Used only for return traces. + START_FROM_PSC_PUBLISHED_SERVICE = 30; + + // Initial state: packet originating from a serverless network endpoint + // group backend. Used only for return traces. + // The serverless_neg information is populated. + START_FROM_SERVERLESS_NEG = 31; + + // Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4; + + // Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5; + + // Config checking state: verify route. + APPLY_ROUTE = 6; + + // Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7; + + // Config checking state: verify load balancer backend configuration. + ANALYZE_LOAD_BALANCER_BACKEND = 28; + + // Config checking state: packet sent or received under foreign IP + // address and allowed. + SPOOFING_APPROVED = 8; + + // Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9; + + // Forwarding state: arriving at a Compute Engine internal load balancer. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; + + // Forwarding state: arriving at a Compute Engine external load balancer. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; + + // Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12; + + // Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13; + + // Forwarding state: arriving at a VPC connector. + ARRIVE_AT_VPC_CONNECTOR = 24; + + // Transition state: packet header translated. + NAT = 14; + + // Transition state: original connection is terminated and a new proxied + // connection is initiated. + PROXY_CONNECTION = 15; + + // Final state: packet could be delivered. + DELIVER = 16; + + // Final state: packet could be dropped. + DROP = 17; + + // Final state: packet could be forwarded to a network with an unknown + // configuration. + FORWARD = 18; + + // Final state: analysis is aborted. + ABORT = 19; + + // Special state: viewer of the test result does not have permission to + // see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20; + } + + // A description of the step. Usually this is a summary of the state. + string description = 1; + + // Each step is in one of the pre-defined states. + State state = 2; + + // This is a step that leads to the final state Drop. + bool causes_drop = 3; + + // Project ID that contains the configuration this step is validating. + string project_id = 4; + + // Configuration or metadata associated with each step. + // The configuration is filtered based on viewer's permission. If a viewer + // has no permission to view the configuration in this step, for non-final + // states a special state is populated (VIEWER_PERMISSION_MISSING), and for + // final state the configuration is cleared. + oneof step_info { + // Display information of a Compute Engine instance. + InstanceInfo instance = 5; + + // Display information of a Compute Engine firewall rule. + FirewallInfo firewall = 6; + + // Display information of a Compute Engine route. + RouteInfo route = 7; + + // Display information of the source and destination under analysis. + // The endpoint information in an intermediate state may differ with the + // initial input, as it might be modified by state like NAT, + // or Connection Proxy. + EndpointInfo endpoint = 8; + + // Display information of a Google service + GoogleServiceInfo google_service = 24; + + // Display information of a Compute Engine forwarding rule. + ForwardingRuleInfo forwarding_rule = 9; + + // Display information of a Compute Engine VPN gateway. + VpnGatewayInfo vpn_gateway = 10; + + // Display information of a Compute Engine VPN tunnel. + VpnTunnelInfo vpn_tunnel = 11; + + // Display information of a VPC connector. + VpcConnectorInfo vpc_connector = 21; + + // Display information of the final state "deliver" and reason. + DeliverInfo deliver = 12; + + // Display information of the final state "forward" and reason. + ForwardInfo forward = 13; + + // Display information of the final state "abort" and reason. + AbortInfo abort = 14; + + // Display information of the final state "drop" and reason. + DropInfo drop = 15; + + // Display information of the load balancers. Deprecated in favor of the + // `load_balancer_backend_info` field, not used in new tests. + LoadBalancerInfo load_balancer = 16 [deprecated = true]; + + // Display information of a Google Cloud network. + NetworkInfo network = 17; + + // Display information of a Google Kubernetes Engine cluster master. + GKEMasterInfo gke_master = 18; + + // Display information of a Cloud SQL instance. + CloudSQLInstanceInfo cloud_sql_instance = 19; + + // Display information of a Redis Instance. + RedisInstanceInfo redis_instance = 30; + + // Display information of a Redis Cluster. + RedisClusterInfo redis_cluster = 31; + + // Display information of a Cloud Function. + CloudFunctionInfo cloud_function = 20; + + // Display information of an App Engine service version. + AppEngineVersionInfo app_engine_version = 22; + + // Display information of a Cloud Run revision. + CloudRunRevisionInfo cloud_run_revision = 23; + + // Display information of a NAT. + NatInfo nat = 25; + + // Display information of a ProxyConnection. + ProxyConnectionInfo proxy_connection = 26; + + // Display information of a specific load balancer backend. + LoadBalancerBackendInfo load_balancer_backend_info = 27; + + // Display information of a Storage Bucket. Used only for return traces. + StorageBucketInfo storage_bucket = 28; + + // Display information of a Serverless network endpoint group backend. Used + // only for return traces. + ServerlessNegInfo serverless_neg = 29; + } +} + +// For display only. Metadata associated with a Compute Engine instance. +message InstanceInfo { + // Name of a Compute Engine instance. + string display_name = 1; + + // URI of a Compute Engine instance. + string uri = 2; + + // Name of the network interface of a Compute Engine instance. + string interface = 3; + + // URI of a Compute Engine network. + string network_uri = 4; + + // Internal IP address of the network interface. + string internal_ip = 5; + + // External IP address of the network interface. + string external_ip = 6; + + // Network tags configured on the instance. + repeated string network_tags = 7; + + // Service account authorized for the instance. + string service_account = 8 [deprecated = true]; + + // URI of the PSC network attachment the NIC is attached to (if relevant). + string psc_network_attachment_uri = 9; +} + +// For display only. Metadata associated with a Compute Engine network. +// Next ID: 7 +message NetworkInfo { + // Name of a Compute Engine network. + string display_name = 1; + + // URI of a Compute Engine network. + string uri = 2; + + // URI of the subnet matching the source IP address of the test. + string matched_subnet_uri = 5; + + // The IP range of the subnet matching the source IP address of the test. + string matched_ip_range = 4; + + // The region of the subnet matching the source IP address of the test. + string region = 6; +} + +// For display only. Metadata associated with a VPC firewall rule, an implied +// VPC firewall rule, or a firewall policy rule. +message FirewallInfo { + // The firewall rule's type. + enum FirewallRuleType { + // Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + + // Hierarchical firewall policy rule. For details, see + // [Hierarchical firewall policies + // overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + + // VPC firewall rule. For details, see + // [VPC firewall rules + // overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2; + + // Implied VPC firewall rule. For details, see + // [Implied + // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3; + + // Implicit firewall rules that are managed by serverless VPC access to + // allow ingress access. They are not visible in the Google Cloud console. + // For details, see [VPC connector's implicit + // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + + // Global network firewall policy rule. + // For details, see [Network firewall + // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). + NETWORK_FIREWALL_POLICY_RULE = 5; + + // Regional network firewall policy rule. + // For details, see [Regional network firewall + // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + + // Firewall policy rule containing attributes not yet supported in + // Connectivity tests. Firewall analysis is skipped if such a rule can + // potentially be matched. Please see the [list of unsupported + // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + + // Tracking state for response traffic created when request traffic goes + // through allow firewall rule. + // For details, see [firewall rules + // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + TRACKING_STATE = 101; + } + + // The display name of the firewall rule. This field might be empty for + // firewall policy rules. + string display_name = 1; + + // The URI of the firewall rule. This field is not applicable to implied + // VPC firewall rules. + string uri = 2; + + // Possible values: INGRESS, EGRESS + string direction = 3; + + // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + string action = 4; + + // The priority of the firewall rule. + int32 priority = 5; + + // The URI of the VPC network that the firewall rule is associated with. + // This field is not applicable to hierarchical firewall policy rules. + string network_uri = 6; + + // The target tags defined by the VPC firewall rule. This field is not + // applicable to firewall policy rules. + repeated string target_tags = 7; + + // The target service accounts specified by the firewall rule. + repeated string target_service_accounts = 8; + + // The name of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy = 9; + + // The URI of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy_uri = 11; + + // The firewall rule's type. + FirewallRuleType firewall_rule_type = 10; +} + +// For display only. Metadata associated with a Compute Engine route. +message RouteInfo { + // Type of route: + enum RouteType { + // Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0; + + // Route is a subnet route automatically created by the system. + SUBNET = 1; + + // Static route created by the user, including the default route to the + // internet. + STATIC = 2; + + // Dynamic route exchanged between BGP peers. + DYNAMIC = 3; + + // A subnet route received from peering network. + PEERING_SUBNET = 4; + + // A static route received from peering network. + PEERING_STATIC = 5; + + // A dynamic route received from peering network. + PEERING_DYNAMIC = 6; + + // Policy based route. + POLICY_BASED = 7; + + // Advertised route. Synthetic route which is used to transition from the + // StartFromPrivateNetwork state in Connectivity tests. + ADVERTISED = 101; + } + + // Type of next hop: + enum NextHopType { + // Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0; + + // Next hop is an IP address. + NEXT_HOP_IP = 1; + + // Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2; + + // Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3; + + // Next hop is a peering VPC. + NEXT_HOP_PEERING = 4; + + // Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5; + + // Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6; + + // Next hop is a VPN gateway. This scenario only happens when tracing + // connectivity from an on-premises network to Google Cloud through a VPN. + // The analysis simulates a packet departing from the on-premises network + // through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7; + + // Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8; + + // Next hop is blackhole; that is, the next hop either does not exist or is + // not running. + NEXT_HOP_BLACKHOLE = 9; + + // Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10; + + // Next hop is a + // [router appliance + // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). + NEXT_HOP_ROUTER_APPLIANCE = 11; + + // Next hop is an NCC hub. + NEXT_HOP_NCC_HUB = 12; + } + + // Indicates where routes are applicable. + enum RouteScope { + // Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0; + + // Route is applicable to packets in Network. + NETWORK = 1; + + // Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2; + } + + // Type of route. + RouteType route_type = 8; + + // Type of next hop. + NextHopType next_hop_type = 9; + + // Indicates where route is applicable. + RouteScope route_scope = 14; + + // Name of a route. + string display_name = 1; + + // URI of a route (if applicable). + string uri = 2; + + // Region of the route (if applicable). + string region = 19; + + // Destination IP range of the route. + string dest_ip_range = 3; + + // Next hop of the route. + string next_hop = 4; + + // URI of a Compute Engine network. NETWORK routes only. + string network_uri = 5; + + // Priority of the route. + int32 priority = 6; + + // Instance tags of the route. + repeated string instance_tags = 7; + + // Source IP address range of the route. Policy based routes only. + string src_ip_range = 10; + + // Destination port ranges of the route. Policy based routes only. + repeated string dest_port_ranges = 11; + + // Source port ranges of the route. Policy based routes only. + repeated string src_port_ranges = 12; + + // Protocols of the route. Policy based routes only. + repeated string protocols = 13; + + // URI of a NCC Hub. NCC_HUB routes only. + optional string ncc_hub_uri = 15; + + // URI of a NCC Spoke. NCC_HUB routes only. + optional string ncc_spoke_uri = 16; + + // For advertised dynamic routes, the URI of the Cloud Router that advertised + // the corresponding IP prefix. + optional string advertised_route_source_router_uri = 17; + + // For advertised routes, the URI of their next hop, i.e. the URI of the + // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + // the advertised prefix is advertised through, or URI of the source peered + // network. + optional string advertised_route_next_hop_uri = 18; +} + +// For display only. Details of a Google Service sending packets to a +// VPC network. Although the source IP might be a publicly routable address, +// some Google Services use special routes within Google production +// infrastructure to reach Compute Engine Instances. +// https://cloud.google.com/vpc/docs/routes#special_return_paths +message GoogleServiceInfo { + // Recognized type of a Google Service. + enum GoogleServiceType { + // Unspecified Google Service. + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + + // Identity aware proxy. + // https://cloud.google.com/iap/docs/using-tcp-forwarding + IAP = 1; + + // One of two services sharing IP ranges: + // * Load Balancer proxy + // * Centralized Health Check prober + // https://cloud.google.com/load-balancing/docs/firewall-rules + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + + // Connectivity from Cloud DNS to forwarding targets or alternate name + // servers that use private routing. + // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + // https://cloud.google.com/dns/docs/policies#firewall-rules + CLOUD_DNS = 3; + + // private.googleapis.com and restricted.googleapis.com + GOOGLE_API = 4; + + // Google API via Private Service Connect. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_PSC = 5; + + // Google API via VPC Service Controls. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_VPC_SC = 6; + } + + // Source IP address. + string source_ip = 1; + + // Recognized type of a Google Service. + GoogleServiceType google_service_type = 2; +} + +// For display only. Metadata associated with a Compute Engine forwarding rule. +message ForwardingRuleInfo { + // Name of the forwarding rule. + string display_name = 1; + + // URI of the forwarding rule. + string uri = 2; + + // Protocol defined in the forwarding rule that matches the packet. + string matched_protocol = 3; + + // Port range defined in the forwarding rule that matches the packet. + string matched_port_range = 6; + + // VIP of the forwarding rule. + string vip = 4; + + // Target type of the forwarding rule. + string target = 5; + + // Network URI. + string network_uri = 7; + + // Region of the forwarding rule. Set only for regional forwarding rules. + string region = 8; + + // Name of the load balancer the forwarding rule belongs to. Empty for + // forwarding rules not related to load balancers (like PSC forwarding rules). + string load_balancer_name = 9; + + // URI of the PSC service attachment this forwarding rule targets (if + // applicable). + string psc_service_attachment_uri = 10; + + // PSC Google API target this forwarding rule targets (if applicable). + string psc_google_api_target = 11; +} + +// For display only. Metadata associated with a load balancer. +message LoadBalancerInfo { + // The type definition for a load balancer: + enum LoadBalancerType { + // Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1; + + // Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2; + + // HTTP(S) proxy load balancer. + HTTP_PROXY = 3; + + // TCP proxy load balancer. + TCP_PROXY = 4; + + // SSL proxy load balancer. + SSL_PROXY = 5; + } + + // The type definition for a load balancer backend configuration: + enum BackendType { + // Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0; + + // Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1; + + // Target Pool as the load balancer's backend. + TARGET_POOL = 2; + + // Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3; + } + + // Type of the load balancer. + LoadBalancerType load_balancer_type = 1; + + // URI of the health check for the load balancer. Deprecated and no longer + // populated as different load balancer backends might have different health + // checks. + string health_check_uri = 2 [deprecated = true]; + + // Information for the loadbalancer backends. + repeated LoadBalancerBackend backends = 3; + + // Type of load balancer's backend configuration. + BackendType backend_type = 4; + + // Backend configuration URI. + string backend_uri = 5; +} + +// For display only. Metadata associated with a specific load balancer backend. +message LoadBalancerBackend { + // State of a health check firewall configuration: + enum HealthCheckFirewallState { + // State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + + // There are configured firewall rules to allow health check probes to the + // backend. + CONFIGURED = 1; + + // There are firewall rules configured to allow partial health check ranges + // or block all health check ranges. + // If a health check probe is sent from denied IP ranges, + // the health check to the backend will fail. Then, the backend will be + // marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2; + } + + // Name of a Compute Engine instance or network endpoint. + string display_name = 1; + + // URI of a Compute Engine instance or network endpoint. + string uri = 2; + + // State of the health check firewall configuration. + HealthCheckFirewallState health_check_firewall_state = 3; + + // A list of firewall rule URIs allowing probes from health check IP ranges. + repeated string health_check_allowing_firewall_rules = 4; + + // A list of firewall rule URIs blocking probes from health check IP ranges. + repeated string health_check_blocking_firewall_rules = 5; +} + +// For display only. Metadata associated with a Compute Engine VPN gateway. +message VpnGatewayInfo { + // Name of a VPN gateway. + string display_name = 1; + + // URI of a VPN gateway. + string uri = 2; + + // URI of a Compute Engine network where the VPN gateway is configured. + string network_uri = 3; + + // IP address of the VPN gateway. + string ip_address = 4; + + // A VPN tunnel that is associated with this VPN gateway. + // There may be multiple VPN tunnels configured on a VPN gateway, and only + // the one relevant to the test is displayed. + string vpn_tunnel_uri = 5; + + // Name of a Google Cloud region where this VPN gateway is configured. + string region = 6; +} + +// For display only. Metadata associated with a Compute Engine VPN tunnel. +message VpnTunnelInfo { + // Types of VPN routing policy. For details, refer to [Networks and Tunnel + // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + enum RoutingType { + // Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0; + + // Route based VPN. + ROUTE_BASED = 1; + + // Policy based routing. + POLICY_BASED = 2; + + // Dynamic (BGP) routing. + DYNAMIC = 3; + } + + // Name of a VPN tunnel. + string display_name = 1; + + // URI of a VPN tunnel. + string uri = 2; + + // URI of the VPN gateway at local end of the tunnel. + string source_gateway = 3; + + // URI of a VPN gateway at remote end of the tunnel. + string remote_gateway = 4; + + // Remote VPN gateway's IP address. + string remote_gateway_ip = 5; + + // Local VPN gateway's IP address. + string source_gateway_ip = 6; + + // URI of a Compute Engine network where the VPN tunnel is configured. + string network_uri = 7; + + // Name of a Google Cloud region where this VPN tunnel is configured. + string region = 8; + + // Type of the routing policy. + RoutingType routing_type = 9; +} + +// For display only. The specification of the endpoints for the test. +// EndpointInfo is derived from source and destination Endpoint and validated +// by the backend data plane model. +message EndpointInfo { + // Source IP address. + string source_ip = 1; + + // Destination IP address. + string destination_ip = 2; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 3; + + // Source port. Only valid when protocol is TCP or UDP. + int32 source_port = 4; + + // Destination port. Only valid when protocol is TCP or UDP. + int32 destination_port = 5; + + // URI of the network where this packet originates from. + string source_network_uri = 6; + + // URI of the network where this packet is sent to. + string destination_network_uri = 7; + + // URI of the source telemetry agent this packet originates from. + string source_agent_uri = 8; +} + +// Details of the final state "deliver" and associated resource. +message DeliverInfo { + // Deliver target types: + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Target is a Compute Engine instance. + INSTANCE = 1; + + // Target is the internet. + INTERNET = 2; + + // Target is a Google API. + GOOGLE_API = 3; + + // Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4; + + // Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5; + + // Target is a published service that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + PSC_PUBLISHED_SERVICE = 6; + + // Target is Google APIs that use [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_GOOGLE_API = 7; + + // Target is a VPC-SC that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_VPC_SC = 8; + + // Target is a serverless network endpoint group. + SERVERLESS_NEG = 9; + + // Target is a Cloud Storage bucket. + STORAGE_BUCKET = 10; + + // Target is a private network. Used only for return traces. + PRIVATE_NETWORK = 11; + + // Target is a Cloud Function. Used only for return traces. + CLOUD_FUNCTION = 12; + + // Target is a App Engine service version. Used only for return traces. + APP_ENGINE_VERSION = 13; + + // Target is a Cloud Run revision. Used only for return traces. + CLOUD_RUN_REVISION = 14; + + // Target is a Google-managed service. Used only for return traces. + GOOGLE_MANAGED_SERVICE = 15; + + // Target is a Redis Instance. + REDIS_INSTANCE = 16; + + // Target is a Redis Cluster. + REDIS_CLUSTER = 17; + } + + // Target type where the packet is delivered to. + Target target = 1; + + // URI of the resource that the packet is delivered to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the Cloud Storage Bucket the packet is delivered to (if + // applicable). + string storage_bucket = 4; + + // PSC Google API target the packet is delivered to (if applicable). + string psc_google_api_target = 5; +} + +// Details of the final state "forward" and associated resource. +message ForwardInfo { + // Forward target types. + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Forwarded to a VPC peering network. + PEERING_VPC = 1; + + // Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2; + + // Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3; + + // Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4 [deprecated = true]; + + // Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + + // Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6 [deprecated = true]; + + // Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7; + + // Forwarded to an NCC Hub. + NCC_HUB = 8; + + // Forwarded to a router appliance. + ROUTER_APPLIANCE = 9; + } + + // Target type where this packet is forwarded to. + Target target = 1; + + // URI of the resource that the packet is forwarded to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; +} + +// Details of the final state "abort" and associated resource. +message AbortInfo { + // Abort cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Aborted due to unknown network. Deprecated, not used in the new tests. + UNKNOWN_NETWORK = 1 [deprecated = true]; + + // Aborted because no project information can be derived from the test + // input. Deprecated, not used in the new tests. + UNKNOWN_PROJECT = 3 [deprecated = true]; + + // Aborted because traffic is sent from a public IP to an instance without + // an external IP. Deprecated, not used in the new tests. + NO_EXTERNAL_IP = 7 [deprecated = true]; + + // Aborted because none of the traces matches destination information + // specified in the input test request. Deprecated, not used in the new + // tests. + UNINTENDED_DESTINATION = 8 [deprecated = true]; + + // Aborted because the source endpoint could not be found. Deprecated, not + // used in the new tests. + SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; + + // Aborted because the source network does not match the source endpoint. + // Deprecated, not used in the new tests. + MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; + + // Aborted because the destination endpoint could not be found. Deprecated, + // not used in the new tests. + DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; + + // Aborted because the destination network does not match the destination + // endpoint. Deprecated, not used in the new tests. + MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; + + // Aborted because no endpoint with the packet's destination IP address is + // found. + UNKNOWN_IP = 2; + + // Aborted because no endpoint with the packet's destination IP is found in + // the Google-managed project. + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; + + // Aborted because the source IP address doesn't belong to any of the + // subnets of the source VPC network. + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; + + // Aborted because user lacks permission to access all or part of the + // network configurations required to run the test. + PERMISSION_DENIED = 4; + + // Aborted because user lacks permission to access Cloud NAT configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; + + // Aborted because user lacks permission to access Network endpoint group + // endpoint configs required to run the test. + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; + + // Aborted because user lacks permission to access Cloud Router configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; + + // Aborted because no valid source or destination endpoint is derived from + // the input test request. + NO_SOURCE_LOCATION = 5; + + // Aborted because the source or destination endpoint specified in + // the request is invalid. Some examples: + // - The request might contain malformed resource URI, project ID, or IP + // address. + // - The request might contain inconsistent information (for example, the + // request might include both the instance and the network, but the instance + // might not have a NIC in that network). + INVALID_ARGUMENT = 6; + + // Aborted because the number of steps in the trace exceeds a certain + // limit. It might be caused by a routing loop. + TRACE_TOO_LONG = 9; + + // Aborted due to internal server error. + INTERNAL_ERROR = 10; + + // Aborted because the test scenario is not supported. + UNSUPPORTED = 15; + + // Aborted because the source and destination resources have no common IP + // version. + MISMATCHED_IP_VERSION = 16; + + // Aborted because the connection between the control plane and the node of + // the source cluster is initiated by the node and managed by the + // Konnectivity proxy. + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + + // Aborted because expected resource configuration was missing. + RESOURCE_CONFIG_NOT_FOUND = 18; + + // Aborted because expected VM instance configuration was missing. + VM_INSTANCE_CONFIG_NOT_FOUND = 24; + + // Aborted because expected network configuration was missing. + NETWORK_CONFIG_NOT_FOUND = 25; + + // Aborted because expected firewall configuration was missing. + FIREWALL_CONFIG_NOT_FOUND = 26; + + // Aborted because expected route configuration was missing. + ROUTE_CONFIG_NOT_FOUND = 27; + + // Aborted because a PSC endpoint selection for the Google-managed service + // is ambiguous (several PSC endpoints satisfy test input). + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; + + // Aborted because tests with a PSC-based Cloud SQL instance as a source are + // not supported. + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; + + // Aborted because tests with a Redis Cluster as a source are not supported. + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; + + // Aborted because tests with a Redis Instance as a source are not + // supported. + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; + + // Aborted because tests with a forwarding rule as a source are not + // supported. + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + + // Aborted because one of the endpoints is a non-routable IP address + // (loopback, link-local, etc). + NON_ROUTABLE_IP_ADDRESS = 22; + + // Aborted due to an unknown issue in the Google-managed project. + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + + // Aborted due to an unsupported configuration of the Google-managed + // project. + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + } + + // Causes that the analysis is aborted. + Cause cause = 1; + + // URI of the resource that caused the abort. + string resource_uri = 2; + + // IP address that caused the abort. + string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // List of project IDs the user specified in the request but lacks access to. + // In this case, analysis is aborted with the PERMISSION_DENIED cause. + repeated string projects_missing_permission = 3; +} + +// Details of the final state "drop" and associated resource. +message DropInfo { + // Drop cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Destination external address cannot be resolved to a known target. If + // the address is used in a Google Cloud project, provide the project ID + // as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1; + + // A Compute Engine instance can only send or receive a packet with a + // foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2; + + // Dropped due to a firewall rule, unless allowed due to connection + // tracking. + FIREWALL_RULE = 3; + + // Dropped due to no matching routes. + NO_ROUTE = 4; + + // Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5; + + // Packet is sent to a wrong (unintended) network. Example: you trace a + // packet from VM1:Network1 to VM2:Network2, however, the route configured + // in Network1 sends the packet destined for VM2's IP address to Network3. + ROUTE_WRONG_NETWORK = 6; + + // Route's next hop IP address cannot be resolved to a GCP resource. + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + + // Route's next hop resource is not found. + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + + // Route's next hop instance doesn't have a NIC in the route's network. + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + + // Route's next hop IP address is not a primary IP address of the next hop + // instance. + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + + // Route's next hop forwarding rule doesn't match next hop IP address. + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + + // Route's next hop VPN tunnel is down (does not have valid IKE SAs). + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + + // Route's next hop forwarding rule type is invalid (it's not a forwarding + // rule of the internal passthrough load balancer). + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + + // Packet is sent from the Internet to the private IPv6 address. + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + + // The packet does not match a policy-based VPN tunnel local selector. + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + + // The packet does not match a policy-based VPN tunnel remote selector. + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + + // Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7; + + // Instance with only an internal IP address tries to access Google API and + // services, but private Google access is not enabled in the subnet. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + + // Source endpoint tries to access Google API and services through the VPN + // tunnel to another network, but Private Google Access needs to be enabled + // in the source endpoint network. + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + + // Instance with only an internal IP address tries to access external hosts, + // but Cloud NAT is not enabled in the subnet, unless special configurations + // on a VM allow this connection. + NO_EXTERNAL_ADDRESS = 9; + + // Destination internal address cannot be resolved to a known target. If + // this is a shared VPC scenario, verify if the service project ID is + // provided as test input. Otherwise, verify if the IP address is being + // used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10; + + // Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11; + + // Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12; + + // Firewalls block the health check probes to the backends and cause + // the backends to be unavailable for traffic from the load balancer. + // For more details, see [Health check firewall + // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + + // Packet is sent from or to a Compute Engine instance that is not in a + // running state. + INSTANCE_NOT_RUNNING = 14; + + // Packet sent from or to a GKE cluster that is not in running state. + GKE_CLUSTER_NOT_RUNNING = 27; + + // Packet sent from or to a Cloud SQL instance that is not in running state. + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + + // Packet sent from or to a Redis Instance that is not in running state. + REDIS_INSTANCE_NOT_RUNNING = 68; + + // Packet sent from or to a Redis Cluster that is not in running state. + REDIS_CLUSTER_NOT_RUNNING = 69; + + // The type of traffic is blocked and the user cannot configure a firewall + // rule to enable it. See [Always blocked + // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + // more details. + TRAFFIC_TYPE_BLOCKED = 15; + + // Access to Google Kubernetes Engine cluster master's endpoint is not + // authorized. See [Access to the cluster + // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + // for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + + // Access to the Cloud SQL instance endpoint is not authorized. + // See [Authorizing with authorized + // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + // more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + + // Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18; + + // Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + + // Packet was dropped because there is no peering between the originating + // network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + + // Packet was dropped because the Google-managed service uses Private + // Service Connect (PSC), but the PSC endpoint is not found in the project. + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + + // Packet was dropped because the GKE cluster uses Private Service Connect + // (PSC), but the PSC endpoint is not found in the project. + GKE_PSC_ENDPOINT_MISSING = 36; + + // Packet was dropped because the Cloud SQL instance has neither a private + // nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + + // Packet was dropped because a GKE cluster private endpoint is + // unreachable from a region different from the cluster's region. + GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + + // Packet sent from a public GKE cluster control plane to a private + // IP address. + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + + // Packet was dropped because there is no route from a GKE cluster + // control plane to a destination network. + GKE_CONTROL_PLANE_NO_ROUTE = 32; + + // Packet sent from a Cloud SQL instance to an external IP address is not + // allowed. The Cloud SQL instance is not configured to send packets to + // external IP addresses. + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + + // Packet sent from a Cloud SQL instance with only a public IP address to a + // private IP address. + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + + // Packet was dropped because there is no route from a Cloud SQL + // instance to a destination network. + CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + + // Packet was dropped because the Cloud SQL instance requires all + // connections to use Cloud SQL connectors and to target the Cloud SQL proxy + // port (3307). + CLOUD_SQL_CONNECTOR_REQUIRED = 63; + + // Packet could be dropped because the Cloud Function is not in an active + // status. + CLOUD_FUNCTION_NOT_ACTIVE = 22; + + // Packet could be dropped because no VPC connector is set. + VPC_CONNECTOR_NOT_SET = 23; + + // Packet could be dropped because the VPC connector is not in a running + // state. + VPC_CONNECTOR_NOT_RUNNING = 24; + + // Packet could be dropped because the traffic from the serverless service + // to the VPC connector is not allowed. + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; + + // Packet could be dropped because the health check traffic to the VPC + // connector is not allowed. + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; + + // Packet could be dropped because it was sent from a different region + // to a regional forwarding without global access. + FORWARDING_RULE_REGION_MISMATCH = 25; + + // The Private Service Connect endpoint is in a project that is not approved + // to connect to the service. + PSC_CONNECTION_NOT_ACCEPTED = 26; + + // The packet is sent to the Private Service Connect endpoint over the + // peering, but [it's not + // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule does not have + // global access enabled. + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule has multiple ports + // specified. + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group) targeting a Cloud SQL service attachment, but this + // configuration is not supported. + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + + // No NAT subnets are defined for the PSC service attachment. + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + + // PSC endpoint is accessed via NCC, but PSC transitivity configuration is + // not yet propagated. + PSC_TRANSITIVITY_NOT_PROPAGATED = 64; + + // The packet sent from the hybrid NEG proxy matches a non-dynamic route, + // but such a configuration is not supported. + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + + // The packet sent from the hybrid NEG proxy matches a dynamic route with a + // next hop in a different region, but such a configuration is not + // supported. + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + + // Packet sent from a Cloud Run revision that is not ready. + CLOUD_RUN_REVISION_NOT_READY = 29; + + // Packet was dropped inside Private Service Connect service producer. + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + + // Packet sent to a load balancer, which requires a proxy-only subnet and + // the subnet is not found. + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + + // Packet sent to Cloud Nat without active NAT IPs. + CLOUD_NAT_NO_ADDRESSES = 40; + + // Packet is stuck in a routing loop. + ROUTING_LOOP = 59; + + // Packet is dropped inside a Google-managed service due to being delivered + // in return trace to an endpoint that doesn't match the endpoint the packet + // was sent from in forward trace. Used only for return traces. + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; + + // Packet is dropped due to a load balancer backend instance not having a + // network interface in the network expected by the load balancer. + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; + + // Packet is dropped due to a backend service named port not being defined + // on the instance group level. + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; + + // Packet is dropped due to a destination IP range being part of a Private + // NAT IP range. + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; + + // Generic drop cause for a packet being dropped inside a Redis Instance + // service project. + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Instance. Port 6379 should be used to connect to a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PORT = 71; + + // Packet is dropped due to connecting from PUPI address to a PSA based + // Redis Instance. + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; + + // Packet is dropped due to no route to the destination network. + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; + + // Redis Instance does not have an external IP address. + REDIS_INSTANCE_NO_EXTERNAL_IP = 74; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Instance. Only TCP connections are accepted by a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; + + // Generic drop cause for a packet being dropped inside a Redis Cluster + // service project. + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to + // a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PORT = 76; + + // Redis Cluster does not have an external IP address. + REDIS_CLUSTER_NO_EXTERNAL_IP = 77; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix advertised + // via BGP by the Cloud Router. + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix included to + // the local traffic selector of the VPN tunnel. + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; + + // Packet from the unknown peered network is dropped due to no known route + // from the source network to the destination IP address. + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + } + + // Cause that the packet is dropped. + Cause cause = 1; + + // URI of the resource that caused the drop. + string resource_uri = 2; + + // Source IP address of the dropped packet (if relevant). + string source_ip = 3; + + // Destination IP address of the dropped packet (if relevant). + string destination_ip = 4; + + // Region of the dropped packet (if relevant). + string region = 5; +} + +// For display only. Metadata associated with a Google Kubernetes Engine (GKE) +// cluster master. +message GKEMasterInfo { + // URI of a GKE cluster. + string cluster_uri = 2; + + // URI of a GKE cluster network. + string cluster_network_uri = 4; + + // Internal IP address of a GKE cluster master. + string internal_ip = 5; + + // External IP address of a GKE cluster master. + string external_ip = 6; +} + +// For display only. Metadata associated with a Cloud SQL instance. +message CloudSQLInstanceInfo { + // Name of a Cloud SQL instance. + string display_name = 1; + + // URI of a Cloud SQL instance. + string uri = 2; + + // URI of a Cloud SQL instance network or empty string if the instance does + // not have one. + string network_uri = 4; + + // Internal IP address of a Cloud SQL instance. + string internal_ip = 5; + + // External IP address of a Cloud SQL instance. + string external_ip = 6; + + // Region in which the Cloud SQL instance is running. + string region = 7; +} + +// For display only. Metadata associated with a Cloud Redis Instance. +message RedisInstanceInfo { + // Name of a Cloud Redis Instance. + string display_name = 1; + + // URI of a Cloud Redis Instance. + string uri = 2; + + // URI of a Cloud Redis Instance network. + string network_uri = 3; + + // Primary endpoint IP address of a Cloud Redis Instance. + string primary_endpoint_ip = 4; + + // Read endpoint IP address of a Cloud Redis Instance (if applicable). + string read_endpoint_ip = 5; + + // Region in which the Cloud Redis Instance is defined. + string region = 6; +} + +// For display only. Metadata associated with a Redis Cluster. +message RedisClusterInfo { + // Name of a Redis Cluster. + string display_name = 1; + + // URI of a Redis Cluster in format + // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + string uri = 2; + + // URI of a Redis Cluster network in format + // "projects/{project_id}/global/networks/{network_id}". + string network_uri = 3; + + // Discovery endpoint IP address of a Redis Cluster. + string discovery_endpoint_ip_address = 4 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Secondary endpoint IP address of a Redis Cluster. + string secondary_endpoint_ip_address = 5 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the region in which the Redis Cluster is defined. For example, + // "us-central1". + string location = 6; +} + +// For display only. Metadata associated with a Cloud Function. +message CloudFunctionInfo { + // Name of a Cloud Function. + string display_name = 1; + + // URI of a Cloud Function. + string uri = 2; + + // Location in which the Cloud Function is deployed. + string location = 3; + + // Latest successfully deployed version id of the Cloud Function. + int64 version_id = 4; +} + +// For display only. Metadata associated with a Cloud Run revision. +message CloudRunRevisionInfo { + // Name of a Cloud Run revision. + string display_name = 1; + + // URI of a Cloud Run revision. + string uri = 2; + + // Location in which this revision is deployed. + string location = 4; + + // URI of Cloud Run service this revision belongs to. + string service_uri = 5; +} + +// For display only. Metadata associated with an App Engine version. +message AppEngineVersionInfo { + // Name of an App Engine version. + string display_name = 1; + + // URI of an App Engine version. + string uri = 2; + + // Runtime of the App Engine version. + string runtime = 3; + + // App Engine execution environment for a version. + string environment = 4; +} + +// For display only. Metadata associated with a VPC connector. +message VpcConnectorInfo { + // Name of a VPC connector. + string display_name = 1; + + // URI of a VPC connector. + string uri = 2; + + // Location in which the VPC connector is deployed. + string location = 3; +} + +// For display only. Metadata associated with NAT. +message NatInfo { + // Types of NAT. + enum Type { + // Type is unspecified. + TYPE_UNSPECIFIED = 0; + + // From Compute Engine instance's internal address to external address. + INTERNAL_TO_EXTERNAL = 1; + + // From Compute Engine instance's external address to internal address. + EXTERNAL_TO_INTERNAL = 2; + + // Cloud NAT Gateway. + CLOUD_NAT = 3; + + // Private service connect NAT. + PRIVATE_SERVICE_CONNECT = 4; + } + + // Type of NAT. + Type type = 1; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 2; + + // URI of the network where NAT translation takes place. + string network_uri = 3; + + // Source IP address before NAT translation. + string old_source_ip = 4; + + // Source IP address after NAT translation. + string new_source_ip = 5; + + // Destination IP address before NAT translation. + string old_destination_ip = 6; + + // Destination IP address after NAT translation. + string new_destination_ip = 7; + + // Source port before NAT translation. Only valid when protocol is TCP or UDP. + int32 old_source_port = 8; + + // Source port after NAT translation. Only valid when protocol is TCP or UDP. + int32 new_source_port = 9; + + // Destination port before NAT translation. Only valid when protocol is TCP or + // UDP. + int32 old_destination_port = 10; + + // Destination port after NAT translation. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 11; + + // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + string router_uri = 12; + + // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + string nat_gateway_name = 13; +} + +// For display only. Metadata associated with ProxyConnection. +message ProxyConnectionInfo { + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 1; + + // Source IP address of an original connection. + string old_source_ip = 2; + + // Source IP address of a new connection. + string new_source_ip = 3; + + // Destination IP address of an original connection + string old_destination_ip = 4; + + // Destination IP address of a new connection. + string new_destination_ip = 5; + + // Source port of an original connection. Only valid when protocol is TCP or + // UDP. + int32 old_source_port = 6; + + // Source port of a new connection. Only valid when protocol is TCP or UDP. + int32 new_source_port = 7; + + // Destination port of an original connection. Only valid when protocol is TCP + // or UDP. + int32 old_destination_port = 8; + + // Destination port of a new connection. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 9; + + // Uri of proxy subnet. + string subnet_uri = 10; + + // URI of the network where connection is proxied. + string network_uri = 11; +} + +// For display only. Metadata associated with the load balancer backend. +message LoadBalancerBackendInfo { + // Health check firewalls configuration state enum. + enum HealthCheckFirewallsConfigState { + // Configuration state unspecified. It usually means that the backend has + // no health check attached, or there was an unexpected configuration error + // preventing Connectivity tests from verifying health check configuration. + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; + + // Firewall rules (policies) allowing health check traffic from all required + // IP ranges to the backend are configured. + FIREWALLS_CONFIGURED = 1; + + // Firewall rules (policies) allow health check traffic only from a part of + // required IP ranges. + FIREWALLS_PARTIALLY_CONFIGURED = 2; + + // Firewall rules (policies) deny health check traffic from all required + // IP ranges to the backend. + FIREWALLS_NOT_CONFIGURED = 3; + + // The network contains firewall rules of unsupported types, so Connectivity + // tests were not able to verify health check configuration status. Please + // refer to the documentation for the list of unsupported configurations: + // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs + FIREWALLS_UNSUPPORTED = 4; + } + + // Display name of the backend. For example, it might be an instance name for + // the instance group backends, or an IP address and port for zonal network + // endpoint group backends. + string name = 1; + + // URI of the backend instance (if applicable). Populated for instance group + // backends, and zonal NEG backends. + string instance_uri = 2; + + // URI of the backend service this backend belongs to (if applicable). + string backend_service_uri = 3; + + // URI of the instance group this backend belongs to (if applicable). + string instance_group_uri = 4; + + // URI of the network endpoint group this backend belongs to (if applicable). + string network_endpoint_group_uri = 5; + + // URI of the backend bucket this backend targets (if applicable). + string backend_bucket_uri = 8; + + // URI of the PSC service attachment this PSC NEG backend targets (if + // applicable). + string psc_service_attachment_uri = 9; + + // PSC Google API target this PSC NEG backend targets (if applicable). + string psc_google_api_target = 10; + + // URI of the health check attached to this backend (if applicable). + string health_check_uri = 6; + + // Output only. Health check firewalls configuration state for the backend. + // This is a result of the static firewall analysis (verifying that health + // check traffic from required IP ranges to the backend is allowed or not). + // The backend might still be unhealthy even if these firewalls are + // configured. Please refer to the documentation for more information: + // https://cloud.google.com/load-balancing/docs/firewall-rules + HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Type of a load balancer. For more information, see [Summary of Google Cloud +// load +// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). +enum LoadBalancerType { + // Forwarding rule points to a different target than a load balancer or a + // load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1; + + // Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2; + + // Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3; + + // Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4; + + // External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5; + + // External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6; + + // Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + + // External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8; + + // Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9; + + // Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10; +} + +// For display only. Metadata associated with Storage Bucket. +message StorageBucketInfo { + // Cloud Storage Bucket name. + string bucket = 1; +} + +// For display only. Metadata associated with the serverless network endpoint +// group backend. +message ServerlessNegInfo { + // URI of the serverless network endpoint group. + string neg_uri = 1; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts new file mode 100644 index 00000000000..301bcf3c9d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts @@ -0,0 +1,14640 @@ +// 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 networkmanagement. */ + namespace networkmanagement { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a ConnectivityTest. */ + interface IConnectivityTest { + + /** ConnectivityTest name */ + name?: (string|null); + + /** ConnectivityTest description */ + description?: (string|null); + + /** ConnectivityTest source */ + source?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest destination */ + destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest protocol */ + protocol?: (string|null); + + /** ConnectivityTest relatedProjects */ + relatedProjects?: (string[]|null); + + /** ConnectivityTest displayName */ + displayName?: (string|null); + + /** ConnectivityTest labels */ + labels?: ({ [k: string]: string }|null); + + /** ConnectivityTest createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails */ + reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails */ + probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks */ + bypassFirewallChecks?: (boolean|null); + } + + /** Represents a ConnectivityTest. */ + class ConnectivityTest implements IConnectivityTest { + + /** + * Constructs a new ConnectivityTest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IConnectivityTest); + + /** ConnectivityTest name. */ + public name: string; + + /** ConnectivityTest description. */ + public description: string; + + /** ConnectivityTest source. */ + public source?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest destination. */ + public destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest protocol. */ + public protocol: string; + + /** ConnectivityTest relatedProjects. */ + public relatedProjects: string[]; + + /** ConnectivityTest displayName. */ + public displayName: string; + + /** ConnectivityTest labels. */ + public labels: { [k: string]: string }; + + /** ConnectivityTest createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails. */ + public reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails. */ + public probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks. */ + public bypassFirewallChecks: boolean; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectivityTest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IConnectivityTest): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Verifies a ConnectivityTest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectivityTest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @param message ConnectivityTest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectivityTest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectivityTest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Endpoint. */ + interface IEndpoint { + + /** Endpoint ipAddress */ + ipAddress?: (string|null); + + /** Endpoint port */ + port?: (number|null); + + /** Endpoint instance */ + instance?: (string|null); + + /** Endpoint forwardingRule */ + forwardingRule?: (string|null); + + /** Endpoint forwardingRuleTarget */ + forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId */ + loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster */ + gkeMasterCluster?: (string|null); + + /** Endpoint cloudSqlInstance */ + cloudSqlInstance?: (string|null); + + /** Endpoint redisInstance */ + redisInstance?: (string|null); + + /** Endpoint redisCluster */ + redisCluster?: (string|null); + + /** Endpoint cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network */ + network?: (string|null); + + /** Endpoint networkType */ + networkType?: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType|null); + + /** Endpoint projectId */ + projectId?: (string|null); + } + + /** Represents an Endpoint. */ + class Endpoint implements IEndpoint { + + /** + * Constructs a new Endpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IEndpoint); + + /** Endpoint ipAddress. */ + public ipAddress: string; + + /** Endpoint port. */ + public port: number; + + /** Endpoint instance. */ + public instance: string; + + /** Endpoint forwardingRule. */ + public forwardingRule: string; + + /** Endpoint forwardingRuleTarget. */ + public forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId. */ + public loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType. */ + public loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster. */ + public gkeMasterCluster: string; + + /** Endpoint cloudSqlInstance. */ + public cloudSqlInstance: string; + + /** Endpoint redisInstance. */ + public redisInstance: string; + + /** Endpoint redisCluster. */ + public redisCluster: string; + + /** Endpoint cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network. */ + public network: string; + + /** Endpoint networkType. */ + public networkType: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType); + + /** Endpoint projectId. */ + public projectId: string; + + /** Endpoint _forwardingRuleTarget. */ + public _forwardingRuleTarget?: "forwardingRuleTarget"; + + /** Endpoint _loadBalancerId. */ + public _loadBalancerId?: "loadBalancerId"; + + /** Endpoint _loadBalancerType. */ + public _loadBalancerType?: "loadBalancerType"; + + /** + * Creates a new Endpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns Endpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IEndpoint): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Verifies an Endpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Endpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @param message Endpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Endpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Endpoint { + + /** NetworkType enum. */ + enum NetworkType { + NETWORK_TYPE_UNSPECIFIED = 0, + GCP_NETWORK = 1, + NON_GCP_NETWORK = 2 + } + + /** ForwardingRuleTarget enum. */ + enum ForwardingRuleTarget { + FORWARDING_RULE_TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + LOAD_BALANCER = 2, + VPN_GATEWAY = 3, + PSC = 4 + } + + /** Properties of a CloudFunctionEndpoint. */ + interface ICloudFunctionEndpoint { + + /** CloudFunctionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudFunctionEndpoint. */ + class CloudFunctionEndpoint implements ICloudFunctionEndpoint { + + /** + * Constructs a new CloudFunctionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint); + + /** CloudFunctionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Verifies a CloudFunctionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @param message CloudFunctionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionEndpoint. */ + interface IAppEngineVersionEndpoint { + + /** AppEngineVersionEndpoint uri */ + uri?: (string|null); + } + + /** Represents an AppEngineVersionEndpoint. */ + class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { + + /** + * Constructs a new AppEngineVersionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint); + + /** AppEngineVersionEndpoint uri. */ + public uri: string; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @param message AppEngineVersionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionEndpoint. */ + interface ICloudRunRevisionEndpoint { + + /** CloudRunRevisionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudRunRevisionEndpoint. */ + class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint); + + /** CloudRunRevisionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @param message CloudRunRevisionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReachabilityDetails. */ + interface IReachabilityDetails { + + /** ReachabilityDetails result */ + result?: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null); + + /** ReachabilityDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error */ + error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces */ + traces?: (google.cloud.networkmanagement.v1.ITrace[]|null); + } + + /** Represents a ReachabilityDetails. */ + class ReachabilityDetails implements IReachabilityDetails { + + /** + * Constructs a new ReachabilityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails); + + /** ReachabilityDetails result. */ + public result: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result); + + /** ReachabilityDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces. */ + public traces: google.cloud.networkmanagement.v1.ITrace[]; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ReachabilityDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Verifies a ReachabilityDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReachabilityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @param message ReachabilityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReachabilityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReachabilityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReachabilityDetails { + + /** Result enum. */ + enum Result { + RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + AMBIGUOUS = 4, + UNDETERMINED = 5 + } + } + + /** Properties of a LatencyPercentile. */ + interface ILatencyPercentile { + + /** LatencyPercentile percent */ + percent?: (number|null); + + /** LatencyPercentile latencyMicros */ + latencyMicros?: (number|Long|string|null); + } + + /** Represents a LatencyPercentile. */ + class LatencyPercentile implements ILatencyPercentile { + + /** + * Constructs a new LatencyPercentile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile); + + /** LatencyPercentile percent. */ + public percent: number; + + /** LatencyPercentile latencyMicros. */ + public latencyMicros: (number|Long|string); + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyPercentile instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Verifies a LatencyPercentile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyPercentile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @param message LatencyPercentile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyPercentile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyPercentile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LatencyDistribution. */ + interface ILatencyDistribution { + + /** LatencyDistribution latencyPercentiles */ + latencyPercentiles?: (google.cloud.networkmanagement.v1.ILatencyPercentile[]|null); + } + + /** Represents a LatencyDistribution. */ + class LatencyDistribution implements ILatencyDistribution { + + /** + * Constructs a new LatencyDistribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution); + + /** LatencyDistribution latencyPercentiles. */ + public latencyPercentiles: google.cloud.networkmanagement.v1.ILatencyPercentile[]; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyDistribution instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Verifies a LatencyDistribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyDistribution + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @param message LatencyDistribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyDistribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyDistribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProbingDetails. */ + interface IProbingDetails { + + /** ProbingDetails result */ + result?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null); + + /** ProbingDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error */ + error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause */ + abortCause?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null); + + /** ProbingDetails sentProbeCount */ + sentProbeCount?: (number|null); + + /** ProbingDetails successfulProbeCount */ + successfulProbeCount?: (number|null); + + /** ProbingDetails endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** ProbingDetails probingLatency */ + probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation */ + destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); + } + + /** Represents a ProbingDetails. */ + class ProbingDetails implements IProbingDetails { + + /** + * Constructs a new ProbingDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IProbingDetails); + + /** ProbingDetails result. */ + public result: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult); + + /** ProbingDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause. */ + public abortCause: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause); + + /** ProbingDetails sentProbeCount. */ + public sentProbeCount: number; + + /** ProbingDetails successfulProbeCount. */ + public successfulProbeCount: number; + + /** ProbingDetails endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** ProbingDetails probingLatency. */ + public probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation. */ + public destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ProbingDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IProbingDetails): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Verifies a ProbingDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProbingDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @param message ProbingDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProbingDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProbingDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProbingDetails { + + /** ProbingResult enum. */ + enum ProbingResult { + PROBING_RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + REACHABILITY_INCONSISTENT = 3, + UNDETERMINED = 4 + } + + /** ProbingAbortCause enum. */ + enum ProbingAbortCause { + PROBING_ABORT_CAUSE_UNSPECIFIED = 0, + PERMISSION_DENIED = 1, + NO_SOURCE_LOCATION = 2 + } + + /** Properties of an EdgeLocation. */ + interface IEdgeLocation { + + /** EdgeLocation metropolitanArea */ + metropolitanArea?: (string|null); + } + + /** Represents an EdgeLocation. */ + class EdgeLocation implements IEdgeLocation { + + /** + * Constructs a new EdgeLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation); + + /** EdgeLocation metropolitanArea. */ + public metropolitanArea: string; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns EdgeLocation instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Verifies an EdgeLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EdgeLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @param message EdgeLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EdgeLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EdgeLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Trace. */ + interface ITrace { + + /** Trace endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Trace steps */ + steps?: (google.cloud.networkmanagement.v1.IStep[]|null); + + /** Trace forwardTraceId */ + forwardTraceId?: (number|null); + } + + /** Represents a Trace. */ + class Trace implements ITrace { + + /** + * Constructs a new Trace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ITrace); + + /** Trace endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Trace steps. */ + public steps: google.cloud.networkmanagement.v1.IStep[]; + + /** Trace forwardTraceId. */ + public forwardTraceId: number; + + /** + * Creates a new Trace instance using the specified properties. + * @param [properties] Properties to set + * @returns Trace instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ITrace): google.cloud.networkmanagement.v1.Trace; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Trace; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Trace; + + /** + * Verifies a Trace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Trace; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @param message Trace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Step. */ + interface IStep { + + /** Step description */ + description?: (string|null); + + /** Step state */ + state?: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State|null); + + /** Step causesDrop */ + causesDrop?: (boolean|null); + + /** Step projectId */ + projectId?: (string|null); + + /** Step instance */ + instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); + + /** Step firewall */ + firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); + + /** Step route */ + route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); + + /** Step endpoint */ + endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Step googleService */ + googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); + + /** Step forwardingRule */ + forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); + + /** Step vpnGateway */ + vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); + + /** Step vpnTunnel */ + vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); + + /** Step vpcConnector */ + vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); + + /** Step deliver */ + deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); + + /** Step forward */ + forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); + + /** Step abort */ + abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); + + /** Step drop */ + drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); + + /** Step loadBalancer */ + loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); + + /** Step network */ + network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); + + /** Step gkeMaster */ + gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance */ + cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance */ + redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); + + /** Step redisCluster */ + redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); + + /** Step cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); + + /** Step appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); + + /** Step nat */ + nat?: (google.cloud.networkmanagement.v1.INatInfo|null); + + /** Step proxyConnection */ + proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo */ + loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket */ + storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); + + /** Step serverlessNeg */ + serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); + } + + /** Represents a Step. */ + class Step implements IStep { + + /** + * Constructs a new Step. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IStep); + + /** Step description. */ + public description: string; + + /** Step state. */ + public state: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State); + + /** Step causesDrop. */ + public causesDrop: boolean; + + /** Step projectId. */ + public projectId: string; + + /** Step instance. */ + public instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); + + /** Step firewall. */ + public firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); + + /** Step route. */ + public route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); + + /** Step endpoint. */ + public endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Step googleService. */ + public googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); + + /** Step forwardingRule. */ + public forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); + + /** Step vpnGateway. */ + public vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); + + /** Step vpnTunnel. */ + public vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); + + /** Step vpcConnector. */ + public vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); + + /** Step deliver. */ + public deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); + + /** Step forward. */ + public forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); + + /** Step abort. */ + public abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); + + /** Step drop. */ + public drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); + + /** Step loadBalancer. */ + public loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); + + /** Step network. */ + public network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); + + /** Step gkeMaster. */ + public gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance. */ + public cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance. */ + public redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); + + /** Step redisCluster. */ + public redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); + + /** Step cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); + + /** Step appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); + + /** Step nat. */ + public nat?: (google.cloud.networkmanagement.v1.INatInfo|null); + + /** Step proxyConnection. */ + public proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo. */ + public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket. */ + public storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); + + /** Step serverlessNeg. */ + public serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); + + /** Step stepInfo. */ + public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); + + /** + * Creates a new Step instance using the specified properties. + * @param [properties] Properties to set + * @returns Step instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IStep): google.cloud.networkmanagement.v1.Step; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Step message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Step; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Step; + + /** + * Verifies a Step message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Step + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Step; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @param message Step + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Step to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Step + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Step { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + START_FROM_INSTANCE = 1, + START_FROM_INTERNET = 2, + START_FROM_GOOGLE_SERVICE = 27, + START_FROM_PRIVATE_NETWORK = 3, + START_FROM_GKE_MASTER = 21, + START_FROM_CLOUD_SQL_INSTANCE = 22, + START_FROM_REDIS_INSTANCE = 32, + START_FROM_REDIS_CLUSTER = 33, + START_FROM_CLOUD_FUNCTION = 23, + START_FROM_APP_ENGINE_VERSION = 25, + START_FROM_CLOUD_RUN_REVISION = 26, + START_FROM_STORAGE_BUCKET = 29, + START_FROM_PSC_PUBLISHED_SERVICE = 30, + START_FROM_SERVERLESS_NEG = 31, + APPLY_INGRESS_FIREWALL_RULE = 4, + APPLY_EGRESS_FIREWALL_RULE = 5, + APPLY_ROUTE = 6, + APPLY_FORWARDING_RULE = 7, + ANALYZE_LOAD_BALANCER_BACKEND = 28, + SPOOFING_APPROVED = 8, + ARRIVE_AT_INSTANCE = 9, + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, + ARRIVE_AT_VPN_GATEWAY = 12, + ARRIVE_AT_VPN_TUNNEL = 13, + ARRIVE_AT_VPC_CONNECTOR = 24, + NAT = 14, + PROXY_CONNECTION = 15, + DELIVER = 16, + DROP = 17, + FORWARD = 18, + ABORT = 19, + VIEWER_PERMISSION_MISSING = 20 + } + } + + /** Properties of an InstanceInfo. */ + interface IInstanceInfo { + + /** InstanceInfo displayName */ + displayName?: (string|null); + + /** InstanceInfo uri */ + uri?: (string|null); + + /** InstanceInfo interface */ + "interface"?: (string|null); + + /** InstanceInfo networkUri */ + networkUri?: (string|null); + + /** InstanceInfo internalIp */ + internalIp?: (string|null); + + /** InstanceInfo externalIp */ + externalIp?: (string|null); + + /** InstanceInfo networkTags */ + networkTags?: (string[]|null); + + /** InstanceInfo serviceAccount */ + serviceAccount?: (string|null); + + /** InstanceInfo pscNetworkAttachmentUri */ + pscNetworkAttachmentUri?: (string|null); + } + + /** Represents an InstanceInfo. */ + class InstanceInfo implements IInstanceInfo { + + /** + * Constructs a new InstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IInstanceInfo); + + /** InstanceInfo displayName. */ + public displayName: string; + + /** InstanceInfo uri. */ + public uri: string; + + /** InstanceInfo interface. */ + public interface: string; + + /** InstanceInfo networkUri. */ + public networkUri: string; + + /** InstanceInfo internalIp. */ + public internalIp: string; + + /** InstanceInfo externalIp. */ + public externalIp: string; + + /** InstanceInfo networkTags. */ + public networkTags: string[]; + + /** InstanceInfo serviceAccount. */ + public serviceAccount: string; + + /** InstanceInfo pscNetworkAttachmentUri. */ + public pscNetworkAttachmentUri: string; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IInstanceInfo): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Verifies an InstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @param message InstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInfo. */ + interface INetworkInfo { + + /** NetworkInfo displayName */ + displayName?: (string|null); + + /** NetworkInfo uri */ + uri?: (string|null); + + /** NetworkInfo matchedSubnetUri */ + matchedSubnetUri?: (string|null); + + /** NetworkInfo matchedIpRange */ + matchedIpRange?: (string|null); + + /** NetworkInfo region */ + region?: (string|null); + } + + /** Represents a NetworkInfo. */ + class NetworkInfo implements INetworkInfo { + + /** + * Constructs a new NetworkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.INetworkInfo); + + /** NetworkInfo displayName. */ + public displayName: string; + + /** NetworkInfo uri. */ + public uri: string; + + /** NetworkInfo matchedSubnetUri. */ + public matchedSubnetUri: string; + + /** NetworkInfo matchedIpRange. */ + public matchedIpRange: string; + + /** NetworkInfo region. */ + public region: string; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.INetworkInfo): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Verifies a NetworkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @param message NetworkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FirewallInfo. */ + interface IFirewallInfo { + + /** FirewallInfo displayName */ + displayName?: (string|null); + + /** FirewallInfo uri */ + uri?: (string|null); + + /** FirewallInfo direction */ + direction?: (string|null); + + /** FirewallInfo action */ + action?: (string|null); + + /** FirewallInfo priority */ + priority?: (number|null); + + /** FirewallInfo networkUri */ + networkUri?: (string|null); + + /** FirewallInfo targetTags */ + targetTags?: (string[]|null); + + /** FirewallInfo targetServiceAccounts */ + targetServiceAccounts?: (string[]|null); + + /** FirewallInfo policy */ + policy?: (string|null); + + /** FirewallInfo policyUri */ + policyUri?: (string|null); + + /** FirewallInfo firewallRuleType */ + firewallRuleType?: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null); + } + + /** Represents a FirewallInfo. */ + class FirewallInfo implements IFirewallInfo { + + /** + * Constructs a new FirewallInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IFirewallInfo); + + /** FirewallInfo displayName. */ + public displayName: string; + + /** FirewallInfo uri. */ + public uri: string; + + /** FirewallInfo direction. */ + public direction: string; + + /** FirewallInfo action. */ + public action: string; + + /** FirewallInfo priority. */ + public priority: number; + + /** FirewallInfo networkUri. */ + public networkUri: string; + + /** FirewallInfo targetTags. */ + public targetTags: string[]; + + /** FirewallInfo targetServiceAccounts. */ + public targetServiceAccounts: string[]; + + /** FirewallInfo policy. */ + public policy: string; + + /** FirewallInfo policyUri. */ + public policyUri: string; + + /** FirewallInfo firewallRuleType. */ + public firewallRuleType: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType); + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FirewallInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IFirewallInfo): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Verifies a FirewallInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirewallInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @param message FirewallInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirewallInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirewallInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FirewallInfo { + + /** FirewallRuleType enum. */ + enum FirewallRuleType { + FIREWALL_RULE_TYPE_UNSPECIFIED = 0, + HIERARCHICAL_FIREWALL_POLICY_RULE = 1, + VPC_FIREWALL_RULE = 2, + IMPLIED_VPC_FIREWALL_RULE = 3, + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, + NETWORK_FIREWALL_POLICY_RULE = 5, + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, + UNSUPPORTED_FIREWALL_POLICY_RULE = 100, + TRACKING_STATE = 101 + } + } + + /** Properties of a RouteInfo. */ + interface IRouteInfo { + + /** RouteInfo routeType */ + routeType?: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType|null); + + /** RouteInfo nextHopType */ + nextHopType?: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null); + + /** RouteInfo routeScope */ + routeScope?: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null); + + /** RouteInfo displayName */ + displayName?: (string|null); + + /** RouteInfo uri */ + uri?: (string|null); + + /** RouteInfo region */ + region?: (string|null); + + /** RouteInfo destIpRange */ + destIpRange?: (string|null); + + /** RouteInfo nextHop */ + nextHop?: (string|null); + + /** RouteInfo networkUri */ + networkUri?: (string|null); + + /** RouteInfo priority */ + priority?: (number|null); + + /** RouteInfo instanceTags */ + instanceTags?: (string[]|null); + + /** RouteInfo srcIpRange */ + srcIpRange?: (string|null); + + /** RouteInfo destPortRanges */ + destPortRanges?: (string[]|null); + + /** RouteInfo srcPortRanges */ + srcPortRanges?: (string[]|null); + + /** RouteInfo protocols */ + protocols?: (string[]|null); + + /** RouteInfo nccHubUri */ + nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri */ + nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri */ + advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri */ + advertisedRouteNextHopUri?: (string|null); + } + + /** Represents a RouteInfo. */ + class RouteInfo implements IRouteInfo { + + /** + * Constructs a new RouteInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRouteInfo); + + /** RouteInfo routeType. */ + public routeType: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType); + + /** RouteInfo nextHopType. */ + public nextHopType: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType); + + /** RouteInfo routeScope. */ + public routeScope: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope); + + /** RouteInfo displayName. */ + public displayName: string; + + /** RouteInfo uri. */ + public uri: string; + + /** RouteInfo region. */ + public region: string; + + /** RouteInfo destIpRange. */ + public destIpRange: string; + + /** RouteInfo nextHop. */ + public nextHop: string; + + /** RouteInfo networkUri. */ + public networkUri: string; + + /** RouteInfo priority. */ + public priority: number; + + /** RouteInfo instanceTags. */ + public instanceTags: string[]; + + /** RouteInfo srcIpRange. */ + public srcIpRange: string; + + /** RouteInfo destPortRanges. */ + public destPortRanges: string[]; + + /** RouteInfo srcPortRanges. */ + public srcPortRanges: string[]; + + /** RouteInfo protocols. */ + public protocols: string[]; + + /** RouteInfo nccHubUri. */ + public nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri. */ + public nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri. */ + public advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri. */ + public advertisedRouteNextHopUri?: (string|null); + + /** RouteInfo _nccHubUri. */ + public _nccHubUri?: "nccHubUri"; + + /** RouteInfo _nccSpokeUri. */ + public _nccSpokeUri?: "nccSpokeUri"; + + /** RouteInfo _advertisedRouteSourceRouterUri. */ + public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; + + /** RouteInfo _advertisedRouteNextHopUri. */ + public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; + + /** + * Creates a new RouteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RouteInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRouteInfo): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Verifies a RouteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RouteInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @param message RouteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RouteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RouteInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RouteInfo { + + /** RouteType enum. */ + enum RouteType { + ROUTE_TYPE_UNSPECIFIED = 0, + SUBNET = 1, + STATIC = 2, + DYNAMIC = 3, + PEERING_SUBNET = 4, + PEERING_STATIC = 5, + PEERING_DYNAMIC = 6, + POLICY_BASED = 7, + ADVERTISED = 101 + } + + /** NextHopType enum. */ + enum NextHopType { + NEXT_HOP_TYPE_UNSPECIFIED = 0, + NEXT_HOP_IP = 1, + NEXT_HOP_INSTANCE = 2, + NEXT_HOP_NETWORK = 3, + NEXT_HOP_PEERING = 4, + NEXT_HOP_INTERCONNECT = 5, + NEXT_HOP_VPN_TUNNEL = 6, + NEXT_HOP_VPN_GATEWAY = 7, + NEXT_HOP_INTERNET_GATEWAY = 8, + NEXT_HOP_BLACKHOLE = 9, + NEXT_HOP_ILB = 10, + NEXT_HOP_ROUTER_APPLIANCE = 11, + NEXT_HOP_NCC_HUB = 12 + } + + /** RouteScope enum. */ + enum RouteScope { + ROUTE_SCOPE_UNSPECIFIED = 0, + NETWORK = 1, + NCC_HUB = 2 + } + } + + /** Properties of a GoogleServiceInfo. */ + interface IGoogleServiceInfo { + + /** GoogleServiceInfo sourceIp */ + sourceIp?: (string|null); + + /** GoogleServiceInfo googleServiceType */ + googleServiceType?: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null); + } + + /** Represents a GoogleServiceInfo. */ + class GoogleServiceInfo implements IGoogleServiceInfo { + + /** + * Constructs a new GoogleServiceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo); + + /** GoogleServiceInfo sourceIp. */ + public sourceIp: string; + + /** GoogleServiceInfo googleServiceType. */ + public googleServiceType: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType); + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleServiceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Verifies a GoogleServiceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleServiceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @param message GoogleServiceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleServiceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GoogleServiceInfo { + + /** GoogleServiceType enum. */ + enum GoogleServiceType { + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, + IAP = 1, + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, + CLOUD_DNS = 3, + GOOGLE_API = 4, + GOOGLE_API_PSC = 5, + GOOGLE_API_VPC_SC = 6 + } + } + + /** Properties of a ForwardingRuleInfo. */ + interface IForwardingRuleInfo { + + /** ForwardingRuleInfo displayName */ + displayName?: (string|null); + + /** ForwardingRuleInfo uri */ + uri?: (string|null); + + /** ForwardingRuleInfo matchedProtocol */ + matchedProtocol?: (string|null); + + /** ForwardingRuleInfo matchedPortRange */ + matchedPortRange?: (string|null); + + /** ForwardingRuleInfo vip */ + vip?: (string|null); + + /** ForwardingRuleInfo target */ + target?: (string|null); + + /** ForwardingRuleInfo networkUri */ + networkUri?: (string|null); + + /** ForwardingRuleInfo region */ + region?: (string|null); + + /** ForwardingRuleInfo loadBalancerName */ + loadBalancerName?: (string|null); + + /** ForwardingRuleInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** ForwardingRuleInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a ForwardingRuleInfo. */ + class ForwardingRuleInfo implements IForwardingRuleInfo { + + /** + * Constructs a new ForwardingRuleInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo); + + /** ForwardingRuleInfo displayName. */ + public displayName: string; + + /** ForwardingRuleInfo uri. */ + public uri: string; + + /** ForwardingRuleInfo matchedProtocol. */ + public matchedProtocol: string; + + /** ForwardingRuleInfo matchedPortRange. */ + public matchedPortRange: string; + + /** ForwardingRuleInfo vip. */ + public vip: string; + + /** ForwardingRuleInfo target. */ + public target: string; + + /** ForwardingRuleInfo networkUri. */ + public networkUri: string; + + /** ForwardingRuleInfo region. */ + public region: string; + + /** ForwardingRuleInfo loadBalancerName. */ + public loadBalancerName: string; + + /** ForwardingRuleInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** ForwardingRuleInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardingRuleInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Verifies a ForwardingRuleInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardingRuleInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @param message ForwardingRuleInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerInfo. */ + interface ILoadBalancerInfo { + + /** LoadBalancerInfo loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null); + + /** LoadBalancerInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerInfo backends */ + backends?: (google.cloud.networkmanagement.v1.ILoadBalancerBackend[]|null); + + /** LoadBalancerInfo backendType */ + backendType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null); + + /** LoadBalancerInfo backendUri */ + backendUri?: (string|null); + } + + /** Represents a LoadBalancerInfo. */ + class LoadBalancerInfo implements ILoadBalancerInfo { + + /** + * Constructs a new LoadBalancerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo); + + /** LoadBalancerInfo loadBalancerType. */ + public loadBalancerType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType); + + /** LoadBalancerInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerInfo backends. */ + public backends: google.cloud.networkmanagement.v1.ILoadBalancerBackend[]; + + /** LoadBalancerInfo backendType. */ + public backendType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType); + + /** LoadBalancerInfo backendUri. */ + public backendUri: string; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Verifies a LoadBalancerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @param message LoadBalancerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerInfo { + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + INTERNAL_TCP_UDP = 1, + NETWORK_TCP_UDP = 2, + HTTP_PROXY = 3, + TCP_PROXY = 4, + SSL_PROXY = 5 + } + + /** BackendType enum. */ + enum BackendType { + BACKEND_TYPE_UNSPECIFIED = 0, + BACKEND_SERVICE = 1, + TARGET_POOL = 2, + TARGET_INSTANCE = 3 + } + } + + /** Properties of a LoadBalancerBackend. */ + interface ILoadBalancerBackend { + + /** LoadBalancerBackend displayName */ + displayName?: (string|null); + + /** LoadBalancerBackend uri */ + uri?: (string|null); + + /** LoadBalancerBackend healthCheckFirewallState */ + healthCheckFirewallState?: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules */ + healthCheckAllowingFirewallRules?: (string[]|null); + + /** LoadBalancerBackend healthCheckBlockingFirewallRules */ + healthCheckBlockingFirewallRules?: (string[]|null); + } + + /** Represents a LoadBalancerBackend. */ + class LoadBalancerBackend implements ILoadBalancerBackend { + + /** + * Constructs a new LoadBalancerBackend. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend); + + /** LoadBalancerBackend displayName. */ + public displayName: string; + + /** LoadBalancerBackend uri. */ + public uri: string; + + /** LoadBalancerBackend healthCheckFirewallState. */ + public healthCheckFirewallState: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ + public healthCheckAllowingFirewallRules: string[]; + + /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ + public healthCheckBlockingFirewallRules: string[]; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackend instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Verifies a LoadBalancerBackend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackend + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @param message LoadBalancerBackend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackend + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackend { + + /** HealthCheckFirewallState enum. */ + enum HealthCheckFirewallState { + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, + CONFIGURED = 1, + MISCONFIGURED = 2 + } + } + + /** Properties of a VpnGatewayInfo. */ + interface IVpnGatewayInfo { + + /** VpnGatewayInfo displayName */ + displayName?: (string|null); + + /** VpnGatewayInfo uri */ + uri?: (string|null); + + /** VpnGatewayInfo networkUri */ + networkUri?: (string|null); + + /** VpnGatewayInfo ipAddress */ + ipAddress?: (string|null); + + /** VpnGatewayInfo vpnTunnelUri */ + vpnTunnelUri?: (string|null); + + /** VpnGatewayInfo region */ + region?: (string|null); + } + + /** Represents a VpnGatewayInfo. */ + class VpnGatewayInfo implements IVpnGatewayInfo { + + /** + * Constructs a new VpnGatewayInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo); + + /** VpnGatewayInfo displayName. */ + public displayName: string; + + /** VpnGatewayInfo uri. */ + public uri: string; + + /** VpnGatewayInfo networkUri. */ + public networkUri: string; + + /** VpnGatewayInfo ipAddress. */ + public ipAddress: string; + + /** VpnGatewayInfo vpnTunnelUri. */ + public vpnTunnelUri: string; + + /** VpnGatewayInfo region. */ + public region: string; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnGatewayInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Verifies a VpnGatewayInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnGatewayInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @param message VpnGatewayInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnGatewayInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpnTunnelInfo. */ + interface IVpnTunnelInfo { + + /** VpnTunnelInfo displayName */ + displayName?: (string|null); + + /** VpnTunnelInfo uri */ + uri?: (string|null); + + /** VpnTunnelInfo sourceGateway */ + sourceGateway?: (string|null); + + /** VpnTunnelInfo remoteGateway */ + remoteGateway?: (string|null); + + /** VpnTunnelInfo remoteGatewayIp */ + remoteGatewayIp?: (string|null); + + /** VpnTunnelInfo sourceGatewayIp */ + sourceGatewayIp?: (string|null); + + /** VpnTunnelInfo networkUri */ + networkUri?: (string|null); + + /** VpnTunnelInfo region */ + region?: (string|null); + + /** VpnTunnelInfo routingType */ + routingType?: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null); + } + + /** Represents a VpnTunnelInfo. */ + class VpnTunnelInfo implements IVpnTunnelInfo { + + /** + * Constructs a new VpnTunnelInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo); + + /** VpnTunnelInfo displayName. */ + public displayName: string; + + /** VpnTunnelInfo uri. */ + public uri: string; + + /** VpnTunnelInfo sourceGateway. */ + public sourceGateway: string; + + /** VpnTunnelInfo remoteGateway. */ + public remoteGateway: string; + + /** VpnTunnelInfo remoteGatewayIp. */ + public remoteGatewayIp: string; + + /** VpnTunnelInfo sourceGatewayIp. */ + public sourceGatewayIp: string; + + /** VpnTunnelInfo networkUri. */ + public networkUri: string; + + /** VpnTunnelInfo region. */ + public region: string; + + /** VpnTunnelInfo routingType. */ + public routingType: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType); + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnTunnelInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Verifies a VpnTunnelInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnTunnelInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @param message VpnTunnelInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnTunnelInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VpnTunnelInfo { + + /** RoutingType enum. */ + enum RoutingType { + ROUTING_TYPE_UNSPECIFIED = 0, + ROUTE_BASED = 1, + POLICY_BASED = 2, + DYNAMIC = 3 + } + } + + /** Properties of an EndpointInfo. */ + interface IEndpointInfo { + + /** EndpointInfo sourceIp */ + sourceIp?: (string|null); + + /** EndpointInfo destinationIp */ + destinationIp?: (string|null); + + /** EndpointInfo protocol */ + protocol?: (string|null); + + /** EndpointInfo sourcePort */ + sourcePort?: (number|null); + + /** EndpointInfo destinationPort */ + destinationPort?: (number|null); + + /** EndpointInfo sourceNetworkUri */ + sourceNetworkUri?: (string|null); + + /** EndpointInfo destinationNetworkUri */ + destinationNetworkUri?: (string|null); + + /** EndpointInfo sourceAgentUri */ + sourceAgentUri?: (string|null); + } + + /** Represents an EndpointInfo. */ + class EndpointInfo implements IEndpointInfo { + + /** + * Constructs a new EndpointInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IEndpointInfo); + + /** EndpointInfo sourceIp. */ + public sourceIp: string; + + /** EndpointInfo destinationIp. */ + public destinationIp: string; + + /** EndpointInfo protocol. */ + public protocol: string; + + /** EndpointInfo sourcePort. */ + public sourcePort: number; + + /** EndpointInfo destinationPort. */ + public destinationPort: number; + + /** EndpointInfo sourceNetworkUri. */ + public sourceNetworkUri: string; + + /** EndpointInfo destinationNetworkUri. */ + public destinationNetworkUri: string; + + /** EndpointInfo sourceAgentUri. */ + public sourceAgentUri: string; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EndpointInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IEndpointInfo): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Verifies an EndpointInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndpointInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @param message EndpointInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndpointInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndpointInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeliverInfo. */ + interface IDeliverInfo { + + /** DeliverInfo target */ + target?: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target|null); + + /** DeliverInfo resourceUri */ + resourceUri?: (string|null); + + /** DeliverInfo ipAddress */ + ipAddress?: (string|null); + + /** DeliverInfo storageBucket */ + storageBucket?: (string|null); + + /** DeliverInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a DeliverInfo. */ + class DeliverInfo implements IDeliverInfo { + + /** + * Constructs a new DeliverInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IDeliverInfo); + + /** DeliverInfo target. */ + public target: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target); + + /** DeliverInfo resourceUri. */ + public resourceUri: string; + + /** DeliverInfo ipAddress. */ + public ipAddress: string; + + /** DeliverInfo storageBucket. */ + public storageBucket: string; + + /** DeliverInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DeliverInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IDeliverInfo): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Verifies a DeliverInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeliverInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @param message DeliverInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeliverInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeliverInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeliverInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + INTERNET = 2, + GOOGLE_API = 3, + GKE_MASTER = 4, + CLOUD_SQL_INSTANCE = 5, + PSC_PUBLISHED_SERVICE = 6, + PSC_GOOGLE_API = 7, + PSC_VPC_SC = 8, + SERVERLESS_NEG = 9, + STORAGE_BUCKET = 10, + PRIVATE_NETWORK = 11, + CLOUD_FUNCTION = 12, + APP_ENGINE_VERSION = 13, + CLOUD_RUN_REVISION = 14, + GOOGLE_MANAGED_SERVICE = 15, + REDIS_INSTANCE = 16, + REDIS_CLUSTER = 17 + } + } + + /** Properties of a ForwardInfo. */ + interface IForwardInfo { + + /** ForwardInfo target */ + target?: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target|null); + + /** ForwardInfo resourceUri */ + resourceUri?: (string|null); + + /** ForwardInfo ipAddress */ + ipAddress?: (string|null); + } + + /** Represents a ForwardInfo. */ + class ForwardInfo implements IForwardInfo { + + /** + * Constructs a new ForwardInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IForwardInfo); + + /** ForwardInfo target. */ + public target: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target); + + /** ForwardInfo resourceUri. */ + public resourceUri: string; + + /** ForwardInfo ipAddress. */ + public ipAddress: string; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IForwardInfo): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Verifies a ForwardInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @param message ForwardInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ForwardInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + PEERING_VPC = 1, + VPN_GATEWAY = 2, + INTERCONNECT = 3, + GKE_MASTER = 4, + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, + CLOUD_SQL_INSTANCE = 6, + ANOTHER_PROJECT = 7, + NCC_HUB = 8, + ROUTER_APPLIANCE = 9 + } + } + + /** Properties of an AbortInfo. */ + interface IAbortInfo { + + /** AbortInfo cause */ + cause?: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause|null); + + /** AbortInfo resourceUri */ + resourceUri?: (string|null); + + /** AbortInfo ipAddress */ + ipAddress?: (string|null); + + /** AbortInfo projectsMissingPermission */ + projectsMissingPermission?: (string[]|null); + } + + /** Represents an AbortInfo. */ + class AbortInfo implements IAbortInfo { + + /** + * Constructs a new AbortInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IAbortInfo); + + /** AbortInfo cause. */ + public cause: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause); + + /** AbortInfo resourceUri. */ + public resourceUri: string; + + /** AbortInfo ipAddress. */ + public ipAddress: string; + + /** AbortInfo projectsMissingPermission. */ + public projectsMissingPermission: string[]; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AbortInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IAbortInfo): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Verifies an AbortInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbortInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @param message AbortInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbortInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbortInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AbortInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_NETWORK = 1, + UNKNOWN_PROJECT = 3, + NO_EXTERNAL_IP = 7, + UNINTENDED_DESTINATION = 8, + SOURCE_ENDPOINT_NOT_FOUND = 11, + MISMATCHED_SOURCE_NETWORK = 12, + DESTINATION_ENDPOINT_NOT_FOUND = 13, + MISMATCHED_DESTINATION_NETWORK = 14, + UNKNOWN_IP = 2, + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, + PERMISSION_DENIED = 4, + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, + NO_SOURCE_LOCATION = 5, + INVALID_ARGUMENT = 6, + TRACE_TOO_LONG = 9, + INTERNAL_ERROR = 10, + UNSUPPORTED = 15, + MISMATCHED_IP_VERSION = 16, + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, + RESOURCE_CONFIG_NOT_FOUND = 18, + VM_INSTANCE_CONFIG_NOT_FOUND = 24, + NETWORK_CONFIG_NOT_FOUND = 25, + FIREWALL_CONFIG_NOT_FOUND = 26, + ROUTE_CONFIG_NOT_FOUND = 27, + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, + NON_ROUTABLE_IP_ADDRESS = 22, + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 + } + } + + /** Properties of a DropInfo. */ + interface IDropInfo { + + /** DropInfo cause */ + cause?: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause|null); + + /** DropInfo resourceUri */ + resourceUri?: (string|null); + + /** DropInfo sourceIp */ + sourceIp?: (string|null); + + /** DropInfo destinationIp */ + destinationIp?: (string|null); + + /** DropInfo region */ + region?: (string|null); + } + + /** Represents a DropInfo. */ + class DropInfo implements IDropInfo { + + /** + * Constructs a new DropInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IDropInfo); + + /** DropInfo cause. */ + public cause: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause); + + /** DropInfo resourceUri. */ + public resourceUri: string; + + /** DropInfo sourceIp. */ + public sourceIp: string; + + /** DropInfo destinationIp. */ + public destinationIp: string; + + /** DropInfo region. */ + public region: string; + + /** + * Creates a new DropInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DropInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IDropInfo): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Verifies a DropInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DropInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @param message DropInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DropInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DropInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DropInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_EXTERNAL_ADDRESS = 1, + FOREIGN_IP_DISALLOWED = 2, + FIREWALL_RULE = 3, + NO_ROUTE = 4, + ROUTE_BLACKHOLE = 5, + ROUTE_WRONG_NETWORK = 6, + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, + PRIVATE_TRAFFIC_TO_INTERNET = 7, + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, + NO_EXTERNAL_ADDRESS = 9, + UNKNOWN_INTERNAL_ADDRESS = 10, + FORWARDING_RULE_MISMATCH = 11, + FORWARDING_RULE_NO_INSTANCES = 12, + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, + INSTANCE_NOT_RUNNING = 14, + GKE_CLUSTER_NOT_RUNNING = 27, + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, + REDIS_INSTANCE_NOT_RUNNING = 68, + REDIS_CLUSTER_NOT_RUNNING = 69, + TRAFFIC_TYPE_BLOCKED = 15, + GKE_MASTER_UNAUTHORIZED_ACCESS = 16, + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, + DROPPED_INSIDE_GKE_SERVICE = 18, + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, + GKE_PSC_ENDPOINT_MISSING = 36, + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, + GKE_CONTROL_PLANE_REGION_MISMATCH = 30, + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, + GKE_CONTROL_PLANE_NO_ROUTE = 32, + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, + CLOUD_SQL_INSTANCE_NO_ROUTE = 35, + CLOUD_SQL_CONNECTOR_REQUIRED = 63, + CLOUD_FUNCTION_NOT_ACTIVE = 22, + VPC_CONNECTOR_NOT_SET = 23, + VPC_CONNECTOR_NOT_RUNNING = 24, + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, + FORWARDING_RULE_REGION_MISMATCH = 25, + PSC_CONNECTION_NOT_ACCEPTED = 26, + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, + PSC_TRANSITIVITY_NOT_PROPAGATED = 64, + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, + CLOUD_RUN_REVISION_NOT_READY = 29, + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, + CLOUD_NAT_NO_ADDRESSES = 40, + ROUTING_LOOP = 59, + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, + REDIS_INSTANCE_UNSUPPORTED_PORT = 71, + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, + REDIS_INSTANCE_NO_EXTERNAL_IP = 74, + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, + REDIS_CLUSTER_UNSUPPORTED_PORT = 76, + REDIS_CLUSTER_NO_EXTERNAL_IP = 77, + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82 + } + } + + /** Properties of a GKEMasterInfo. */ + interface IGKEMasterInfo { + + /** GKEMasterInfo clusterUri */ + clusterUri?: (string|null); + + /** GKEMasterInfo clusterNetworkUri */ + clusterNetworkUri?: (string|null); + + /** GKEMasterInfo internalIp */ + internalIp?: (string|null); + + /** GKEMasterInfo externalIp */ + externalIp?: (string|null); + } + + /** Represents a GKEMasterInfo. */ + class GKEMasterInfo implements IGKEMasterInfo { + + /** + * Constructs a new GKEMasterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo); + + /** GKEMasterInfo clusterUri. */ + public clusterUri: string; + + /** GKEMasterInfo clusterNetworkUri. */ + public clusterNetworkUri: string; + + /** GKEMasterInfo internalIp. */ + public internalIp: string; + + /** GKEMasterInfo externalIp. */ + public externalIp: string; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GKEMasterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Verifies a GKEMasterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GKEMasterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @param message GKEMasterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GKEMasterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GKEMasterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSQLInstanceInfo. */ + interface ICloudSQLInstanceInfo { + + /** CloudSQLInstanceInfo displayName */ + displayName?: (string|null); + + /** CloudSQLInstanceInfo uri */ + uri?: (string|null); + + /** CloudSQLInstanceInfo networkUri */ + networkUri?: (string|null); + + /** CloudSQLInstanceInfo internalIp */ + internalIp?: (string|null); + + /** CloudSQLInstanceInfo externalIp */ + externalIp?: (string|null); + + /** CloudSQLInstanceInfo region */ + region?: (string|null); + } + + /** Represents a CloudSQLInstanceInfo. */ + class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { + + /** + * Constructs a new CloudSQLInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo); + + /** CloudSQLInstanceInfo displayName. */ + public displayName: string; + + /** CloudSQLInstanceInfo uri. */ + public uri: string; + + /** CloudSQLInstanceInfo networkUri. */ + public networkUri: string; + + /** CloudSQLInstanceInfo internalIp. */ + public internalIp: string; + + /** CloudSQLInstanceInfo externalIp. */ + public externalIp: string; + + /** CloudSQLInstanceInfo region. */ + public region: string; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSQLInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSQLInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @param message CloudSQLInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisInstanceInfo. */ + interface IRedisInstanceInfo { + + /** RedisInstanceInfo displayName */ + displayName?: (string|null); + + /** RedisInstanceInfo uri */ + uri?: (string|null); + + /** RedisInstanceInfo networkUri */ + networkUri?: (string|null); + + /** RedisInstanceInfo primaryEndpointIp */ + primaryEndpointIp?: (string|null); + + /** RedisInstanceInfo readEndpointIp */ + readEndpointIp?: (string|null); + + /** RedisInstanceInfo region */ + region?: (string|null); + } + + /** Represents a RedisInstanceInfo. */ + class RedisInstanceInfo implements IRedisInstanceInfo { + + /** + * Constructs a new RedisInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo); + + /** RedisInstanceInfo displayName. */ + public displayName: string; + + /** RedisInstanceInfo uri. */ + public uri: string; + + /** RedisInstanceInfo networkUri. */ + public networkUri: string; + + /** RedisInstanceInfo primaryEndpointIp. */ + public primaryEndpointIp: string; + + /** RedisInstanceInfo readEndpointIp. */ + public readEndpointIp: string; + + /** RedisInstanceInfo region. */ + public region: string; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Verifies a RedisInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @param message RedisInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisClusterInfo. */ + interface IRedisClusterInfo { + + /** RedisClusterInfo displayName */ + displayName?: (string|null); + + /** RedisClusterInfo uri */ + uri?: (string|null); + + /** RedisClusterInfo networkUri */ + networkUri?: (string|null); + + /** RedisClusterInfo discoveryEndpointIpAddress */ + discoveryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo secondaryEndpointIpAddress */ + secondaryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo location */ + location?: (string|null); + } + + /** Represents a RedisClusterInfo. */ + class RedisClusterInfo implements IRedisClusterInfo { + + /** + * Constructs a new RedisClusterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo); + + /** RedisClusterInfo displayName. */ + public displayName: string; + + /** RedisClusterInfo uri. */ + public uri: string; + + /** RedisClusterInfo networkUri. */ + public networkUri: string; + + /** RedisClusterInfo discoveryEndpointIpAddress. */ + public discoveryEndpointIpAddress: string; + + /** RedisClusterInfo secondaryEndpointIpAddress. */ + public secondaryEndpointIpAddress: string; + + /** RedisClusterInfo location. */ + public location: string; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisClusterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Verifies a RedisClusterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisClusterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @param message RedisClusterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisClusterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisClusterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudFunctionInfo. */ + interface ICloudFunctionInfo { + + /** CloudFunctionInfo displayName */ + displayName?: (string|null); + + /** CloudFunctionInfo uri */ + uri?: (string|null); + + /** CloudFunctionInfo location */ + location?: (string|null); + + /** CloudFunctionInfo versionId */ + versionId?: (number|Long|string|null); + } + + /** Represents a CloudFunctionInfo. */ + class CloudFunctionInfo implements ICloudFunctionInfo { + + /** + * Constructs a new CloudFunctionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo); + + /** CloudFunctionInfo displayName. */ + public displayName: string; + + /** CloudFunctionInfo uri. */ + public uri: string; + + /** CloudFunctionInfo location. */ + public location: string; + + /** CloudFunctionInfo versionId. */ + public versionId: (number|Long|string); + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Verifies a CloudFunctionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @param message CloudFunctionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionInfo. */ + interface ICloudRunRevisionInfo { + + /** CloudRunRevisionInfo displayName */ + displayName?: (string|null); + + /** CloudRunRevisionInfo uri */ + uri?: (string|null); + + /** CloudRunRevisionInfo location */ + location?: (string|null); + + /** CloudRunRevisionInfo serviceUri */ + serviceUri?: (string|null); + } + + /** Represents a CloudRunRevisionInfo. */ + class CloudRunRevisionInfo implements ICloudRunRevisionInfo { + + /** + * Constructs a new CloudRunRevisionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo); + + /** CloudRunRevisionInfo displayName. */ + public displayName: string; + + /** CloudRunRevisionInfo uri. */ + public uri: string; + + /** CloudRunRevisionInfo location. */ + public location: string; + + /** CloudRunRevisionInfo serviceUri. */ + public serviceUri: string; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Verifies a CloudRunRevisionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @param message CloudRunRevisionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionInfo. */ + interface IAppEngineVersionInfo { + + /** AppEngineVersionInfo displayName */ + displayName?: (string|null); + + /** AppEngineVersionInfo uri */ + uri?: (string|null); + + /** AppEngineVersionInfo runtime */ + runtime?: (string|null); + + /** AppEngineVersionInfo environment */ + environment?: (string|null); + } + + /** Represents an AppEngineVersionInfo. */ + class AppEngineVersionInfo implements IAppEngineVersionInfo { + + /** + * Constructs a new AppEngineVersionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo); + + /** AppEngineVersionInfo displayName. */ + public displayName: string; + + /** AppEngineVersionInfo uri. */ + public uri: string; + + /** AppEngineVersionInfo runtime. */ + public runtime: string; + + /** AppEngineVersionInfo environment. */ + public environment: string; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Verifies an AppEngineVersionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @param message AppEngineVersionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcConnectorInfo. */ + interface IVpcConnectorInfo { + + /** VpcConnectorInfo displayName */ + displayName?: (string|null); + + /** VpcConnectorInfo uri */ + uri?: (string|null); + + /** VpcConnectorInfo location */ + location?: (string|null); + } + + /** Represents a VpcConnectorInfo. */ + class VpcConnectorInfo implements IVpcConnectorInfo { + + /** + * Constructs a new VpcConnectorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo); + + /** VpcConnectorInfo displayName. */ + public displayName: string; + + /** VpcConnectorInfo uri. */ + public uri: string; + + /** VpcConnectorInfo location. */ + public location: string; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcConnectorInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Verifies a VpcConnectorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcConnectorInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @param message VpcConnectorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcConnectorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NatInfo. */ + interface INatInfo { + + /** NatInfo type */ + type?: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type|null); + + /** NatInfo protocol */ + protocol?: (string|null); + + /** NatInfo networkUri */ + networkUri?: (string|null); + + /** NatInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** NatInfo newSourceIp */ + newSourceIp?: (string|null); + + /** NatInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** NatInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** NatInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** NatInfo newSourcePort */ + newSourcePort?: (number|null); + + /** NatInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** NatInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** NatInfo routerUri */ + routerUri?: (string|null); + + /** NatInfo natGatewayName */ + natGatewayName?: (string|null); + } + + /** Represents a NatInfo. */ + class NatInfo implements INatInfo { + + /** + * Constructs a new NatInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.INatInfo); + + /** NatInfo type. */ + public type: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type); + + /** NatInfo protocol. */ + public protocol: string; + + /** NatInfo networkUri. */ + public networkUri: string; + + /** NatInfo oldSourceIp. */ + public oldSourceIp: string; + + /** NatInfo newSourceIp. */ + public newSourceIp: string; + + /** NatInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** NatInfo newDestinationIp. */ + public newDestinationIp: string; + + /** NatInfo oldSourcePort. */ + public oldSourcePort: number; + + /** NatInfo newSourcePort. */ + public newSourcePort: number; + + /** NatInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** NatInfo newDestinationPort. */ + public newDestinationPort: number; + + /** NatInfo routerUri. */ + public routerUri: string; + + /** NatInfo natGatewayName. */ + public natGatewayName: string; + + /** + * Creates a new NatInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NatInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.INatInfo): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Verifies a NatInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NatInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @param message NatInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NatInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NatInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NatInfo { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INTERNAL_TO_EXTERNAL = 1, + EXTERNAL_TO_INTERNAL = 2, + CLOUD_NAT = 3, + PRIVATE_SERVICE_CONNECT = 4 + } + } + + /** Properties of a ProxyConnectionInfo. */ + interface IProxyConnectionInfo { + + /** ProxyConnectionInfo protocol */ + protocol?: (string|null); + + /** ProxyConnectionInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** ProxyConnectionInfo newSourceIp */ + newSourceIp?: (string|null); + + /** ProxyConnectionInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** ProxyConnectionInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** ProxyConnectionInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** ProxyConnectionInfo newSourcePort */ + newSourcePort?: (number|null); + + /** ProxyConnectionInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** ProxyConnectionInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** ProxyConnectionInfo subnetUri */ + subnetUri?: (string|null); + + /** ProxyConnectionInfo networkUri */ + networkUri?: (string|null); + } + + /** Represents a ProxyConnectionInfo. */ + class ProxyConnectionInfo implements IProxyConnectionInfo { + + /** + * Constructs a new ProxyConnectionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo); + + /** ProxyConnectionInfo protocol. */ + public protocol: string; + + /** ProxyConnectionInfo oldSourceIp. */ + public oldSourceIp: string; + + /** ProxyConnectionInfo newSourceIp. */ + public newSourceIp: string; + + /** ProxyConnectionInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** ProxyConnectionInfo newDestinationIp. */ + public newDestinationIp: string; + + /** ProxyConnectionInfo oldSourcePort. */ + public oldSourcePort: number; + + /** ProxyConnectionInfo newSourcePort. */ + public newSourcePort: number; + + /** ProxyConnectionInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** ProxyConnectionInfo newDestinationPort. */ + public newDestinationPort: number; + + /** ProxyConnectionInfo subnetUri. */ + public subnetUri: string; + + /** ProxyConnectionInfo networkUri. */ + public networkUri: string; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProxyConnectionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Verifies a ProxyConnectionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProxyConnectionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @param message ProxyConnectionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerBackendInfo. */ + interface ILoadBalancerBackendInfo { + + /** LoadBalancerBackendInfo name */ + name?: (string|null); + + /** LoadBalancerBackendInfo instanceUri */ + instanceUri?: (string|null); + + /** LoadBalancerBackendInfo backendServiceUri */ + backendServiceUri?: (string|null); + + /** LoadBalancerBackendInfo instanceGroupUri */ + instanceGroupUri?: (string|null); + + /** LoadBalancerBackendInfo networkEndpointGroupUri */ + networkEndpointGroupUri?: (string|null); + + /** LoadBalancerBackendInfo backendBucketUri */ + backendBucketUri?: (string|null); + + /** LoadBalancerBackendInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** LoadBalancerBackendInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + + /** LoadBalancerBackendInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ + healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); + } + + /** Represents a LoadBalancerBackendInfo. */ + class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { + + /** + * Constructs a new LoadBalancerBackendInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo); + + /** LoadBalancerBackendInfo name. */ + public name: string; + + /** LoadBalancerBackendInfo instanceUri. */ + public instanceUri: string; + + /** LoadBalancerBackendInfo backendServiceUri. */ + public backendServiceUri: string; + + /** LoadBalancerBackendInfo instanceGroupUri. */ + public instanceGroupUri: string; + + /** LoadBalancerBackendInfo networkEndpointGroupUri. */ + public networkEndpointGroupUri: string; + + /** LoadBalancerBackendInfo backendBucketUri. */ + public backendBucketUri: string; + + /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** LoadBalancerBackendInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** LoadBalancerBackendInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ + public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackendInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackendInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @param message LoadBalancerBackendInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackendInfo { + + /** HealthCheckFirewallsConfigState enum. */ + enum HealthCheckFirewallsConfigState { + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, + FIREWALLS_CONFIGURED = 1, + FIREWALLS_PARTIALLY_CONFIGURED = 2, + FIREWALLS_NOT_CONFIGURED = 3, + FIREWALLS_UNSUPPORTED = 4 + } + } + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + HTTPS_ADVANCED_LOAD_BALANCER = 1, + HTTPS_LOAD_BALANCER = 2, + REGIONAL_HTTPS_LOAD_BALANCER = 3, + INTERNAL_HTTPS_LOAD_BALANCER = 4, + SSL_PROXY_LOAD_BALANCER = 5, + TCP_PROXY_LOAD_BALANCER = 6, + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, + NETWORK_LOAD_BALANCER = 8, + LEGACY_NETWORK_LOAD_BALANCER = 9, + TCP_UDP_INTERNAL_LOAD_BALANCER = 10 + } + + /** Properties of a StorageBucketInfo. */ + interface IStorageBucketInfo { + + /** StorageBucketInfo bucket */ + bucket?: (string|null); + } + + /** Represents a StorageBucketInfo. */ + class StorageBucketInfo implements IStorageBucketInfo { + + /** + * Constructs a new StorageBucketInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo); + + /** StorageBucketInfo bucket. */ + public bucket: string; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageBucketInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Verifies a StorageBucketInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageBucketInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @param message StorageBucketInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageBucketInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageBucketInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerlessNegInfo. */ + interface IServerlessNegInfo { + + /** ServerlessNegInfo negUri */ + negUri?: (string|null); + } + + /** Represents a ServerlessNegInfo. */ + class ServerlessNegInfo implements IServerlessNegInfo { + + /** + * Constructs a new ServerlessNegInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo); + + /** ServerlessNegInfo negUri. */ + public negUri: string; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerlessNegInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Verifies a ServerlessNegInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerlessNegInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @param message ServerlessNegInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerlessNegInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ReachabilityService */ + class ReachabilityService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback): void; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @returns Promise + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): Promise; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConnectivityTest + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback): void; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @returns Promise + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): Promise; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback): void; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @returns Promise + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): Promise; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback): void; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @returns Promise + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): Promise; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback): void; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @returns Promise + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): Promise; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback): void; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @returns Promise + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): Promise; + } + + namespace ReachabilityService { + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. + * @param error Error, if any + * @param [response] ListConnectivityTestsResponse + */ + type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. + * @param error Error, if any + * @param [response] ConnectivityTest + */ + type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ConnectivityTest) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListConnectivityTestsRequest. */ + interface IListConnectivityTestsRequest { + + /** ListConnectivityTestsRequest parent */ + parent?: (string|null); + + /** ListConnectivityTestsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectivityTestsRequest pageToken */ + pageToken?: (string|null); + + /** ListConnectivityTestsRequest filter */ + filter?: (string|null); + + /** ListConnectivityTestsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListConnectivityTestsRequest. */ + class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { + + /** + * Constructs a new ListConnectivityTestsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest); + + /** ListConnectivityTestsRequest parent. */ + public parent: string; + + /** ListConnectivityTestsRequest pageSize. */ + public pageSize: number; + + /** ListConnectivityTestsRequest pageToken. */ + public pageToken: string; + + /** ListConnectivityTestsRequest filter. */ + public filter: string; + + /** ListConnectivityTestsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @param message ListConnectivityTestsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectivityTestsResponse. */ + interface IListConnectivityTestsResponse { + + /** ListConnectivityTestsResponse resources */ + resources?: (google.cloud.networkmanagement.v1.IConnectivityTest[]|null); + + /** ListConnectivityTestsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListConnectivityTestsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListConnectivityTestsResponse. */ + class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { + + /** + * Constructs a new ListConnectivityTestsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse); + + /** ListConnectivityTestsResponse resources. */ + public resources: google.cloud.networkmanagement.v1.IConnectivityTest[]; + + /** ListConnectivityTestsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListConnectivityTestsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsResponse instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @param message ListConnectivityTestsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectivityTestRequest. */ + interface IGetConnectivityTestRequest { + + /** GetConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectivityTestRequest. */ + class GetConnectivityTestRequest implements IGetConnectivityTestRequest { + + /** + * Constructs a new GetConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest); + + /** GetConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Verifies a GetConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @param message GetConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectivityTestRequest. */ + interface ICreateConnectivityTestRequest { + + /** CreateConnectivityTestRequest parent */ + parent?: (string|null); + + /** CreateConnectivityTestRequest testId */ + testId?: (string|null); + + /** CreateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + } + + /** Represents a CreateConnectivityTestRequest. */ + class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { + + /** + * Constructs a new CreateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest); + + /** CreateConnectivityTestRequest parent. */ + public parent: string; + + /** CreateConnectivityTestRequest testId. */ + public testId: string; + + /** CreateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message CreateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectivityTestRequest. */ + interface IUpdateConnectivityTestRequest { + + /** UpdateConnectivityTestRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + } + + /** Represents an UpdateConnectivityTestRequest. */ + class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest); + + /** UpdateConnectivityTestRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message UpdateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectivityTestRequest. */ + interface IDeleteConnectivityTestRequest { + + /** DeleteConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConnectivityTestRequest. */ + class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest); + + /** DeleteConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @param message DeleteConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RerunConnectivityTestRequest. */ + interface IRerunConnectivityTestRequest { + + /** RerunConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a RerunConnectivityTestRequest. */ + class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { + + /** + * Constructs a new RerunConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest); + + /** RerunConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RerunConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RerunConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @param message RerunConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RerunConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @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 statusDetail */ + statusDetail?: (string|null); + + /** OperationMetadata cancelRequested */ + cancelRequested?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.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 statusDetail. */ + public statusDetail: string; + + /** OperationMetadata cancelRequested. */ + public cancelRequested: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IOperationMetadata): google.cloud.networkmanagement.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a 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 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 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of 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-networkmanagement/v1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js new file mode 100644 index 00000000000..7d4e525beb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js @@ -0,0 +1,40420 @@ +// 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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.networkmanagement = (function() { + + /** + * Namespace networkmanagement. + * @memberof google.cloud + * @namespace + */ + var networkmanagement = {}; + + networkmanagement.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.networkmanagement + * @namespace + */ + var v1 = {}; + + v1.ConnectivityTest = (function() { + + /** + * Properties of a ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IConnectivityTest + * @property {string|null} [name] ConnectivityTest name + * @property {string|null} [description] ConnectivityTest description + * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [source] ConnectivityTest source + * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [destination] ConnectivityTest destination + * @property {string|null} [protocol] ConnectivityTest protocol + * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects + * @property {string|null} [displayName] ConnectivityTest displayName + * @property {Object.|null} [labels] ConnectivityTest labels + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime + * @property {google.cloud.networkmanagement.v1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails + * @property {google.cloud.networkmanagement.v1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails + * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks + */ + + /** + * Constructs a new ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ConnectivityTest. + * @implements IConnectivityTest + * @constructor + * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set + */ + function ConnectivityTest(properties) { + this.relatedProjects = []; + 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]]; + } + + /** + * ConnectivityTest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.name = ""; + + /** + * ConnectivityTest description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.description = ""; + + /** + * ConnectivityTest source. + * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} source + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.source = null; + + /** + * ConnectivityTest destination. + * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} destination + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.destination = null; + + /** + * ConnectivityTest protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.protocol = ""; + + /** + * ConnectivityTest relatedProjects. + * @member {Array.} relatedProjects + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.relatedProjects = $util.emptyArray; + + /** + * ConnectivityTest displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.displayName = ""; + + /** + * ConnectivityTest labels. + * @member {Object.} labels + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.labels = $util.emptyObject; + + /** + * ConnectivityTest createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.createTime = null; + + /** + * ConnectivityTest updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.updateTime = null; + + /** + * ConnectivityTest reachabilityDetails. + * @member {google.cloud.networkmanagement.v1.IReachabilityDetails|null|undefined} reachabilityDetails + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.reachabilityDetails = null; + + /** + * ConnectivityTest probingDetails. + * @member {google.cloud.networkmanagement.v1.IProbingDetails|null|undefined} probingDetails + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.probingDetails = null; + + /** + * ConnectivityTest bypassFirewallChecks. + * @member {boolean} bypassFirewallChecks + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.bypassFirewallChecks = false; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest instance + */ + ConnectivityTest.create = function create(properties) { + return new ConnectivityTest(properties); + }; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encode = function encode(message, writer) { + if (!writer) + 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.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); + if (message.relatedProjects != null && message.relatedProjects.length) + for (var i = 0; i < message.relatedProjects.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) + $root.google.cloud.networkmanagement.v1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) + $root.google.cloud.networkmanagement.v1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); + return writer; + }; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 5: { + message.protocol = reader.string(); + break; + } + case 6: { + if (!(message.relatedProjects && message.relatedProjects.length)) + message.relatedProjects = []; + message.relatedProjects.push(reader.string()); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 8: { + 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 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.decode(reader, reader.uint32()); + break; + } + case 17: { + message.bypassFirewallChecks = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectivityTest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectivityTest.verify = function verify(message) { + if (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.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.source); + if (error) + return "source." + error; + } + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.destination); + if (error) + return "destination." + error; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { + if (!Array.isArray(message.relatedProjects)) + return "relatedProjects: array expected"; + for (var i = 0; i < message.relatedProjects.length; ++i) + if (!$util.isString(message.relatedProjects[i])) + return "relatedProjects: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { + var error = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.verify(message.reachabilityDetails); + if (error) + return "reachabilityDetails." + error; + } + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { + var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.verify(message.probingDetails); + if (error) + return "probingDetails." + error; + } + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + if (typeof message.bypassFirewallChecks !== "boolean") + return "bypassFirewallChecks: boolean expected"; + return null; + }; + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest + */ + ConnectivityTest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ConnectivityTest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.source: object expected"); + message.source = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.source); + } + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.destination: object expected"); + message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.destination); + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.relatedProjects) { + if (!Array.isArray(object.relatedProjects)) + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.relatedProjects: array expected"); + message.relatedProjects = []; + for (var i = 0; i < object.relatedProjects.length; ++i) + message.relatedProjects[i] = String(object.relatedProjects[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.reachabilityDetails != null) { + if (typeof object.reachabilityDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.reachabilityDetails: object expected"); + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.fromObject(object.reachabilityDetails); + } + if (object.probingDetails != null) { + if (typeof object.probingDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.probingDetails: object expected"); + message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.fromObject(object.probingDetails); + } + if (object.bypassFirewallChecks != null) + message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); + return message; + }; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} message ConnectivityTest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectivityTest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedProjects = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.source = null; + object.destination = null; + object.protocol = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.reachabilityDetails = null; + object.probingDetails = null; + object.bypassFirewallChecks = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.source, options); + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.destination, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.relatedProjects && message.relatedProjects.length) { + object.relatedProjects = []; + for (var j = 0; j < message.relatedProjects.length; ++j) + object.relatedProjects[j] = message.relatedProjects[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) + object.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.toObject(message.reachabilityDetails, options); + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) + object.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.toObject(message.probingDetails, options); + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + object.bypassFirewallChecks = message.bypassFirewallChecks; + return object; + }; + + /** + * Converts this ConnectivityTest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + * @returns {Object.} JSON object + */ + ConnectivityTest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectivityTest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ConnectivityTest"; + }; + + return ConnectivityTest; + })(); + + v1.Endpoint = (function() { + + /** + * Properties of an Endpoint. + * @memberof google.cloud.networkmanagement.v1 + * @interface IEndpoint + * @property {string|null} [ipAddress] Endpoint ipAddress + * @property {number|null} [port] Endpoint port + * @property {string|null} [instance] Endpoint instance + * @property {string|null} [forwardingRule] Endpoint forwardingRule + * @property {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget + * @property {string|null} [loadBalancerId] Endpoint loadBalancerId + * @property {google.cloud.networkmanagement.v1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType + * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster + * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance + * @property {string|null} [redisInstance] Endpoint redisInstance + * @property {string|null} [redisCluster] Endpoint redisCluster + * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction + * @property {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion + * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision + * @property {string|null} [network] Endpoint network + * @property {google.cloud.networkmanagement.v1.Endpoint.NetworkType|null} [networkType] Endpoint networkType + * @property {string|null} [projectId] Endpoint projectId + */ + + /** + * Constructs a new Endpoint. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an Endpoint. + * @implements IEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set + */ + function Endpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Endpoint ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.ipAddress = ""; + + /** + * Endpoint port. + * @member {number} port + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.port = 0; + + /** + * Endpoint instance. + * @member {string} instance + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.instance = ""; + + /** + * Endpoint forwardingRule. + * @member {string} forwardingRule + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRule = ""; + + /** + * Endpoint forwardingRuleTarget. + * @member {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRuleTarget = null; + + /** + * Endpoint loadBalancerId. + * @member {string|null|undefined} loadBalancerId + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerId = null; + + /** + * Endpoint loadBalancerType. + * @member {google.cloud.networkmanagement.v1.LoadBalancerType|null|undefined} loadBalancerType + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerType = null; + + /** + * Endpoint gkeMasterCluster. + * @member {string} gkeMasterCluster + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.gkeMasterCluster = ""; + + /** + * Endpoint cloudSqlInstance. + * @member {string} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.cloudSqlInstance = ""; + + /** + * Endpoint redisInstance. + * @member {string} redisInstance + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.redisInstance = ""; + + /** + * Endpoint redisCluster. + * @member {string} redisCluster + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.redisCluster = ""; + + /** + * Endpoint cloudFunction. + * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.cloudFunction = null; + + /** + * Endpoint appEngineVersion. + * @member {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.appEngineVersion = null; + + /** + * Endpoint cloudRunRevision. + * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.cloudRunRevision = null; + + /** + * Endpoint network. + * @member {string} network + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.network = ""; + + /** + * Endpoint networkType. + * @member {google.cloud.networkmanagement.v1.Endpoint.NetworkType} networkType + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.networkType = 0; + + /** + * Endpoint projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.projectId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Endpoint _forwardingRuleTarget. + * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { + get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerId. + * @member {"loadBalancerId"|undefined} _loadBalancerId + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerType. + * @member {"loadBalancerType"|undefined} _loadBalancerType + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Endpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint instance + */ + Endpoint.create = function create(properties) { + return new Endpoint(properties); + }; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); + if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); + if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); + if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); + return writer; + }; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipAddress = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.instance = reader.string(); + break; + } + case 13: { + message.forwardingRule = reader.string(); + break; + } + case 14: { + message.forwardingRuleTarget = reader.int32(); + break; + } + case 15: { + message.loadBalancerId = reader.string(); + break; + } + case 16: { + message.loadBalancerType = reader.int32(); + break; + } + case 7: { + message.gkeMasterCluster = reader.string(); + break; + } + case 8: { + message.cloudSqlInstance = reader.string(); + break; + } + case 17: { + message.redisInstance = reader.string(); + break; + } + case 18: { + message.redisCluster = reader.string(); + break; + } + case 10: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); + break; + } + case 11: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.network = reader.string(); + break; + } + case 5: { + message.networkType = reader.int32(); + break; + } + case 6: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + if (!$util.isString(message.forwardingRule)) + return "forwardingRule: string expected"; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + properties._forwardingRuleTarget = 1; + switch (message.forwardingRuleTarget) { + default: + return "forwardingRuleTarget: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + properties._loadBalancerId = 1; + if (!$util.isString(message.loadBalancerId)) + return "loadBalancerId: string expected"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + properties._loadBalancerType = 1; + switch (message.loadBalancerType) { + default: + return "loadBalancerType: 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: + break; + } + } + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + if (!$util.isString(message.gkeMasterCluster)) + return "gkeMasterCluster: string expected"; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + if (!$util.isString(message.cloudSqlInstance)) + return "cloudSqlInstance: string expected"; + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + if (!$util.isString(message.redisInstance)) + return "redisInstance: string expected"; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + if (!$util.isString(message.redisCluster)) + return "redisCluster: string expected"; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.networkType != null && message.hasOwnProperty("networkType")) + switch (message.networkType) { + default: + return "networkType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint + */ + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint(); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.port != null) + message.port = object.port | 0; + if (object.instance != null) + message.instance = String(object.instance); + if (object.forwardingRule != null) + message.forwardingRule = String(object.forwardingRule); + switch (object.forwardingRuleTarget) { + default: + if (typeof object.forwardingRuleTarget === "number") { + message.forwardingRuleTarget = object.forwardingRuleTarget; + break; + } + break; + case "FORWARDING_RULE_TARGET_UNSPECIFIED": + case 0: + message.forwardingRuleTarget = 0; + break; + case "INSTANCE": + case 1: + message.forwardingRuleTarget = 1; + break; + case "LOAD_BALANCER": + case 2: + message.forwardingRuleTarget = 2; + break; + case "VPN_GATEWAY": + case 3: + message.forwardingRuleTarget = 3; + break; + case "PSC": + case 4: + message.forwardingRuleTarget = 4; + break; + } + if (object.loadBalancerId != null) + message.loadBalancerId = String(object.loadBalancerId); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "HTTPS_ADVANCED_LOAD_BALANCER": + case 1: + message.loadBalancerType = 1; + break; + case "HTTPS_LOAD_BALANCER": + case 2: + message.loadBalancerType = 2; + break; + case "REGIONAL_HTTPS_LOAD_BALANCER": + case 3: + message.loadBalancerType = 3; + break; + case "INTERNAL_HTTPS_LOAD_BALANCER": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY_LOAD_BALANCER": + case 5: + message.loadBalancerType = 5; + break; + case "TCP_PROXY_LOAD_BALANCER": + case 6: + message.loadBalancerType = 6; + break; + case "INTERNAL_TCP_PROXY_LOAD_BALANCER": + case 7: + message.loadBalancerType = 7; + break; + case "NETWORK_LOAD_BALANCER": + case 8: + message.loadBalancerType = 8; + break; + case "LEGACY_NETWORK_LOAD_BALANCER": + case 9: + message.loadBalancerType = 9; + break; + case "TCP_UDP_INTERNAL_LOAD_BALANCER": + case 10: + message.loadBalancerType = 10; + break; + } + if (object.gkeMasterCluster != null) + message.gkeMasterCluster = String(object.gkeMasterCluster); + if (object.cloudSqlInstance != null) + message.cloudSqlInstance = String(object.cloudSqlInstance); + if (object.redisInstance != null) + message.redisInstance = String(object.redisInstance); + if (object.redisCluster != null) + message.redisCluster = String(object.redisCluster); + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); + } + if (object.network != null) + message.network = String(object.network); + switch (object.networkType) { + default: + if (typeof object.networkType === "number") { + message.networkType = object.networkType; + break; + } + break; + case "NETWORK_TYPE_UNSPECIFIED": + case 0: + message.networkType = 0; + break; + case "GCP_NETWORK": + case 1: + message.networkType = 1; + break; + case "NON_GCP_NETWORK": + case 2: + message.networkType = 2; + break; + } + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint} message Endpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ipAddress = ""; + object.port = 0; + object.instance = ""; + object.network = ""; + object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; + object.projectId = ""; + object.gkeMasterCluster = ""; + object.cloudSqlInstance = ""; + object.cloudFunction = null; + object.appEngineVersion = null; + object.cloudRunRevision = null; + object.forwardingRule = ""; + object.redisInstance = ""; + object.redisCluster = ""; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.networkType != null && message.hasOwnProperty("networkType")) + object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] : message.networkType; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + object.gkeMasterCluster = message.gkeMasterCluster; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + object.cloudSqlInstance = message.cloudSqlInstance; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) + object.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) + object.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + object.forwardingRule = message.forwardingRule; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; + if (options.oneofs) + object._forwardingRuleTarget = "forwardingRuleTarget"; + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + object.loadBalancerId = message.loadBalancerId; + if (options.oneofs) + object._loadBalancerId = "loadBalancerId"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (options.oneofs) + object._loadBalancerType = "loadBalancerType"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + object.redisInstance = message.redisInstance; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + object.redisCluster = message.redisCluster; + return object; + }; + + /** + * Converts this Endpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + * @returns {Object.} JSON object + */ + Endpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Endpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint"; + }; + + /** + * NetworkType enum. + * @name google.cloud.networkmanagement.v1.Endpoint.NetworkType + * @enum {number} + * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value + * @property {number} GCP_NETWORK=1 GCP_NETWORK value + * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value + */ + Endpoint.NetworkType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCP_NETWORK"] = 1; + values[valuesById[2] = "NON_GCP_NETWORK"] = 2; + return values; + })(); + + /** + * ForwardingRuleTarget enum. + * @name google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget + * @enum {number} + * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value + * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value + * @property {number} PSC=4 PSC value + */ + Endpoint.ForwardingRuleTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "LOAD_BALANCER"] = 2; + values[valuesById[3] = "VPN_GATEWAY"] = 3; + values[valuesById[4] = "PSC"] = 4; + return values; + })(); + + Endpoint.CloudFunctionEndpoint = (function() { + + /** + * Properties of a CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @interface ICloudFunctionEndpoint + * @property {string|null} [uri] CloudFunctionEndpoint uri + */ + + /** + * Constructs a new CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @classdesc Represents a CloudFunctionEndpoint. + * @implements ICloudFunctionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + */ + function CloudFunctionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @instance + */ + CloudFunctionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance + */ + CloudFunctionEndpoint.create = function create(properties) { + return new CloudFunctionEndpoint(properties); + }; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + */ + CloudFunctionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint"; + }; + + return CloudFunctionEndpoint; + })(); + + Endpoint.AppEngineVersionEndpoint = (function() { + + /** + * Properties of an AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @interface IAppEngineVersionEndpoint + * @property {string|null} [uri] AppEngineVersionEndpoint uri + */ + + /** + * Constructs a new AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @classdesc Represents an AppEngineVersionEndpoint. + * @implements IAppEngineVersionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + */ + function AppEngineVersionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @instance + */ + AppEngineVersionEndpoint.prototype.uri = ""; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance + */ + AppEngineVersionEndpoint.create = function create(properties) { + return new AppEngineVersionEndpoint(properties); + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + */ + AppEngineVersionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint"; + }; + + return AppEngineVersionEndpoint; + })(); + + Endpoint.CloudRunRevisionEndpoint = (function() { + + /** + * Properties of a CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @interface ICloudRunRevisionEndpoint + * @property {string|null} [uri] CloudRunRevisionEndpoint uri + */ + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @classdesc Represents a CloudRunRevisionEndpoint. + * @implements ICloudRunRevisionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + */ + function CloudRunRevisionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @instance + */ + CloudRunRevisionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance + */ + CloudRunRevisionEndpoint.create = function create(properties) { + return new CloudRunRevisionEndpoint(properties); + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + */ + CloudRunRevisionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint"; + }; + + return CloudRunRevisionEndpoint; + })(); + + return Endpoint; + })(); + + v1.ReachabilityDetails = (function() { + + /** + * Properties of a ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1 + * @interface IReachabilityDetails + * @property {google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error + * @property {Array.|null} [traces] ReachabilityDetails traces + */ + + /** + * Constructs a new ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ReachabilityDetails. + * @implements IReachabilityDetails + * @constructor + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set + */ + function ReachabilityDetails(properties) { + this.traces = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReachabilityDetails result. + * @member {google.cloud.networkmanagement.v1.ReachabilityDetails.Result} result + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.result = 0; + + /** + * ReachabilityDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.verifyTime = null; + + /** + * ReachabilityDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.error = null; + + /** + * ReachabilityDetails traces. + * @member {Array.} traces + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.traces = $util.emptyArray; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails instance + */ + ReachabilityDetails.create = function create(properties) { + return new ReachabilityDetails(properties); + }; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.traces != null && message.traces.length) + for (var i = 0; i < message.traces.length; ++i) + $root.google.cloud.networkmanagement.v1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.traces && message.traces.length)) + message.traces = []; + message.traces.push($root.google.cloud.networkmanagement.v1.Trace.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReachabilityDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReachabilityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.traces != null && message.hasOwnProperty("traces")) { + if (!Array.isArray(message.traces)) + return "traces: array expected"; + for (var i = 0; i < message.traces.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.Trace.verify(message.traces[i]); + if (error) + return "traces." + error; + } + } + return null; + }; + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails + */ + ReachabilityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ReachabilityDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "AMBIGUOUS": + case 4: + message.result = 4; + break; + case "UNDETERMINED": + case 5: + message.result = 5; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.traces) { + if (!Array.isArray(object.traces)) + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: array expected"); + message.traces = []; + for (var i = 0; i < object.traces.length; ++i) { + if (typeof object.traces[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: object expected"); + message.traces[i] = $root.google.cloud.networkmanagement.v1.Trace.fromObject(object.traces[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.ReachabilityDetails} message ReachabilityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReachabilityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.traces = []; + if (options.defaults) { + object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.traces && message.traces.length) { + object.traces = []; + for (var j = 0; j < message.traces.length; ++j) + object.traces[j] = $root.google.cloud.networkmanagement.v1.Trace.toObject(message.traces[j], options); + } + return object; + }; + + /** + * Converts this ReachabilityDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + * @returns {Object.} JSON object + */ + ReachabilityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReachabilityDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ReachabilityDetails"; + }; + + /** + * Result enum. + * @name google.cloud.networkmanagement.v1.ReachabilityDetails.Result + * @enum {number} + * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} AMBIGUOUS=4 AMBIGUOUS value + * @property {number} UNDETERMINED=5 UNDETERMINED value + */ + ReachabilityDetails.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[4] = "AMBIGUOUS"] = 4; + values[valuesById[5] = "UNDETERMINED"] = 5; + return values; + })(); + + return ReachabilityDetails; + })(); + + v1.LatencyPercentile = (function() { + + /** + * Properties of a LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILatencyPercentile + * @property {number|null} [percent] LatencyPercentile percent + * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros + */ + + /** + * Constructs a new LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LatencyPercentile. + * @implements ILatencyPercentile + * @constructor + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set + */ + function LatencyPercentile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyPercentile percent. + * @member {number} percent + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.percent = 0; + + /** + * LatencyPercentile latencyMicros. + * @member {number|Long} latencyMicros + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile instance + */ + LatencyPercentile.create = function create(properties) { + return new LatencyPercentile(properties); + }; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); + if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); + return writer; + }; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.percent = reader.int32(); + break; + } + case 2: { + message.latencyMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyPercentile message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyPercentile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.percent != null && message.hasOwnProperty("percent")) + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) + return "latencyMicros: integer|Long expected"; + return null; + }; + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile + */ + LatencyPercentile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyPercentile) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); + if (object.percent != null) + message.percent = object.percent | 0; + if (object.latencyMicros != null) + if ($util.Long) + (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; + else if (typeof object.latencyMicros === "string") + message.latencyMicros = parseInt(object.latencyMicros, 10); + else if (typeof object.latencyMicros === "number") + message.latencyMicros = object.latencyMicros; + else if (typeof object.latencyMicros === "object") + message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.LatencyPercentile} message LatencyPercentile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyPercentile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.percent = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.latencyMicros = options.longs === String ? "0" : 0; + } + if (message.percent != null && message.hasOwnProperty("percent")) + object.percent = message.percent; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (typeof message.latencyMicros === "number") + object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; + else + object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; + return object; + }; + + /** + * Converts this LatencyPercentile to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @instance + * @returns {Object.} JSON object + */ + LatencyPercentile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyPercentile + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyPercentile"; + }; + + return LatencyPercentile; + })(); + + v1.LatencyDistribution = (function() { + + /** + * Properties of a LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILatencyDistribution + * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles + */ + + /** + * Constructs a new LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LatencyDistribution. + * @implements ILatencyDistribution + * @constructor + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set + */ + function LatencyDistribution(properties) { + this.latencyPercentiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyDistribution latencyPercentiles. + * @member {Array.} latencyPercentiles + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @instance + */ + LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution instance + */ + LatencyDistribution.create = function create(properties) { + return new LatencyDistribution(properties); + }; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latencyPercentiles != null && message.latencyPercentiles.length) + for (var i = 0; i < message.latencyPercentiles.length; ++i) + $root.google.cloud.networkmanagement.v1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.latencyPercentiles && message.latencyPercentiles.length)) + message.latencyPercentiles = []; + message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1.LatencyPercentile.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyDistribution message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyDistribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { + if (!Array.isArray(message.latencyPercentiles)) + return "latencyPercentiles: array expected"; + for (var i = 0; i < message.latencyPercentiles.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.LatencyPercentile.verify(message.latencyPercentiles[i]); + if (error) + return "latencyPercentiles." + error; + } + } + return null; + }; + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution + */ + LatencyDistribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyDistribution) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); + if (object.latencyPercentiles) { + if (!Array.isArray(object.latencyPercentiles)) + throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: array expected"); + message.latencyPercentiles = []; + for (var i = 0; i < object.latencyPercentiles.length; ++i) { + if (typeof object.latencyPercentiles[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: object expected"); + message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.LatencyDistribution} message LatencyDistribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyDistribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.latencyPercentiles = []; + if (message.latencyPercentiles && message.latencyPercentiles.length) { + object.latencyPercentiles = []; + for (var j = 0; j < message.latencyPercentiles.length; ++j) + object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); + } + return object; + }; + + /** + * Converts this LatencyDistribution to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @instance + * @returns {Object.} JSON object + */ + LatencyDistribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyDistribution + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyDistribution"; + }; + + return LatencyDistribution; + })(); + + v1.ProbingDetails = (function() { + + /** + * Properties of a ProbingDetails. + * @memberof google.cloud.networkmanagement.v1 + * @interface IProbingDetails + * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ProbingDetails error + * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause + * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount + * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount + * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo + * @property {google.cloud.networkmanagement.v1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency + * @property {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation + */ + + /** + * Constructs a new ProbingDetails. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ProbingDetails. + * @implements IProbingDetails + * @constructor + * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set + */ + function ProbingDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProbingDetails result. + * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult} result + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.result = 0; + + /** + * ProbingDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.verifyTime = null; + + /** + * ProbingDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.error = null; + + /** + * ProbingDetails abortCause. + * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause} abortCause + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.abortCause = 0; + + /** + * ProbingDetails sentProbeCount. + * @member {number} sentProbeCount + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.sentProbeCount = 0; + + /** + * ProbingDetails successfulProbeCount. + * @member {number} successfulProbeCount + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.successfulProbeCount = 0; + + /** + * ProbingDetails endpointInfo. + * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.endpointInfo = null; + + /** + * ProbingDetails probingLatency. + * @member {google.cloud.networkmanagement.v1.ILatencyDistribution|null|undefined} probingLatency + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.probingLatency = null; + + /** + * ProbingDetails destinationEgressLocation. + * @member {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.destinationEgressLocation = null; + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails instance + */ + ProbingDetails.create = function create(properties) { + return new ProbingDetails(properties); + }; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); + if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); + if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) + $root.google.cloud.networkmanagement.v1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) + $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.abortCause = reader.int32(); + break; + } + case 5: { + message.sentProbeCount = reader.int32(); + break; + } + case 6: { + message.successfulProbeCount = reader.int32(); + break; + } + case 7: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.decode(reader, reader.uint32()); + break; + } + case 9: { + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProbingDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProbingDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + switch (message.abortCause) { + default: + return "abortCause: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + if (!$util.isInteger(message.sentProbeCount)) + return "sentProbeCount: integer expected"; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + if (!$util.isInteger(message.successfulProbeCount)) + return "successfulProbeCount: integer expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { + var error = $root.google.cloud.networkmanagement.v1.LatencyDistribution.verify(message.probingLatency); + if (error) + return "probingLatency." + error; + } + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { + var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); + if (error) + return "destinationEgressLocation." + error; + } + return null; + }; + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails + */ + ProbingDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "PROBING_RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "REACHABILITY_INCONSISTENT": + case 3: + message.result = 3; + break; + case "UNDETERMINED": + case 4: + message.result = 4; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + switch (object.abortCause) { + default: + if (typeof object.abortCause === "number") { + message.abortCause = object.abortCause; + break; + } + break; + case "PROBING_ABORT_CAUSE_UNSPECIFIED": + case 0: + message.abortCause = 0; + break; + case "PERMISSION_DENIED": + case 1: + message.abortCause = 1; + break; + case "NO_SOURCE_LOCATION": + case 2: + message.abortCause = 2; + break; + } + if (object.sentProbeCount != null) + message.sentProbeCount = object.sentProbeCount | 0; + if (object.successfulProbeCount != null) + message.successfulProbeCount = object.successfulProbeCount | 0; + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.probingLatency != null) { + if (typeof object.probingLatency !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.probingLatency: object expected"); + message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.fromObject(object.probingLatency); + } + if (object.destinationEgressLocation != null) { + if (typeof object.destinationEgressLocation !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.destinationEgressLocation: object expected"); + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); + } + return message; + }; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails} message ProbingDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProbingDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; + object.sentProbeCount = 0; + object.successfulProbeCount = 0; + object.endpointInfo = null; + object.probingLatency = null; + object.destinationEgressLocation = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + object.sentProbeCount = message.sentProbeCount; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + object.successfulProbeCount = message.successfulProbeCount; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) + object.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.toObject(message.probingLatency, options); + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) + object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); + return object; + }; + + /** + * Converts this ProbingDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + * @returns {Object.} JSON object + */ + ProbingDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProbingDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails"; + }; + + /** + * ProbingResult enum. + * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult + * @enum {number} + * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value + * @property {number} UNDETERMINED=4 UNDETERMINED value + */ + ProbingDetails.ProbingResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; + values[valuesById[4] = "UNDETERMINED"] = 4; + return values; + })(); + + /** + * ProbingAbortCause enum. + * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause + * @enum {number} + * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value + * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value + * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value + */ + ProbingDetails.ProbingAbortCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PERMISSION_DENIED"] = 1; + values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; + return values; + })(); + + ProbingDetails.EdgeLocation = (function() { + + /** + * Properties of an EdgeLocation. + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @interface IEdgeLocation + * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea + */ + + /** + * Constructs a new EdgeLocation. + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @classdesc Represents an EdgeLocation. + * @implements IEdgeLocation + * @constructor + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + */ + function EdgeLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EdgeLocation metropolitanArea. + * @member {string} metropolitanArea + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @instance + */ + EdgeLocation.prototype.metropolitanArea = ""; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation instance + */ + EdgeLocation.create = function create(properties) { + return new EdgeLocation(properties); + }; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); + return writer; + }; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metropolitanArea = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EdgeLocation message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EdgeLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + if (!$util.isString(message.metropolitanArea)) + return "metropolitanArea: string expected"; + return null; + }; + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation + */ + EdgeLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); + if (object.metropolitanArea != null) + message.metropolitanArea = String(object.metropolitanArea); + return message; + }; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} message EdgeLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EdgeLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metropolitanArea = ""; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + object.metropolitanArea = message.metropolitanArea; + return object; + }; + + /** + * Converts this EdgeLocation to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @instance + * @returns {Object.} JSON object + */ + EdgeLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EdgeLocation + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation"; + }; + + return EdgeLocation; + })(); + + return ProbingDetails; + })(); + + v1.Trace = (function() { + + /** + * Properties of a Trace. + * @memberof google.cloud.networkmanagement.v1 + * @interface ITrace + * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo + * @property {Array.|null} [steps] Trace steps + * @property {number|null} [forwardTraceId] Trace forwardTraceId + */ + + /** + * Constructs a new Trace. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a Trace. + * @implements ITrace + * @constructor + * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set + */ + function Trace(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trace endpointInfo. + * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + */ + Trace.prototype.endpointInfo = null; + + /** + * Trace steps. + * @member {Array.} steps + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + */ + Trace.prototype.steps = $util.emptyArray; + + /** + * Trace forwardTraceId. + * @member {number} forwardTraceId + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + */ + Trace.prototype.forwardTraceId = 0; + + /** + * Creates a new Trace instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Trace} Trace instance + */ + Trace.create = function create(properties) { + return new Trace(properties); + }; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.cloud.networkmanagement.v1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); + return writer; + }; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Trace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.cloud.networkmanagement.v1.Step.decode(reader, reader.uint32())); + break; + } + case 4: { + message.forwardTraceId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trace message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + if (!$util.isInteger(message.forwardTraceId)) + return "forwardTraceId: integer expected"; + return null; + }; + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Trace} Trace + */ + Trace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Trace) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Trace(); + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Trace.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: object expected"); + message.steps[i] = $root.google.cloud.networkmanagement.v1.Step.fromObject(object.steps[i]); + } + } + if (object.forwardTraceId != null) + message.forwardTraceId = object.forwardTraceId | 0; + return message; + }; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.Trace} message Trace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) { + object.endpointInfo = null; + object.forwardTraceId = 0; + } + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.cloud.networkmanagement.v1.Step.toObject(message.steps[j], options); + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + object.forwardTraceId = message.forwardTraceId; + return object; + }; + + /** + * Converts this Trace to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + * @returns {Object.} JSON object + */ + Trace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trace + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Trace"; + }; + + return Trace; + })(); + + v1.Step = (function() { + + /** + * Properties of a Step. + * @memberof google.cloud.networkmanagement.v1 + * @interface IStep + * @property {string|null} [description] Step description + * @property {google.cloud.networkmanagement.v1.Step.State|null} [state] Step state + * @property {boolean|null} [causesDrop] Step causesDrop + * @property {string|null} [projectId] Step projectId + * @property {google.cloud.networkmanagement.v1.IInstanceInfo|null} [instance] Step instance + * @property {google.cloud.networkmanagement.v1.IFirewallInfo|null} [firewall] Step firewall + * @property {google.cloud.networkmanagement.v1.IRouteInfo|null} [route] Step route + * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpoint] Step endpoint + * @property {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null} [googleService] Step googleService + * @property {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule + * @property {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway + * @property {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel + * @property {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector + * @property {google.cloud.networkmanagement.v1.IDeliverInfo|null} [deliver] Step deliver + * @property {google.cloud.networkmanagement.v1.IForwardInfo|null} [forward] Step forward + * @property {google.cloud.networkmanagement.v1.IAbortInfo|null} [abort] Step abort + * @property {google.cloud.networkmanagement.v1.IDropInfo|null} [drop] Step drop + * @property {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer + * @property {google.cloud.networkmanagement.v1.INetworkInfo|null} [network] Step network + * @property {google.cloud.networkmanagement.v1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster + * @property {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance + * @property {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance + * @property {google.cloud.networkmanagement.v1.IRedisClusterInfo|null} [redisCluster] Step redisCluster + * @property {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction + * @property {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion + * @property {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision + * @property {google.cloud.networkmanagement.v1.INatInfo|null} [nat] Step nat + * @property {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection + * @property {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo + * @property {google.cloud.networkmanagement.v1.IStorageBucketInfo|null} [storageBucket] Step storageBucket + * @property {google.cloud.networkmanagement.v1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg + */ + + /** + * Constructs a new Step. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set + */ + function Step(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Step description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.description = ""; + + /** + * Step state. + * @member {google.cloud.networkmanagement.v1.Step.State} state + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.state = 0; + + /** + * Step causesDrop. + * @member {boolean} causesDrop + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.causesDrop = false; + + /** + * Step projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.projectId = ""; + + /** + * Step instance. + * @member {google.cloud.networkmanagement.v1.IInstanceInfo|null|undefined} instance + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.instance = null; + + /** + * Step firewall. + * @member {google.cloud.networkmanagement.v1.IFirewallInfo|null|undefined} firewall + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.firewall = null; + + /** + * Step route. + * @member {google.cloud.networkmanagement.v1.IRouteInfo|null|undefined} route + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.route = null; + + /** + * Step endpoint. + * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpoint + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.endpoint = null; + + /** + * Step googleService. + * @member {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null|undefined} googleService + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.googleService = null; + + /** + * Step forwardingRule. + * @member {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null|undefined} forwardingRule + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.forwardingRule = null; + + /** + * Step vpnGateway. + * @member {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null|undefined} vpnGateway + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.vpnGateway = null; + + /** + * Step vpnTunnel. + * @member {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null|undefined} vpnTunnel + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.vpnTunnel = null; + + /** + * Step vpcConnector. + * @member {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null|undefined} vpcConnector + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.vpcConnector = null; + + /** + * Step deliver. + * @member {google.cloud.networkmanagement.v1.IDeliverInfo|null|undefined} deliver + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.deliver = null; + + /** + * Step forward. + * @member {google.cloud.networkmanagement.v1.IForwardInfo|null|undefined} forward + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.forward = null; + + /** + * Step abort. + * @member {google.cloud.networkmanagement.v1.IAbortInfo|null|undefined} abort + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.abort = null; + + /** + * Step drop. + * @member {google.cloud.networkmanagement.v1.IDropInfo|null|undefined} drop + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.drop = null; + + /** + * Step loadBalancer. + * @member {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null|undefined} loadBalancer + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.loadBalancer = null; + + /** + * Step network. + * @member {google.cloud.networkmanagement.v1.INetworkInfo|null|undefined} network + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.network = null; + + /** + * Step gkeMaster. + * @member {google.cloud.networkmanagement.v1.IGKEMasterInfo|null|undefined} gkeMaster + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.gkeMaster = null; + + /** + * Step cloudSqlInstance. + * @member {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.cloudSqlInstance = null; + + /** + * Step redisInstance. + * @member {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null|undefined} redisInstance + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.redisInstance = null; + + /** + * Step redisCluster. + * @member {google.cloud.networkmanagement.v1.IRedisClusterInfo|null|undefined} redisCluster + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.redisCluster = null; + + /** + * Step cloudFunction. + * @member {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.cloudFunction = null; + + /** + * Step appEngineVersion. + * @member {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.appEngineVersion = null; + + /** + * Step cloudRunRevision. + * @member {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.cloudRunRevision = null; + + /** + * Step nat. + * @member {google.cloud.networkmanagement.v1.INatInfo|null|undefined} nat + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.nat = null; + + /** + * Step proxyConnection. + * @member {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null|undefined} proxyConnection + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.proxyConnection = null; + + /** + * Step loadBalancerBackendInfo. + * @member {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.loadBalancerBackendInfo = null; + + /** + * Step storageBucket. + * @member {google.cloud.networkmanagement.v1.IStorageBucketInfo|null|undefined} storageBucket + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.storageBucket = null; + + /** + * Step serverlessNeg. + * @member {google.cloud.networkmanagement.v1.IServerlessNegInfo|null|undefined} serverlessNeg + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.serverlessNeg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Step stepInfo. + * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Object.defineProperty(Step.prototype, "stepInfo", { + get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.networkmanagement.v1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) + $root.google.cloud.networkmanagement.v1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.route != null && Object.hasOwnProperty.call(message, "route")) + $root.google.cloud.networkmanagement.v1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) + $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) + $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) + $root.google.cloud.networkmanagement.v1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) + $root.google.cloud.networkmanagement.v1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) + $root.google.cloud.networkmanagement.v1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) + $root.google.cloud.networkmanagement.v1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) + $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + $root.google.cloud.networkmanagement.v1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) + $root.google.cloud.networkmanagement.v1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) + $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) + $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) + $root.google.cloud.networkmanagement.v1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) + $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) + $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + $root.google.cloud.networkmanagement.v1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) + $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + $root.google.cloud.networkmanagement.v1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.causesDrop = reader.bool(); + break; + } + case 4: { + message.projectId = reader.string(); + break; + } + case 5: { + message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 24: { + message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.decode(reader, reader.uint32()); + break; + } + case 9: { + message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.decode(reader, reader.uint32()); + break; + } + case 10: { + message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.decode(reader, reader.uint32()); + break; + } + case 11: { + message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.decode(reader, reader.uint32()); + break; + } + case 21: { + message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.decode(reader, reader.uint32()); + break; + } + case 16: { + message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.decode(reader, reader.uint32()); + break; + } + case 17: { + message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.decode(reader, reader.uint32()); + break; + } + case 18: { + message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.decode(reader, reader.uint32()); + break; + } + case 19: { + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 30: { + message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 31: { + message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.decode(reader, reader.uint32()); + break; + } + case 20: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.decode(reader, reader.uint32()); + break; + } + case 22: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.decode(reader, reader.uint32()); + break; + } + case 27: { + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); + break; + } + case 28: { + message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.decode(reader, reader.uint32()); + break; + } + case 29: { + message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 27: + case 3: + case 21: + case 22: + case 32: + case 33: + case 23: + case 25: + case 26: + case 29: + case 30: + case 31: + case 4: + case 5: + case 6: + case 7: + case 28: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 24: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + break; + } + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + if (typeof message.causesDrop !== "boolean") + return "causesDrop: boolean expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.InstanceInfo.verify(message.instance); + if (error) + return "instance." + error; + } + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.FirewallInfo.verify(message.firewall); + if (error) + return "firewall." + error; + } + } + if (message.route != null && message.hasOwnProperty("route")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.RouteInfo.verify(message.route); + if (error) + return "route." + error; + } + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpoint); + if (error) + return "endpoint." + error; + } + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.verify(message.googleService); + if (error) + return "googleService." + error; + } + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify(message.forwardingRule); + if (error) + return "forwardingRule." + error; + } + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.verify(message.vpnGateway); + if (error) + return "vpnGateway." + error; + } + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.verify(message.vpnTunnel); + if (error) + return "vpnTunnel." + error; + } + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.verify(message.vpcConnector); + if (error) + return "vpcConnector." + error; + } + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.DeliverInfo.verify(message.deliver); + if (error) + return "deliver." + error; + } + } + if (message.forward != null && message.hasOwnProperty("forward")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ForwardInfo.verify(message.forward); + if (error) + return "forward." + error; + } + } + if (message.abort != null && message.hasOwnProperty("abort")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.AbortInfo.verify(message.abort); + if (error) + return "abort." + error; + } + } + if (message.drop != null && message.hasOwnProperty("drop")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.DropInfo.verify(message.drop); + if (error) + return "drop." + error; + } + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.verify(message.loadBalancer); + if (error) + return "loadBalancer." + error; + } + } + if (message.network != null && message.hasOwnProperty("network")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.NetworkInfo.verify(message.network); + if (error) + return "network." + error; + } + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.verify(message.gkeMaster); + if (error) + return "gkeMaster." + error; + } + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); + if (error) + return "cloudSqlInstance." + error; + } + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.verify(message.redisInstance); + if (error) + return "redisInstance." + error; + } + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.verify(message.redisCluster); + if (error) + return "redisCluster." + error; + } + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + } + if (message.nat != null && message.hasOwnProperty("nat")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.NatInfo.verify(message.nat); + if (error) + return "nat." + error; + } + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify(message.proxyConnection); + if (error) + return "proxyConnection." + error; + } + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); + if (error) + return "loadBalancerBackendInfo." + error; + } + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.verify(message.storageBucket); + if (error) + return "storageBucket." + error; + } + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.verify(message.serverlessNeg); + if (error) + return "serverlessNeg." + error; + } + } + return null; + }; + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Step) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Step(); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "START_FROM_INSTANCE": + case 1: + message.state = 1; + break; + case "START_FROM_INTERNET": + case 2: + message.state = 2; + break; + case "START_FROM_GOOGLE_SERVICE": + case 27: + message.state = 27; + break; + case "START_FROM_PRIVATE_NETWORK": + case 3: + message.state = 3; + break; + case "START_FROM_GKE_MASTER": + case 21: + message.state = 21; + break; + case "START_FROM_CLOUD_SQL_INSTANCE": + case 22: + message.state = 22; + break; + case "START_FROM_REDIS_INSTANCE": + case 32: + message.state = 32; + break; + case "START_FROM_REDIS_CLUSTER": + case 33: + message.state = 33; + break; + case "START_FROM_CLOUD_FUNCTION": + case 23: + message.state = 23; + break; + case "START_FROM_APP_ENGINE_VERSION": + case 25: + message.state = 25; + break; + case "START_FROM_CLOUD_RUN_REVISION": + case 26: + message.state = 26; + break; + case "START_FROM_STORAGE_BUCKET": + case 29: + message.state = 29; + break; + case "START_FROM_PSC_PUBLISHED_SERVICE": + case 30: + message.state = 30; + break; + case "START_FROM_SERVERLESS_NEG": + case 31: + message.state = 31; + break; + case "APPLY_INGRESS_FIREWALL_RULE": + case 4: + message.state = 4; + break; + case "APPLY_EGRESS_FIREWALL_RULE": + case 5: + message.state = 5; + break; + case "APPLY_ROUTE": + case 6: + message.state = 6; + break; + case "APPLY_FORWARDING_RULE": + case 7: + message.state = 7; + break; + case "ANALYZE_LOAD_BALANCER_BACKEND": + case 28: + message.state = 28; + break; + case "SPOOFING_APPROVED": + case 8: + message.state = 8; + break; + case "ARRIVE_AT_INSTANCE": + case 9: + message.state = 9; + break; + case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": + case 10: + message.state = 10; + break; + case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": + case 11: + message.state = 11; + break; + case "ARRIVE_AT_VPN_GATEWAY": + case 12: + message.state = 12; + break; + case "ARRIVE_AT_VPN_TUNNEL": + case 13: + message.state = 13; + break; + case "ARRIVE_AT_VPC_CONNECTOR": + case 24: + message.state = 24; + break; + case "NAT": + case 14: + message.state = 14; + break; + case "PROXY_CONNECTION": + case 15: + message.state = 15; + break; + case "DELIVER": + case 16: + message.state = 16; + break; + case "DROP": + case 17: + message.state = 17; + break; + case "FORWARD": + case 18: + message.state = 18; + break; + case "ABORT": + case 19: + message.state = 19; + break; + case "VIEWER_PERMISSION_MISSING": + case 20: + message.state = 20; + break; + } + if (object.causesDrop != null) + message.causesDrop = Boolean(object.causesDrop); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.instance: object expected"); + message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.fromObject(object.instance); + } + if (object.firewall != null) { + if (typeof object.firewall !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.firewall: object expected"); + message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.fromObject(object.firewall); + } + if (object.route != null) { + if (typeof object.route !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.route: object expected"); + message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.fromObject(object.route); + } + if (object.endpoint != null) { + if (typeof object.endpoint !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.endpoint: object expected"); + message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpoint); + } + if (object.googleService != null) { + if (typeof object.googleService !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.googleService: object expected"); + message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.fromObject(object.googleService); + } + if (object.forwardingRule != null) { + if (typeof object.forwardingRule !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.forwardingRule: object expected"); + message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.fromObject(object.forwardingRule); + } + if (object.vpnGateway != null) { + if (typeof object.vpnGateway !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnGateway: object expected"); + message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.fromObject(object.vpnGateway); + } + if (object.vpnTunnel != null) { + if (typeof object.vpnTunnel !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnTunnel: object expected"); + message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.fromObject(object.vpnTunnel); + } + if (object.vpcConnector != null) { + if (typeof object.vpcConnector !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.vpcConnector: object expected"); + message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.fromObject(object.vpcConnector); + } + if (object.deliver != null) { + if (typeof object.deliver !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.deliver: object expected"); + message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.fromObject(object.deliver); + } + if (object.forward != null) { + if (typeof object.forward !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.forward: object expected"); + message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.fromObject(object.forward); + } + if (object.abort != null) { + if (typeof object.abort !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.abort: object expected"); + message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.fromObject(object.abort); + } + if (object.drop != null) { + if (typeof object.drop !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.drop: object expected"); + message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.fromObject(object.drop); + } + if (object.loadBalancer != null) { + if (typeof object.loadBalancer !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancer: object expected"); + message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.fromObject(object.loadBalancer); + } + if (object.network != null) { + if (typeof object.network !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.network: object expected"); + message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.fromObject(object.network); + } + if (object.gkeMaster != null) { + if (typeof object.gkeMaster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.gkeMaster: object expected"); + message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.fromObject(object.gkeMaster); + } + if (object.cloudSqlInstance != null) { + if (typeof object.cloudSqlInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudSqlInstance: object expected"); + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); + } + if (object.redisInstance != null) { + if (typeof object.redisInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.redisInstance: object expected"); + message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.fromObject(object.redisInstance); + } + if (object.redisCluster != null) { + if (typeof object.redisCluster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.redisCluster: object expected"); + message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.fromObject(object.redisCluster); + } + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); + } + if (object.nat != null) { + if (typeof object.nat !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.nat: object expected"); + message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.fromObject(object.nat); + } + if (object.proxyConnection != null) { + if (typeof object.proxyConnection !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.proxyConnection: object expected"); + message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.fromObject(object.proxyConnection); + } + if (object.loadBalancerBackendInfo != null) { + if (typeof object.loadBalancerBackendInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancerBackendInfo: object expected"); + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); + } + if (object.storageBucket != null) { + if (typeof object.storageBucket !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.storageBucket: object expected"); + message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.fromObject(object.storageBucket); + } + if (object.serverlessNeg != null) { + if (typeof object.serverlessNeg !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.serverlessNeg: object expected"); + message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.fromObject(object.serverlessNeg); + } + return message; + }; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.causesDrop = false; + object.projectId = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1.Step.State[message.state] : message.state; + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + object.causesDrop = message.causesDrop; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instance != null && message.hasOwnProperty("instance")) { + object.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.toObject(message.instance, options); + if (options.oneofs) + object.stepInfo = "instance"; + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + object.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.toObject(message.firewall, options); + if (options.oneofs) + object.stepInfo = "firewall"; + } + if (message.route != null && message.hasOwnProperty("route")) { + object.route = $root.google.cloud.networkmanagement.v1.RouteInfo.toObject(message.route, options); + if (options.oneofs) + object.stepInfo = "route"; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + object.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpoint, options); + if (options.oneofs) + object.stepInfo = "endpoint"; + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + object.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.toObject(message.forwardingRule, options); + if (options.oneofs) + object.stepInfo = "forwardingRule"; + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + object.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.toObject(message.vpnGateway, options); + if (options.oneofs) + object.stepInfo = "vpnGateway"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + object.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.toObject(message.vpnTunnel, options); + if (options.oneofs) + object.stepInfo = "vpnTunnel"; + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + object.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.toObject(message.deliver, options); + if (options.oneofs) + object.stepInfo = "deliver"; + } + if (message.forward != null && message.hasOwnProperty("forward")) { + object.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.toObject(message.forward, options); + if (options.oneofs) + object.stepInfo = "forward"; + } + if (message.abort != null && message.hasOwnProperty("abort")) { + object.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.toObject(message.abort, options); + if (options.oneofs) + object.stepInfo = "abort"; + } + if (message.drop != null && message.hasOwnProperty("drop")) { + object.drop = $root.google.cloud.networkmanagement.v1.DropInfo.toObject(message.drop, options); + if (options.oneofs) + object.stepInfo = "drop"; + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + object.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.toObject(message.loadBalancer, options); + if (options.oneofs) + object.stepInfo = "loadBalancer"; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.toObject(message.network, options); + if (options.oneofs) + object.stepInfo = "network"; + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + object.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.toObject(message.gkeMaster, options); + if (options.oneofs) + object.stepInfo = "gkeMaster"; + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); + if (options.oneofs) + object.stepInfo = "cloudSqlInstance"; + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + object.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.toObject(message.cloudFunction, options); + if (options.oneofs) + object.stepInfo = "cloudFunction"; + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + object.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.toObject(message.vpcConnector, options); + if (options.oneofs) + object.stepInfo = "vpcConnector"; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + object.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); + if (options.oneofs) + object.stepInfo = "appEngineVersion"; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); + if (options.oneofs) + object.stepInfo = "cloudRunRevision"; + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + object.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.toObject(message.googleService, options); + if (options.oneofs) + object.stepInfo = "googleService"; + } + if (message.nat != null && message.hasOwnProperty("nat")) { + object.nat = $root.google.cloud.networkmanagement.v1.NatInfo.toObject(message.nat, options); + if (options.oneofs) + object.stepInfo = "nat"; + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + object.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.toObject(message.proxyConnection, options); + if (options.oneofs) + object.stepInfo = "proxyConnection"; + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); + if (options.oneofs) + object.stepInfo = "loadBalancerBackendInfo"; + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + object.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.toObject(message.storageBucket, options); + if (options.oneofs) + object.stepInfo = "storageBucket"; + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + object.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.toObject(message.serverlessNeg, options); + if (options.oneofs) + object.stepInfo = "serverlessNeg"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + object.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.toObject(message.redisInstance, options); + if (options.oneofs) + object.stepInfo = "redisInstance"; + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + object.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.toObject(message.redisCluster, options); + if (options.oneofs) + object.stepInfo = "redisCluster"; + } + return object; + }; + + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Step + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Step"; + }; + + /** + * State enum. + * @name google.cloud.networkmanagement.v1.Step.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value + * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value + * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value + * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value + * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value + * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value + * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value + * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value + * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value + * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value + * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value + * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value + * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value + * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value + * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value + * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value + * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value + * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value + * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value + * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value + * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value + * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value + * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value + * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value + * @property {number} NAT=14 NAT value + * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value + * @property {number} DELIVER=16 DELIVER value + * @property {number} DROP=17 DROP value + * @property {number} FORWARD=18 FORWARD value + * @property {number} ABORT=19 ABORT value + * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value + */ + Step.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START_FROM_INSTANCE"] = 1; + values[valuesById[2] = "START_FROM_INTERNET"] = 2; + values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; + values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; + values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; + values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; + values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; + values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; + values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; + values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; + values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; + values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; + values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; + values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; + values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; + values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; + values[valuesById[6] = "APPLY_ROUTE"] = 6; + values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; + values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; + values[valuesById[8] = "SPOOFING_APPROVED"] = 8; + values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; + values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; + values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; + values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; + values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; + values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; + values[valuesById[14] = "NAT"] = 14; + values[valuesById[15] = "PROXY_CONNECTION"] = 15; + values[valuesById[16] = "DELIVER"] = 16; + values[valuesById[17] = "DROP"] = 17; + values[valuesById[18] = "FORWARD"] = 18; + values[valuesById[19] = "ABORT"] = 19; + values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; + return values; + })(); + + return Step; + })(); + + v1.InstanceInfo = (function() { + + /** + * Properties of an InstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IInstanceInfo + * @property {string|null} [displayName] InstanceInfo displayName + * @property {string|null} [uri] InstanceInfo uri + * @property {string|null} ["interface"] InstanceInfo interface + * @property {string|null} [networkUri] InstanceInfo networkUri + * @property {string|null} [internalIp] InstanceInfo internalIp + * @property {string|null} [externalIp] InstanceInfo externalIp + * @property {Array.|null} [networkTags] InstanceInfo networkTags + * @property {string|null} [serviceAccount] InstanceInfo serviceAccount + * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri + */ + + /** + * Constructs a new InstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an InstanceInfo. + * @implements IInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set + */ + function InstanceInfo(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.displayName = ""; + + /** + * InstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.uri = ""; + + /** + * InstanceInfo interface. + * @member {string} interface + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype["interface"] = ""; + + /** + * InstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkUri = ""; + + /** + * InstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.internalIp = ""; + + /** + * InstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.externalIp = ""; + + /** + * InstanceInfo networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkTags = $util.emptyArray; + + /** + * InstanceInfo serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.serviceAccount = ""; + + /** + * InstanceInfo pscNetworkAttachmentUri. + * @member {string} pscNetworkAttachmentUri + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.pscNetworkAttachmentUri = ""; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo instance + */ + InstanceInfo.create = function create(properties) { + return new InstanceInfo(properties); + }; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); + if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); + return writer; + }; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message["interface"] = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + case 8: { + message.serviceAccount = reader.string(); + break; + } + case 9: { + message.pscNetworkAttachmentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message["interface"] != null && message.hasOwnProperty("interface")) + if (!$util.isString(message["interface"])) + return "interface: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + if (!$util.isString(message.pscNetworkAttachmentUri)) + return "pscNetworkAttachmentUri: string expected"; + return null; + }; + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo + */ + InstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.InstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object["interface"] != null) + message["interface"] = String(object["interface"]); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.networkmanagement.v1.InstanceInfo.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.pscNetworkAttachmentUri != null) + message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); + return message; + }; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.InstanceInfo} message InstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object["interface"] = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.serviceAccount = ""; + object.pscNetworkAttachmentUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message["interface"] != null && message.hasOwnProperty("interface")) + object["interface"] = message["interface"]; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; + return object; + }; + + /** + * Converts this InstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + * @returns {Object.} JSON object + */ + InstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.InstanceInfo"; + }; + + return InstanceInfo; + })(); + + v1.NetworkInfo = (function() { + + /** + * Properties of a NetworkInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface INetworkInfo + * @property {string|null} [displayName] NetworkInfo displayName + * @property {string|null} [uri] NetworkInfo uri + * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri + * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange + * @property {string|null} [region] NetworkInfo region + */ + + /** + * Constructs a new NetworkInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a NetworkInfo. + * @implements INetworkInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set + */ + function NetworkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.displayName = ""; + + /** + * NetworkInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.uri = ""; + + /** + * NetworkInfo matchedSubnetUri. + * @member {string} matchedSubnetUri + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedSubnetUri = ""; + + /** + * NetworkInfo matchedIpRange. + * @member {string} matchedIpRange + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedIpRange = ""; + + /** + * NetworkInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.region = ""; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo instance + */ + NetworkInfo.create = function create(properties) { + return new NetworkInfo(properties); + }; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); + if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 5: { + message.matchedSubnetUri = reader.string(); + break; + } + case 4: { + message.matchedIpRange = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + if (!$util.isString(message.matchedSubnetUri)) + return "matchedSubnetUri: string expected"; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + if (!$util.isString(message.matchedIpRange)) + return "matchedIpRange: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo + */ + NetworkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.NetworkInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedSubnetUri != null) + message.matchedSubnetUri = String(object.matchedSubnetUri); + if (object.matchedIpRange != null) + message.matchedIpRange = String(object.matchedIpRange); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.NetworkInfo} message NetworkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedIpRange = ""; + object.matchedSubnetUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + object.matchedIpRange = message.matchedIpRange; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + object.matchedSubnetUri = message.matchedSubnetUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this NetworkInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + * @returns {Object.} JSON object + */ + NetworkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NetworkInfo"; + }; + + return NetworkInfo; + })(); + + v1.FirewallInfo = (function() { + + /** + * Properties of a FirewallInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IFirewallInfo + * @property {string|null} [displayName] FirewallInfo displayName + * @property {string|null} [uri] FirewallInfo uri + * @property {string|null} [direction] FirewallInfo direction + * @property {string|null} [action] FirewallInfo action + * @property {number|null} [priority] FirewallInfo priority + * @property {string|null} [networkUri] FirewallInfo networkUri + * @property {Array.|null} [targetTags] FirewallInfo targetTags + * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts + * @property {string|null} [policy] FirewallInfo policy + * @property {string|null} [policyUri] FirewallInfo policyUri + * @property {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType + */ + + /** + * Constructs a new FirewallInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a FirewallInfo. + * @implements IFirewallInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set + */ + function FirewallInfo(properties) { + this.targetTags = []; + this.targetServiceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirewallInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.displayName = ""; + + /** + * FirewallInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.uri = ""; + + /** + * FirewallInfo direction. + * @member {string} direction + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.direction = ""; + + /** + * FirewallInfo action. + * @member {string} action + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.action = ""; + + /** + * FirewallInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.priority = 0; + + /** + * FirewallInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.networkUri = ""; + + /** + * FirewallInfo targetTags. + * @member {Array.} targetTags + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetTags = $util.emptyArray; + + /** + * FirewallInfo targetServiceAccounts. + * @member {Array.} targetServiceAccounts + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; + + /** + * FirewallInfo policy. + * @member {string} policy + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policy = ""; + + /** + * FirewallInfo policyUri. + * @member {string} policyUri + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policyUri = ""; + + /** + * FirewallInfo firewallRuleType. + * @member {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType} firewallRuleType + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.firewallRuleType = 0; + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo instance + */ + FirewallInfo.create = function create(properties) { + return new FirewallInfo(properties); + }; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); + if (message.targetTags != null && message.targetTags.length) + for (var i = 0; i < message.targetTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); + if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); + if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); + if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); + return writer; + }; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.direction = reader.string(); + break; + } + case 4: { + message.action = reader.string(); + break; + } + case 5: { + message.priority = reader.int32(); + break; + } + case 6: { + message.networkUri = reader.string(); + break; + } + case 7: { + if (!(message.targetTags && message.targetTags.length)) + message.targetTags = []; + message.targetTags.push(reader.string()); + break; + } + case 8: { + if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) + message.targetServiceAccounts = []; + message.targetServiceAccounts.push(reader.string()); + break; + } + case 9: { + message.policy = reader.string(); + break; + } + case 11: { + message.policyUri = reader.string(); + break; + } + case 10: { + message.firewallRuleType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirewallInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirewallInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + if (!$util.isString(message.direction)) + return "direction: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.targetTags != null && message.hasOwnProperty("targetTags")) { + if (!Array.isArray(message.targetTags)) + return "targetTags: array expected"; + for (var i = 0; i < message.targetTags.length; ++i) + if (!$util.isString(message.targetTags[i])) + return "targetTags: string[] expected"; + } + if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { + if (!Array.isArray(message.targetServiceAccounts)) + return "targetServiceAccounts: array expected"; + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + if (!$util.isString(message.targetServiceAccounts[i])) + return "targetServiceAccounts: string[] expected"; + } + if (message.policy != null && message.hasOwnProperty("policy")) + if (!$util.isString(message.policy)) + return "policy: string expected"; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + if (!$util.isString(message.policyUri)) + return "policyUri: string expected"; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + switch (message.firewallRuleType) { + default: + return "firewallRuleType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 100: + case 101: + break; + } + return null; + }; + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo + */ + FirewallInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.FirewallInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.direction != null) + message.direction = String(object.direction); + if (object.action != null) + message.action = String(object.action); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.targetTags) { + if (!Array.isArray(object.targetTags)) + throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetTags: array expected"); + message.targetTags = []; + for (var i = 0; i < object.targetTags.length; ++i) + message.targetTags[i] = String(object.targetTags[i]); + } + if (object.targetServiceAccounts) { + if (!Array.isArray(object.targetServiceAccounts)) + throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetServiceAccounts: array expected"); + message.targetServiceAccounts = []; + for (var i = 0; i < object.targetServiceAccounts.length; ++i) + message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); + } + if (object.policy != null) + message.policy = String(object.policy); + if (object.policyUri != null) + message.policyUri = String(object.policyUri); + switch (object.firewallRuleType) { + default: + if (typeof object.firewallRuleType === "number") { + message.firewallRuleType = object.firewallRuleType; + break; + } + break; + case "FIREWALL_RULE_TYPE_UNSPECIFIED": + case 0: + message.firewallRuleType = 0; + break; + case "HIERARCHICAL_FIREWALL_POLICY_RULE": + case 1: + message.firewallRuleType = 1; + break; + case "VPC_FIREWALL_RULE": + case 2: + message.firewallRuleType = 2; + break; + case "IMPLIED_VPC_FIREWALL_RULE": + case 3: + message.firewallRuleType = 3; + break; + case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": + case 4: + message.firewallRuleType = 4; + break; + case "NETWORK_FIREWALL_POLICY_RULE": + case 5: + message.firewallRuleType = 5; + break; + case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": + case 6: + message.firewallRuleType = 6; + break; + case "UNSUPPORTED_FIREWALL_POLICY_RULE": + case 100: + message.firewallRuleType = 100; + break; + case "TRACKING_STATE": + case 101: + message.firewallRuleType = 101; + break; + } + return message; + }; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.FirewallInfo} message FirewallInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirewallInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetTags = []; + object.targetServiceAccounts = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.direction = ""; + object.action = ""; + object.priority = 0; + object.networkUri = ""; + object.policy = ""; + object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; + object.policyUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = message.direction; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.targetTags && message.targetTags.length) { + object.targetTags = []; + for (var j = 0; j < message.targetTags.length; ++j) + object.targetTags[j] = message.targetTags[j]; + } + if (message.targetServiceAccounts && message.targetServiceAccounts.length) { + object.targetServiceAccounts = []; + for (var j = 0; j < message.targetServiceAccounts.length; ++j) + object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; + } + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = message.policy; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + object.policyUri = message.policyUri; + return object; + }; + + /** + * Converts this FirewallInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + * @returns {Object.} JSON object + */ + FirewallInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirewallInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.FirewallInfo"; + }; + + /** + * FirewallRuleType enum. + * @name google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + * @enum {number} + * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value + * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value + * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value + * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value + * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value + * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value + * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value + * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value + * @property {number} TRACKING_STATE=101 TRACKING_STATE value + */ + FirewallInfo.FirewallRuleType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; + values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; + values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; + values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; + values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; + values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; + values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; + values[valuesById[101] = "TRACKING_STATE"] = 101; + return values; + })(); + + return FirewallInfo; + })(); + + v1.RouteInfo = (function() { + + /** + * Properties of a RouteInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRouteInfo + * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType + * @property {google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType + * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope + * @property {string|null} [displayName] RouteInfo displayName + * @property {string|null} [uri] RouteInfo uri + * @property {string|null} [region] RouteInfo region + * @property {string|null} [destIpRange] RouteInfo destIpRange + * @property {string|null} [nextHop] RouteInfo nextHop + * @property {string|null} [networkUri] RouteInfo networkUri + * @property {number|null} [priority] RouteInfo priority + * @property {Array.|null} [instanceTags] RouteInfo instanceTags + * @property {string|null} [srcIpRange] RouteInfo srcIpRange + * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges + * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges + * @property {Array.|null} [protocols] RouteInfo protocols + * @property {string|null} [nccHubUri] RouteInfo nccHubUri + * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri + * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri + * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri + */ + + /** + * Constructs a new RouteInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RouteInfo. + * @implements IRouteInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set + */ + function RouteInfo(properties) { + this.instanceTags = []; + this.destPortRanges = []; + this.srcPortRanges = []; + this.protocols = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RouteInfo routeType. + * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteType} routeType + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeType = 0; + + /** + * RouteInfo nextHopType. + * @member {google.cloud.networkmanagement.v1.RouteInfo.NextHopType} nextHopType + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHopType = 0; + + /** + * RouteInfo routeScope. + * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteScope} routeScope + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeScope = 0; + + /** + * RouteInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.displayName = ""; + + /** + * RouteInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.uri = ""; + + /** + * RouteInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.region = ""; + + /** + * RouteInfo destIpRange. + * @member {string} destIpRange + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.destIpRange = ""; + + /** + * RouteInfo nextHop. + * @member {string} nextHop + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHop = ""; + + /** + * RouteInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.networkUri = ""; + + /** + * RouteInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.priority = 0; + + /** + * RouteInfo instanceTags. + * @member {Array.} instanceTags + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.instanceTags = $util.emptyArray; + + /** + * RouteInfo srcIpRange. + * @member {string} srcIpRange + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcIpRange = ""; + + /** + * RouteInfo destPortRanges. + * @member {Array.} destPortRanges + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.destPortRanges = $util.emptyArray; + + /** + * RouteInfo srcPortRanges. + * @member {Array.} srcPortRanges + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcPortRanges = $util.emptyArray; + + /** + * RouteInfo protocols. + * @member {Array.} protocols + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.protocols = $util.emptyArray; + + /** + * RouteInfo nccHubUri. + * @member {string|null|undefined} nccHubUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccHubUri = null; + + /** + * RouteInfo nccSpokeUri. + * @member {string|null|undefined} nccSpokeUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccSpokeUri = null; + + /** + * RouteInfo advertisedRouteSourceRouterUri. + * @member {string|null|undefined} advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteSourceRouterUri = null; + + /** + * RouteInfo advertisedRouteNextHopUri. + * @member {string|null|undefined} advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteNextHopUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RouteInfo _nccHubUri. + * @member {"nccHubUri"|undefined} _nccHubUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { + get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _nccSpokeUri. + * @member {"nccSpokeUri"|undefined} _nccSpokeUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { + get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteSourceRouterUri. + * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteNextHopUri. + * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RouteInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo instance + */ + RouteInfo.create = function create(properties) { + return new RouteInfo(properties); + }; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); + if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); + if (message.instanceTags != null && message.instanceTags.length) + for (var i = 0; i < message.instanceTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); + if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); + if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); + if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); + if (message.destPortRanges != null && message.destPortRanges.length) + for (var i = 0; i < message.destPortRanges.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); + if (message.srcPortRanges != null && message.srcPortRanges.length) + for (var i = 0; i < message.srcPortRanges.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); + if (message.protocols != null && message.protocols.length) + for (var i = 0; i < message.protocols.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); + if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); + if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); + if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); + if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); + if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); + return writer; + }; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: { + message.routeType = reader.int32(); + break; + } + case 9: { + message.nextHopType = reader.int32(); + break; + } + case 14: { + message.routeScope = reader.int32(); + break; + } + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 19: { + message.region = reader.string(); + break; + } + case 3: { + message.destIpRange = reader.string(); + break; + } + case 4: { + message.nextHop = reader.string(); + break; + } + case 5: { + message.networkUri = reader.string(); + break; + } + case 6: { + message.priority = reader.int32(); + break; + } + case 7: { + if (!(message.instanceTags && message.instanceTags.length)) + message.instanceTags = []; + message.instanceTags.push(reader.string()); + break; + } + case 10: { + message.srcIpRange = reader.string(); + break; + } + case 11: { + if (!(message.destPortRanges && message.destPortRanges.length)) + message.destPortRanges = []; + message.destPortRanges.push(reader.string()); + break; + } + case 12: { + if (!(message.srcPortRanges && message.srcPortRanges.length)) + message.srcPortRanges = []; + message.srcPortRanges.push(reader.string()); + break; + } + case 13: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + message.protocols.push(reader.string()); + break; + } + case 15: { + message.nccHubUri = reader.string(); + break; + } + case 16: { + message.nccSpokeUri = reader.string(); + break; + } + case 17: { + message.advertisedRouteSourceRouterUri = reader.string(); + break; + } + case 18: { + message.advertisedRouteNextHopUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RouteInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RouteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.routeType != null && message.hasOwnProperty("routeType")) + switch (message.routeType) { + default: + return "routeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 101: + break; + } + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + switch (message.nextHopType) { + default: + return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) + switch (message.routeScope) { + default: + return "routeScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + if (!$util.isString(message.destIpRange)) + return "destIpRange: string expected"; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + if (!$util.isString(message.nextHop)) + return "nextHop: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { + if (!Array.isArray(message.instanceTags)) + return "instanceTags: array expected"; + for (var i = 0; i < message.instanceTags.length; ++i) + if (!$util.isString(message.instanceTags[i])) + return "instanceTags: string[] expected"; + } + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + if (!$util.isString(message.srcIpRange)) + return "srcIpRange: string expected"; + if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { + if (!Array.isArray(message.destPortRanges)) + return "destPortRanges: array expected"; + for (var i = 0; i < message.destPortRanges.length; ++i) + if (!$util.isString(message.destPortRanges[i])) + return "destPortRanges: string[] expected"; + } + if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { + if (!Array.isArray(message.srcPortRanges)) + return "srcPortRanges: array expected"; + for (var i = 0; i < message.srcPortRanges.length; ++i) + if (!$util.isString(message.srcPortRanges[i])) + return "srcPortRanges: string[] expected"; + } + if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (!Array.isArray(message.protocols)) + return "protocols: array expected"; + for (var i = 0; i < message.protocols.length; ++i) + if (!$util.isString(message.protocols[i])) + return "protocols: string[] expected"; + } + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + properties._nccHubUri = 1; + if (!$util.isString(message.nccHubUri)) + return "nccHubUri: string expected"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + properties._nccSpokeUri = 1; + if (!$util.isString(message.nccSpokeUri)) + return "nccSpokeUri: string expected"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + properties._advertisedRouteSourceRouterUri = 1; + if (!$util.isString(message.advertisedRouteSourceRouterUri)) + return "advertisedRouteSourceRouterUri: string expected"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + properties._advertisedRouteNextHopUri = 1; + if (!$util.isString(message.advertisedRouteNextHopUri)) + return "advertisedRouteNextHopUri: string expected"; + } + return null; + }; + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo + */ + RouteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RouteInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); + switch (object.routeType) { + default: + if (typeof object.routeType === "number") { + message.routeType = object.routeType; + break; + } + break; + case "ROUTE_TYPE_UNSPECIFIED": + case 0: + message.routeType = 0; + break; + case "SUBNET": + case 1: + message.routeType = 1; + break; + case "STATIC": + case 2: + message.routeType = 2; + break; + case "DYNAMIC": + case 3: + message.routeType = 3; + break; + case "PEERING_SUBNET": + case 4: + message.routeType = 4; + break; + case "PEERING_STATIC": + case 5: + message.routeType = 5; + break; + case "PEERING_DYNAMIC": + case 6: + message.routeType = 6; + break; + case "POLICY_BASED": + case 7: + message.routeType = 7; + break; + case "ADVERTISED": + case 101: + message.routeType = 101; + break; + } + switch (object.nextHopType) { + default: + if (typeof object.nextHopType === "number") { + message.nextHopType = object.nextHopType; + break; + } + break; + case "NEXT_HOP_TYPE_UNSPECIFIED": + case 0: + message.nextHopType = 0; + break; + case "NEXT_HOP_IP": + case 1: + message.nextHopType = 1; + break; + case "NEXT_HOP_INSTANCE": + case 2: + message.nextHopType = 2; + break; + case "NEXT_HOP_NETWORK": + case 3: + message.nextHopType = 3; + break; + case "NEXT_HOP_PEERING": + case 4: + message.nextHopType = 4; + break; + case "NEXT_HOP_INTERCONNECT": + case 5: + message.nextHopType = 5; + break; + case "NEXT_HOP_VPN_TUNNEL": + case 6: + message.nextHopType = 6; + break; + case "NEXT_HOP_VPN_GATEWAY": + case 7: + message.nextHopType = 7; + break; + case "NEXT_HOP_INTERNET_GATEWAY": + case 8: + message.nextHopType = 8; + break; + case "NEXT_HOP_BLACKHOLE": + case 9: + message.nextHopType = 9; + break; + case "NEXT_HOP_ILB": + case 10: + message.nextHopType = 10; + break; + case "NEXT_HOP_ROUTER_APPLIANCE": + case 11: + message.nextHopType = 11; + break; + case "NEXT_HOP_NCC_HUB": + case 12: + message.nextHopType = 12; + break; + } + switch (object.routeScope) { + default: + if (typeof object.routeScope === "number") { + message.routeScope = object.routeScope; + break; + } + break; + case "ROUTE_SCOPE_UNSPECIFIED": + case 0: + message.routeScope = 0; + break; + case "NETWORK": + case 1: + message.routeScope = 1; + break; + case "NCC_HUB": + case 2: + message.routeScope = 2; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.region != null) + message.region = String(object.region); + if (object.destIpRange != null) + message.destIpRange = String(object.destIpRange); + if (object.nextHop != null) + message.nextHop = String(object.nextHop); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.instanceTags) { + if (!Array.isArray(object.instanceTags)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.instanceTags: array expected"); + message.instanceTags = []; + for (var i = 0; i < object.instanceTags.length; ++i) + message.instanceTags[i] = String(object.instanceTags[i]); + } + if (object.srcIpRange != null) + message.srcIpRange = String(object.srcIpRange); + if (object.destPortRanges) { + if (!Array.isArray(object.destPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.destPortRanges: array expected"); + message.destPortRanges = []; + for (var i = 0; i < object.destPortRanges.length; ++i) + message.destPortRanges[i] = String(object.destPortRanges[i]); + } + if (object.srcPortRanges) { + if (!Array.isArray(object.srcPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.srcPortRanges: array expected"); + message.srcPortRanges = []; + for (var i = 0; i < object.srcPortRanges.length; ++i) + message.srcPortRanges[i] = String(object.srcPortRanges[i]); + } + if (object.protocols) { + if (!Array.isArray(object.protocols)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.protocols: array expected"); + message.protocols = []; + for (var i = 0; i < object.protocols.length; ++i) + message.protocols[i] = String(object.protocols[i]); + } + if (object.nccHubUri != null) + message.nccHubUri = String(object.nccHubUri); + if (object.nccSpokeUri != null) + message.nccSpokeUri = String(object.nccSpokeUri); + if (object.advertisedRouteSourceRouterUri != null) + message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); + if (object.advertisedRouteNextHopUri != null) + message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); + return message; + }; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.RouteInfo} message RouteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RouteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.instanceTags = []; + object.destPortRanges = []; + object.srcPortRanges = []; + object.protocols = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.destIpRange = ""; + object.nextHop = ""; + object.networkUri = ""; + object.priority = 0; + object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; + object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; + object.srcIpRange = ""; + object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + object.destIpRange = message.destIpRange; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + object.nextHop = message.nextHop; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.instanceTags && message.instanceTags.length) { + object.instanceTags = []; + for (var j = 0; j < message.instanceTags.length; ++j) + object.instanceTags[j] = message.instanceTags[j]; + } + if (message.routeType != null && message.hasOwnProperty("routeType")) + object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] : message.routeType; + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + object.srcIpRange = message.srcIpRange; + if (message.destPortRanges && message.destPortRanges.length) { + object.destPortRanges = []; + for (var j = 0; j < message.destPortRanges.length; ++j) + object.destPortRanges[j] = message.destPortRanges[j]; + } + if (message.srcPortRanges && message.srcPortRanges.length) { + object.srcPortRanges = []; + for (var j = 0; j < message.srcPortRanges.length; ++j) + object.srcPortRanges[j] = message.srcPortRanges[j]; + } + if (message.protocols && message.protocols.length) { + object.protocols = []; + for (var j = 0; j < message.protocols.length; ++j) + object.protocols[j] = message.protocols[j]; + } + if (message.routeScope != null && message.hasOwnProperty("routeScope")) + object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + object.nccHubUri = message.nccHubUri; + if (options.oneofs) + object._nccHubUri = "nccHubUri"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + object.nccSpokeUri = message.nccSpokeUri; + if (options.oneofs) + object._nccSpokeUri = "nccSpokeUri"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; + if (options.oneofs) + object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; + if (options.oneofs) + object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; + } + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RouteInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + * @returns {Object.} JSON object + */ + RouteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RouteInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RouteInfo"; + }; + + /** + * RouteType enum. + * @name google.cloud.networkmanagement.v1.RouteInfo.RouteType + * @enum {number} + * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value + * @property {number} SUBNET=1 SUBNET value + * @property {number} STATIC=2 STATIC value + * @property {number} DYNAMIC=3 DYNAMIC value + * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value + * @property {number} PEERING_STATIC=5 PEERING_STATIC value + * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value + * @property {number} POLICY_BASED=7 POLICY_BASED value + * @property {number} ADVERTISED=101 ADVERTISED value + */ + RouteInfo.RouteType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUBNET"] = 1; + values[valuesById[2] = "STATIC"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + values[valuesById[4] = "PEERING_SUBNET"] = 4; + values[valuesById[5] = "PEERING_STATIC"] = 5; + values[valuesById[6] = "PEERING_DYNAMIC"] = 6; + values[valuesById[7] = "POLICY_BASED"] = 7; + values[valuesById[101] = "ADVERTISED"] = 101; + return values; + })(); + + /** + * NextHopType enum. + * @name google.cloud.networkmanagement.v1.RouteInfo.NextHopType + * @enum {number} + * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value + * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value + * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value + * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value + * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value + * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value + * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value + * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value + * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value + * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value + * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value + * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value + * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value + */ + RouteInfo.NextHopType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEXT_HOP_IP"] = 1; + values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; + values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; + values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; + values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; + values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; + values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; + values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; + values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; + values[valuesById[10] = "NEXT_HOP_ILB"] = 10; + values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; + values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; + return values; + })(); + + /** + * RouteScope enum. + * @name google.cloud.networkmanagement.v1.RouteInfo.RouteScope + * @enum {number} + * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value + * @property {number} NETWORK=1 NETWORK value + * @property {number} NCC_HUB=2 NCC_HUB value + */ + RouteInfo.RouteScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NETWORK"] = 1; + values[valuesById[2] = "NCC_HUB"] = 2; + return values; + })(); + + return RouteInfo; + })(); + + v1.GoogleServiceInfo = (function() { + + /** + * Properties of a GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IGoogleServiceInfo + * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp + * @property {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType + */ + + /** + * Constructs a new GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a GoogleServiceInfo. + * @implements IGoogleServiceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set + */ + function GoogleServiceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleServiceInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.sourceIp = ""; + + /** + * GoogleServiceInfo googleServiceType. + * @member {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType} googleServiceType + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.googleServiceType = 0; + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo instance + */ + GoogleServiceInfo.create = function create(properties) { + return new GoogleServiceInfo(properties); + }; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); + return writer; + }; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.googleServiceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleServiceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleServiceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + switch (message.googleServiceType) { + default: + return "googleServiceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo + */ + GoogleServiceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.GoogleServiceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + switch (object.googleServiceType) { + default: + if (typeof object.googleServiceType === "number") { + message.googleServiceType = object.googleServiceType; + break; + } + break; + case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": + case 0: + message.googleServiceType = 0; + break; + case "IAP": + case 1: + message.googleServiceType = 1; + break; + case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": + case 2: + message.googleServiceType = 2; + break; + case "CLOUD_DNS": + case 3: + message.googleServiceType = 3; + break; + case "GOOGLE_API": + case 4: + message.googleServiceType = 4; + break; + case "GOOGLE_API_PSC": + case 5: + message.googleServiceType = 5; + break; + case "GOOGLE_API_VPC_SC": + case 6: + message.googleServiceType = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.GoogleServiceInfo} message GoogleServiceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleServiceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; + return object; + }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @instance + * @returns {Object.} JSON object + */ + GoogleServiceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleServiceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GoogleServiceInfo"; + }; + + /** + * GoogleServiceType enum. + * @name google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + * @enum {number} + * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value + * @property {number} IAP=1 IAP value + * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value + * @property {number} CLOUD_DNS=3 CLOUD_DNS value + * @property {number} GOOGLE_API=4 GOOGLE_API value + * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value + * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value + */ + GoogleServiceInfo.GoogleServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IAP"] = 1; + values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; + values[valuesById[3] = "CLOUD_DNS"] = 3; + values[valuesById[4] = "GOOGLE_API"] = 4; + values[valuesById[5] = "GOOGLE_API_PSC"] = 5; + values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; + return values; + })(); + + return GoogleServiceInfo; + })(); + + v1.ForwardingRuleInfo = (function() { + + /** + * Properties of a ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IForwardingRuleInfo + * @property {string|null} [displayName] ForwardingRuleInfo displayName + * @property {string|null} [uri] ForwardingRuleInfo uri + * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol + * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange + * @property {string|null} [vip] ForwardingRuleInfo vip + * @property {string|null} [target] ForwardingRuleInfo target + * @property {string|null} [networkUri] ForwardingRuleInfo networkUri + * @property {string|null} [region] ForwardingRuleInfo region + * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName + * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget + */ + + /** + * Constructs a new ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ForwardingRuleInfo. + * @implements IForwardingRuleInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set + */ + function ForwardingRuleInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardingRuleInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.displayName = ""; + + /** + * ForwardingRuleInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.uri = ""; + + /** + * ForwardingRuleInfo matchedProtocol. + * @member {string} matchedProtocol + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedProtocol = ""; + + /** + * ForwardingRuleInfo matchedPortRange. + * @member {string} matchedPortRange + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedPortRange = ""; + + /** + * ForwardingRuleInfo vip. + * @member {string} vip + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.vip = ""; + + /** + * ForwardingRuleInfo target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.target = ""; + + /** + * ForwardingRuleInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.networkUri = ""; + + /** + * ForwardingRuleInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.region = ""; + + /** + * ForwardingRuleInfo loadBalancerName. + * @member {string} loadBalancerName + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.loadBalancerName = ""; + + /** + * ForwardingRuleInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * ForwardingRuleInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo instance + */ + ForwardingRuleInfo.create = function create(properties) { + return new ForwardingRuleInfo(properties); + }; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); + if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); + if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.matchedProtocol = reader.string(); + break; + } + case 6: { + message.matchedPortRange = reader.string(); + break; + } + case 4: { + message.vip = reader.string(); + break; + } + case 5: { + message.target = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.loadBalancerName = reader.string(); + break; + } + case 10: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 11: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardingRuleInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardingRuleInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + if (!$util.isString(message.matchedProtocol)) + return "matchedProtocol: string expected"; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + if (!$util.isString(message.matchedPortRange)) + return "matchedPortRange: string expected"; + if (message.vip != null && message.hasOwnProperty("vip")) + if (!$util.isString(message.vip)) + return "vip: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + if (!$util.isString(message.loadBalancerName)) + return "loadBalancerName: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo + */ + ForwardingRuleInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedProtocol != null) + message.matchedProtocol = String(object.matchedProtocol); + if (object.matchedPortRange != null) + message.matchedPortRange = String(object.matchedPortRange); + if (object.vip != null) + message.vip = String(object.vip); + if (object.target != null) + message.target = String(object.target); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + if (object.loadBalancerName != null) + message.loadBalancerName = String(object.loadBalancerName); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.ForwardingRuleInfo} message ForwardingRuleInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardingRuleInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedProtocol = ""; + object.vip = ""; + object.target = ""; + object.matchedPortRange = ""; + object.networkUri = ""; + object.region = ""; + object.loadBalancerName = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + object.matchedProtocol = message.matchedProtocol; + if (message.vip != null && message.hasOwnProperty("vip")) + object.vip = message.vip; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + object.matchedPortRange = message.matchedPortRange; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + object.loadBalancerName = message.loadBalancerName; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardingRuleInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardingRuleInfo"; + }; + + return ForwardingRuleInfo; + })(); + + v1.LoadBalancerInfo = (function() { + + /** + * Properties of a LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILoadBalancerInfo + * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType + * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri + * @property {Array.|null} [backends] LoadBalancerInfo backends + * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType + * @property {string|null} [backendUri] LoadBalancerInfo backendUri + */ + + /** + * Constructs a new LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LoadBalancerInfo. + * @implements ILoadBalancerInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set + */ + function LoadBalancerInfo(properties) { + this.backends = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerInfo loadBalancerType. + * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType} loadBalancerType + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.loadBalancerType = 0; + + /** + * LoadBalancerInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerInfo backends. + * @member {Array.} backends + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backends = $util.emptyArray; + + /** + * LoadBalancerInfo backendType. + * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType} backendType + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendType = 0; + + /** + * LoadBalancerInfo backendUri. + * @member {string} backendUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendUri = ""; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo instance + */ + LoadBalancerInfo.create = function create(properties) { + return new LoadBalancerInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); + if (message.backends != null && message.backends.length) + for (var i = 0; i < message.backends.length; ++i) + $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); + if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); + return writer; + }; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.loadBalancerType = reader.int32(); + break; + } + case 2: { + message.healthCheckUri = reader.string(); + break; + } + case 3: { + if (!(message.backends && message.backends.length)) + message.backends = []; + message.backends.push($root.google.cloud.networkmanagement.v1.LoadBalancerBackend.decode(reader, reader.uint32())); + break; + } + case 4: { + message.backendType = reader.int32(); + break; + } + case 5: { + message.backendUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + switch (message.loadBalancerType) { + default: + return "loadBalancerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.backends != null && message.hasOwnProperty("backends")) { + if (!Array.isArray(message.backends)) + return "backends: array expected"; + for (var i = 0; i < message.backends.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.verify(message.backends[i]); + if (error) + return "backends." + error; + } + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + switch (message.backendType) { + default: + return "backendType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + if (!$util.isString(message.backendUri)) + return "backendUri: string expected"; + return null; + }; + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo + */ + LoadBalancerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "INTERNAL_TCP_UDP": + case 1: + message.loadBalancerType = 1; + break; + case "NETWORK_TCP_UDP": + case 2: + message.loadBalancerType = 2; + break; + case "HTTP_PROXY": + case 3: + message.loadBalancerType = 3; + break; + case "TCP_PROXY": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY": + case 5: + message.loadBalancerType = 5; + break; + } + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + if (object.backends) { + if (!Array.isArray(object.backends)) + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: array expected"); + message.backends = []; + for (var i = 0; i < object.backends.length; ++i) { + if (typeof object.backends[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: object expected"); + message.backends[i] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.fromObject(object.backends[i]); + } + } + switch (object.backendType) { + default: + if (typeof object.backendType === "number") { + message.backendType = object.backendType; + break; + } + break; + case "BACKEND_TYPE_UNSPECIFIED": + case 0: + message.backendType = 0; + break; + case "BACKEND_SERVICE": + case 1: + message.backendType = 1; + break; + case "TARGET_POOL": + case 2: + message.backendType = 2; + break; + case "TARGET_INSTANCE": + case 3: + message.backendType = 3; + break; + } + if (object.backendUri != null) + message.backendUri = String(object.backendUri); + return message; + }; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.LoadBalancerInfo} message LoadBalancerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backends = []; + if (options.defaults) { + object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; + object.healthCheckUri = ""; + object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; + object.backendUri = ""; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.backends && message.backends.length) { + object.backends = []; + for (var j = 0; j < message.backends.length; ++j) + object.backends[j] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.toObject(message.backends[j], options); + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + object.backendUri = message.backendUri; + return object; + }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerInfo"; + }; + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value + * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value + * @property {number} HTTP_PROXY=3 HTTP_PROXY value + * @property {number} TCP_PROXY=4 TCP_PROXY value + * @property {number} SSL_PROXY=5 SSL_PROXY value + */ + LoadBalancerInfo.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; + values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; + values[valuesById[3] = "HTTP_PROXY"] = 3; + values[valuesById[4] = "TCP_PROXY"] = 4; + values[valuesById[5] = "SSL_PROXY"] = 5; + return values; + })(); + + /** + * BackendType enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + * @enum {number} + * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value + * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value + * @property {number} TARGET_POOL=2 TARGET_POOL value + * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value + */ + LoadBalancerInfo.BackendType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKEND_SERVICE"] = 1; + values[valuesById[2] = "TARGET_POOL"] = 2; + values[valuesById[3] = "TARGET_INSTANCE"] = 3; + return values; + })(); + + return LoadBalancerInfo; + })(); + + v1.LoadBalancerBackend = (function() { + + /** + * Properties of a LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILoadBalancerBackend + * @property {string|null} [displayName] LoadBalancerBackend displayName + * @property {string|null} [uri] LoadBalancerBackend uri + * @property {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState + * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules + * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules + */ + + /** + * Constructs a new LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LoadBalancerBackend. + * @implements ILoadBalancerBackend + * @constructor + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set + */ + function LoadBalancerBackend(properties) { + this.healthCheckAllowingFirewallRules = []; + this.healthCheckBlockingFirewallRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackend displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.displayName = ""; + + /** + * LoadBalancerBackend uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.uri = ""; + + /** + * LoadBalancerBackend healthCheckFirewallState. + * @member {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckFirewallState = 0; + + /** + * LoadBalancerBackend healthCheckAllowingFirewallRules. + * @member {Array.} healthCheckAllowingFirewallRules + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; + + /** + * LoadBalancerBackend healthCheckBlockingFirewallRules. + * @member {Array.} healthCheckBlockingFirewallRules + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend instance + */ + LoadBalancerBackend.create = function create(properties) { + return new LoadBalancerBackend(properties); + }; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); + if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); + if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.healthCheckFirewallState = reader.int32(); + break; + } + case 4: { + if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) + message.healthCheckAllowingFirewallRules = []; + message.healthCheckAllowingFirewallRules.push(reader.string()); + break; + } + case 5: { + if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) + message.healthCheckBlockingFirewallRules = []; + message.healthCheckBlockingFirewallRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackend message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + switch (message.healthCheckFirewallState) { + default: + return "healthCheckFirewallState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { + if (!Array.isArray(message.healthCheckAllowingFirewallRules)) + return "healthCheckAllowingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) + return "healthCheckAllowingFirewallRules: string[] expected"; + } + if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { + if (!Array.isArray(message.healthCheckBlockingFirewallRules)) + return "healthCheckBlockingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) + return "healthCheckBlockingFirewallRules: string[] expected"; + } + return null; + }; + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend + */ + LoadBalancerBackend.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackend) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + switch (object.healthCheckFirewallState) { + default: + if (typeof object.healthCheckFirewallState === "number") { + message.healthCheckFirewallState = object.healthCheckFirewallState; + break; + } + break; + case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallState = 0; + break; + case "CONFIGURED": + case 1: + message.healthCheckFirewallState = 1; + break; + case "MISCONFIGURED": + case 2: + message.healthCheckFirewallState = 2; + break; + } + if (object.healthCheckAllowingFirewallRules) { + if (!Array.isArray(object.healthCheckAllowingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); + message.healthCheckAllowingFirewallRules = []; + for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) + message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); + } + if (object.healthCheckBlockingFirewallRules) { + if (!Array.isArray(object.healthCheckBlockingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); + message.healthCheckBlockingFirewallRules = []; + for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) + message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.LoadBalancerBackend} message LoadBalancerBackend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.healthCheckAllowingFirewallRules = []; + object.healthCheckBlockingFirewallRules = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; + if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { + object.healthCheckAllowingFirewallRules = []; + for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) + object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; + } + if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { + object.healthCheckBlockingFirewallRules = []; + for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) + object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; + } + return object; + }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackend + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackend"; + }; + + /** + * HealthCheckFirewallState enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value + * @property {number} CONFIGURED=1 CONFIGURED value + * @property {number} MISCONFIGURED=2 MISCONFIGURED value + */ + LoadBalancerBackend.HealthCheckFirewallState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIGURED"] = 1; + values[valuesById[2] = "MISCONFIGURED"] = 2; + return values; + })(); + + return LoadBalancerBackend; + })(); + + v1.VpnGatewayInfo = (function() { + + /** + * Properties of a VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IVpnGatewayInfo + * @property {string|null} [displayName] VpnGatewayInfo displayName + * @property {string|null} [uri] VpnGatewayInfo uri + * @property {string|null} [networkUri] VpnGatewayInfo networkUri + * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress + * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri + * @property {string|null} [region] VpnGatewayInfo region + */ + + /** + * Constructs a new VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a VpnGatewayInfo. + * @implements IVpnGatewayInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set + */ + function VpnGatewayInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnGatewayInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.displayName = ""; + + /** + * VpnGatewayInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.uri = ""; + + /** + * VpnGatewayInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.networkUri = ""; + + /** + * VpnGatewayInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.ipAddress = ""; + + /** + * VpnGatewayInfo vpnTunnelUri. + * @member {string} vpnTunnelUri + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.vpnTunnelUri = ""; + + /** + * VpnGatewayInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.region = ""; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo instance + */ + VpnGatewayInfo.create = function create(properties) { + return new VpnGatewayInfo(properties); + }; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 5: { + message.vpnTunnelUri = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnGatewayInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnGatewayInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + if (!$util.isString(message.vpnTunnelUri)) + return "vpnTunnelUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo + */ + VpnGatewayInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.VpnGatewayInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.vpnTunnelUri != null) + message.vpnTunnelUri = String(object.vpnTunnelUri); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.VpnGatewayInfo} message VpnGatewayInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnGatewayInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.ipAddress = ""; + object.vpnTunnelUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + object.vpnTunnelUri = message.vpnTunnelUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + * @returns {Object.} JSON object + */ + VpnGatewayInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnGatewayInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnGatewayInfo"; + }; + + return VpnGatewayInfo; + })(); + + v1.VpnTunnelInfo = (function() { + + /** + * Properties of a VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IVpnTunnelInfo + * @property {string|null} [displayName] VpnTunnelInfo displayName + * @property {string|null} [uri] VpnTunnelInfo uri + * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway + * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway + * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp + * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp + * @property {string|null} [networkUri] VpnTunnelInfo networkUri + * @property {string|null} [region] VpnTunnelInfo region + * @property {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType + */ + + /** + * Constructs a new VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a VpnTunnelInfo. + * @implements IVpnTunnelInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set + */ + function VpnTunnelInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnTunnelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.displayName = ""; + + /** + * VpnTunnelInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.uri = ""; + + /** + * VpnTunnelInfo sourceGateway. + * @member {string} sourceGateway + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGateway = ""; + + /** + * VpnTunnelInfo remoteGateway. + * @member {string} remoteGateway + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGateway = ""; + + /** + * VpnTunnelInfo remoteGatewayIp. + * @member {string} remoteGatewayIp + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGatewayIp = ""; + + /** + * VpnTunnelInfo sourceGatewayIp. + * @member {string} sourceGatewayIp + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGatewayIp = ""; + + /** + * VpnTunnelInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.networkUri = ""; + + /** + * VpnTunnelInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.region = ""; + + /** + * VpnTunnelInfo routingType. + * @member {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType} routingType + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.routingType = 0; + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo instance + */ + VpnTunnelInfo.create = function create(properties) { + return new VpnTunnelInfo(properties); + }; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); + if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); + if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); + if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); + return writer; + }; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.sourceGateway = reader.string(); + break; + } + case 4: { + message.remoteGateway = reader.string(); + break; + } + case 5: { + message.remoteGatewayIp = reader.string(); + break; + } + case 6: { + message.sourceGatewayIp = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.routingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnTunnelInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnTunnelInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + if (!$util.isString(message.sourceGateway)) + return "sourceGateway: string expected"; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + if (!$util.isString(message.remoteGateway)) + return "remoteGateway: string expected"; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + if (!$util.isString(message.remoteGatewayIp)) + return "remoteGatewayIp: string expected"; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + if (!$util.isString(message.sourceGatewayIp)) + return "sourceGatewayIp: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.routingType != null && message.hasOwnProperty("routingType")) + switch (message.routingType) { + default: + return "routingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo + */ + VpnTunnelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.VpnTunnelInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sourceGateway != null) + message.sourceGateway = String(object.sourceGateway); + if (object.remoteGateway != null) + message.remoteGateway = String(object.remoteGateway); + if (object.remoteGatewayIp != null) + message.remoteGatewayIp = String(object.remoteGatewayIp); + if (object.sourceGatewayIp != null) + message.sourceGatewayIp = String(object.sourceGatewayIp); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + switch (object.routingType) { + default: + if (typeof object.routingType === "number") { + message.routingType = object.routingType; + break; + } + break; + case "ROUTING_TYPE_UNSPECIFIED": + case 0: + message.routingType = 0; + break; + case "ROUTE_BASED": + case 1: + message.routingType = 1; + break; + case "POLICY_BASED": + case 2: + message.routingType = 2; + break; + case "DYNAMIC": + case 3: + message.routingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.VpnTunnelInfo} message VpnTunnelInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnTunnelInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.sourceGateway = ""; + object.remoteGateway = ""; + object.remoteGatewayIp = ""; + object.sourceGatewayIp = ""; + object.networkUri = ""; + object.region = ""; + object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + object.sourceGateway = message.sourceGateway; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + object.remoteGateway = message.remoteGateway; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + object.remoteGatewayIp = message.remoteGatewayIp; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + object.sourceGatewayIp = message.sourceGatewayIp; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.routingType != null && message.hasOwnProperty("routingType")) + object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; + return object; + }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + * @returns {Object.} JSON object + */ + VpnTunnelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnTunnelInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnTunnelInfo"; + }; + + /** + * RoutingType enum. + * @name google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType + * @enum {number} + * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value + * @property {number} ROUTE_BASED=1 ROUTE_BASED value + * @property {number} POLICY_BASED=2 POLICY_BASED value + * @property {number} DYNAMIC=3 DYNAMIC value + */ + VpnTunnelInfo.RoutingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROUTE_BASED"] = 1; + values[valuesById[2] = "POLICY_BASED"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + return values; + })(); + + return VpnTunnelInfo; + })(); + + v1.EndpointInfo = (function() { + + /** + * Properties of an EndpointInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IEndpointInfo + * @property {string|null} [sourceIp] EndpointInfo sourceIp + * @property {string|null} [destinationIp] EndpointInfo destinationIp + * @property {string|null} [protocol] EndpointInfo protocol + * @property {number|null} [sourcePort] EndpointInfo sourcePort + * @property {number|null} [destinationPort] EndpointInfo destinationPort + * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri + * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri + * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri + */ + + /** + * Constructs a new EndpointInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an EndpointInfo. + * @implements IEndpointInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set + */ + function EndpointInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EndpointInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceIp = ""; + + /** + * EndpointInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationIp = ""; + + /** + * EndpointInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.protocol = ""; + + /** + * EndpointInfo sourcePort. + * @member {number} sourcePort + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourcePort = 0; + + /** + * EndpointInfo destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationPort = 0; + + /** + * EndpointInfo sourceNetworkUri. + * @member {string} sourceNetworkUri + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceNetworkUri = ""; + + /** + * EndpointInfo destinationNetworkUri. + * @member {string} destinationNetworkUri + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationNetworkUri = ""; + + /** + * EndpointInfo sourceAgentUri. + * @member {string} sourceAgentUri + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceAgentUri = ""; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo instance + */ + EndpointInfo.create = function create(properties) { + return new EndpointInfo(properties); + }; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); + if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); + if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); + if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); + return writer; + }; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.destinationIp = reader.string(); + break; + } + case 3: { + message.protocol = reader.string(); + break; + } + case 4: { + message.sourcePort = reader.int32(); + break; + } + case 5: { + message.destinationPort = reader.int32(); + break; + } + case 6: { + message.sourceNetworkUri = reader.string(); + break; + } + case 7: { + message.destinationNetworkUri = reader.string(); + break; + } + case 8: { + message.sourceAgentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndpointInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndpointInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isInteger(message.sourcePort)) + return "sourcePort: integer expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + if (!$util.isString(message.sourceNetworkUri)) + return "sourceNetworkUri: string expected"; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + if (!$util.isString(message.destinationNetworkUri)) + return "destinationNetworkUri: string expected"; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + if (!$util.isString(message.sourceAgentUri)) + return "sourceAgentUri: string expected"; + return null; + }; + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo + */ + EndpointInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.EndpointInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.sourcePort != null) + message.sourcePort = object.sourcePort | 0; + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; + if (object.sourceNetworkUri != null) + message.sourceNetworkUri = String(object.sourceNetworkUri); + if (object.destinationNetworkUri != null) + message.destinationNetworkUri = String(object.destinationNetworkUri); + if (object.sourceAgentUri != null) + message.sourceAgentUri = String(object.sourceAgentUri); + return message; + }; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.EndpointInfo} message EndpointInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndpointInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.destinationIp = ""; + object.protocol = ""; + object.sourcePort = 0; + object.destinationPort = 0; + object.sourceNetworkUri = ""; + object.destinationNetworkUri = ""; + object.sourceAgentUri = ""; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + object.sourceNetworkUri = message.sourceNetworkUri; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + object.destinationNetworkUri = message.destinationNetworkUri; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + object.sourceAgentUri = message.sourceAgentUri; + return object; + }; + + /** + * Converts this EndpointInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + * @returns {Object.} JSON object + */ + EndpointInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndpointInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.EndpointInfo"; + }; + + return EndpointInfo; + })(); + + v1.DeliverInfo = (function() { + + /** + * Properties of a DeliverInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IDeliverInfo + * @property {google.cloud.networkmanagement.v1.DeliverInfo.Target|null} [target] DeliverInfo target + * @property {string|null} [resourceUri] DeliverInfo resourceUri + * @property {string|null} [ipAddress] DeliverInfo ipAddress + * @property {string|null} [storageBucket] DeliverInfo storageBucket + * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget + */ + + /** + * Constructs a new DeliverInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a DeliverInfo. + * @implements IDeliverInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set + */ + function DeliverInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliverInfo target. + * @member {google.cloud.networkmanagement.v1.DeliverInfo.Target} target + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.target = 0; + + /** + * DeliverInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.resourceUri = ""; + + /** + * DeliverInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.ipAddress = ""; + + /** + * DeliverInfo storageBucket. + * @member {string} storageBucket + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.storageBucket = ""; + + /** + * DeliverInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo instance + */ + DeliverInfo.create = function create(properties) { + return new DeliverInfo(properties); + }; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.storageBucket = reader.string(); + break; + } + case 5: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeliverInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeliverInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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: + case 15: + case 16: + case 17: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + if (!$util.isString(message.storageBucket)) + return "storageBucket: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo + */ + DeliverInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.DeliverInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "INSTANCE": + case 1: + message.target = 1; + break; + case "INTERNET": + case 2: + message.target = 2; + break; + case "GOOGLE_API": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "CLOUD_SQL_INSTANCE": + case 5: + message.target = 5; + break; + case "PSC_PUBLISHED_SERVICE": + case 6: + message.target = 6; + break; + case "PSC_GOOGLE_API": + case 7: + message.target = 7; + break; + case "PSC_VPC_SC": + case 8: + message.target = 8; + break; + case "SERVERLESS_NEG": + case 9: + message.target = 9; + break; + case "STORAGE_BUCKET": + case 10: + message.target = 10; + break; + case "PRIVATE_NETWORK": + case 11: + message.target = 11; + break; + case "CLOUD_FUNCTION": + case 12: + message.target = 12; + break; + case "APP_ENGINE_VERSION": + case 13: + message.target = 13; + break; + case "CLOUD_RUN_REVISION": + case 14: + message.target = 14; + break; + case "GOOGLE_MANAGED_SERVICE": + case 15: + message.target = 15; + break; + case "REDIS_INSTANCE": + case 16: + message.target = 16; + break; + case "REDIS_CLUSTER": + case 17: + message.target = 17; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.storageBucket != null) + message.storageBucket = String(object.storageBucket); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.DeliverInfo} message DeliverInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeliverInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + object.storageBucket = ""; + object.pscGoogleApiTarget = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + object.storageBucket = message.storageBucket; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this DeliverInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + * @returns {Object.} JSON object + */ + DeliverInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeliverInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeliverInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1.DeliverInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} INTERNET=2 INTERNET value + * @property {number} GOOGLE_API=3 GOOGLE_API value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value + * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value + * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value + * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value + * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value + * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value + * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value + * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value + * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value + * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value + * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value + * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value + * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value + */ + DeliverInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "INTERNET"] = 2; + values[valuesById[3] = "GOOGLE_API"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; + values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; + values[valuesById[7] = "PSC_GOOGLE_API"] = 7; + values[valuesById[8] = "PSC_VPC_SC"] = 8; + values[valuesById[9] = "SERVERLESS_NEG"] = 9; + values[valuesById[10] = "STORAGE_BUCKET"] = 10; + values[valuesById[11] = "PRIVATE_NETWORK"] = 11; + values[valuesById[12] = "CLOUD_FUNCTION"] = 12; + values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; + values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; + values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; + values[valuesById[16] = "REDIS_INSTANCE"] = 16; + values[valuesById[17] = "REDIS_CLUSTER"] = 17; + return values; + })(); + + return DeliverInfo; + })(); + + v1.ForwardInfo = (function() { + + /** + * Properties of a ForwardInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IForwardInfo + * @property {google.cloud.networkmanagement.v1.ForwardInfo.Target|null} [target] ForwardInfo target + * @property {string|null} [resourceUri] ForwardInfo resourceUri + * @property {string|null} [ipAddress] ForwardInfo ipAddress + */ + + /** + * Constructs a new ForwardInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ForwardInfo. + * @implements IForwardInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set + */ + function ForwardInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardInfo target. + * @member {google.cloud.networkmanagement.v1.ForwardInfo.Target} target + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.target = 0; + + /** + * ForwardInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.resourceUri = ""; + + /** + * ForwardInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.ipAddress = ""; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo instance + */ + ForwardInfo.create = function create(properties) { + return new ForwardInfo(properties); + }; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo + */ + ForwardInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "PEERING_VPC": + case 1: + message.target = 1; + break; + case "VPN_GATEWAY": + case 2: + message.target = 2; + break; + case "INTERCONNECT": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": + case 5: + message.target = 5; + break; + case "CLOUD_SQL_INSTANCE": + case 6: + message.target = 6; + break; + case "ANOTHER_PROJECT": + case 7: + message.target = 7; + break; + case "NCC_HUB": + case 8: + message.target = 8; + break; + case "ROUTER_APPLIANCE": + case 9: + message.target = 9; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.ForwardInfo} message ForwardInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this ForwardInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1.ForwardInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} PEERING_VPC=1 PEERING_VPC value + * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value + * @property {number} INTERCONNECT=3 INTERCONNECT value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value + * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value + * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value + * @property {number} NCC_HUB=8 NCC_HUB value + * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value + */ + ForwardInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "PEERING_VPC"] = 1; + values[valuesById[2] = "VPN_GATEWAY"] = 2; + values[valuesById[3] = "INTERCONNECT"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; + values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; + values[valuesById[7] = "ANOTHER_PROJECT"] = 7; + values[valuesById[8] = "NCC_HUB"] = 8; + values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; + return values; + })(); + + return ForwardInfo; + })(); + + v1.AbortInfo = (function() { + + /** + * Properties of an AbortInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IAbortInfo + * @property {google.cloud.networkmanagement.v1.AbortInfo.Cause|null} [cause] AbortInfo cause + * @property {string|null} [resourceUri] AbortInfo resourceUri + * @property {string|null} [ipAddress] AbortInfo ipAddress + * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission + */ + + /** + * Constructs a new AbortInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an AbortInfo. + * @implements IAbortInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set + */ + function AbortInfo(properties) { + this.projectsMissingPermission = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbortInfo cause. + * @member {google.cloud.networkmanagement.v1.AbortInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.cause = 0; + + /** + * AbortInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.resourceUri = ""; + + /** + * AbortInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.ipAddress = ""; + + /** + * AbortInfo projectsMissingPermission. + * @member {Array.} projectsMissingPermission + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo instance + */ + AbortInfo.create = function create(properties) { + return new AbortInfo(properties); + }; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 3: { + if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) + message.projectsMissingPermission = []; + message.projectsMissingPermission.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbortInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbortInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 3: + case 7: + case 8: + case 11: + case 12: + case 13: + case 14: + case 2: + case 32: + case 23: + case 4: + case 28: + case 29: + case 36: + case 5: + case 6: + case 9: + case 10: + case 15: + case 16: + case 17: + case 18: + case 24: + case 25: + case 26: + case 27: + case 19: + case 20: + case 34: + case 35: + case 21: + case 22: + case 30: + case 31: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { + if (!Array.isArray(message.projectsMissingPermission)) + return "projectsMissingPermission: array expected"; + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + if (!$util.isString(message.projectsMissingPermission[i])) + return "projectsMissingPermission: string[] expected"; + } + return null; + }; + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo + */ + AbortInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.AbortInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_NETWORK": + case 1: + message.cause = 1; + break; + case "UNKNOWN_PROJECT": + case 3: + message.cause = 3; + break; + case "NO_EXTERNAL_IP": + case 7: + message.cause = 7; + break; + case "UNINTENDED_DESTINATION": + case 8: + message.cause = 8; + break; + case "SOURCE_ENDPOINT_NOT_FOUND": + case 11: + message.cause = 11; + break; + case "MISMATCHED_SOURCE_NETWORK": + case 12: + message.cause = 12; + break; + case "DESTINATION_ENDPOINT_NOT_FOUND": + case 13: + message.cause = 13; + break; + case "MISMATCHED_DESTINATION_NETWORK": + case 14: + message.cause = 14; + break; + case "UNKNOWN_IP": + case 2: + message.cause = 2; + break; + case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": + case 32: + message.cause = 32; + break; + case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": + case 23: + message.cause = 23; + break; + case "PERMISSION_DENIED": + case 4: + message.cause = 4; + break; + case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": + case 28: + message.cause = 28; + break; + case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": + case 29: + message.cause = 29; + break; + case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": + case 36: + message.cause = 36; + break; + case "NO_SOURCE_LOCATION": + case 5: + message.cause = 5; + break; + case "INVALID_ARGUMENT": + case 6: + message.cause = 6; + break; + case "TRACE_TOO_LONG": + case 9: + message.cause = 9; + break; + case "INTERNAL_ERROR": + case 10: + message.cause = 10; + break; + case "UNSUPPORTED": + case 15: + message.cause = 15; + break; + case "MISMATCHED_IP_VERSION": + case 16: + message.cause = 16; + break; + case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": + case 17: + message.cause = 17; + break; + case "RESOURCE_CONFIG_NOT_FOUND": + case 18: + message.cause = 18; + break; + case "VM_INSTANCE_CONFIG_NOT_FOUND": + case 24: + message.cause = 24; + break; + case "NETWORK_CONFIG_NOT_FOUND": + case 25: + message.cause = 25; + break; + case "FIREWALL_CONFIG_NOT_FOUND": + case 26: + message.cause = 26; + break; + case "ROUTE_CONFIG_NOT_FOUND": + case 27: + message.cause = 27; + break; + case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": + case 19: + message.cause = 19; + break; + case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": + case 20: + message.cause = 20; + break; + case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": + case 34: + message.cause = 34; + break; + case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": + case 35: + message.cause = 35; + break; + case "SOURCE_FORWARDING_RULE_UNSUPPORTED": + case 21: + message.cause = 21; + break; + case "NON_ROUTABLE_IP_ADDRESS": + case 22: + message.cause = 22; + break; + case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": + case 30: + message.cause = 30; + break; + case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": + case 31: + message.cause = 31; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.projectsMissingPermission) { + if (!Array.isArray(object.projectsMissingPermission)) + throw TypeError(".google.cloud.networkmanagement.v1.AbortInfo.projectsMissingPermission: array expected"); + message.projectsMissingPermission = []; + for (var i = 0; i < object.projectsMissingPermission.length; ++i) + message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); + } + return message; + }; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.AbortInfo} message AbortInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbortInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectsMissingPermission = []; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.projectsMissingPermission && message.projectsMissingPermission.length) { + object.projectsMissingPermission = []; + for (var j = 0; j < message.projectsMissingPermission.length; ++j) + object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this AbortInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + * @returns {Object.} JSON object + */ + AbortInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbortInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AbortInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1.AbortInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value + * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value + * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value + * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value + * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value + * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value + * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value + * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value + * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value + * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value + * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value + * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value + * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value + * @property {number} UNSUPPORTED=15 UNSUPPORTED value + * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value + * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value + * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value + * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value + * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value + * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value + * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value + * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value + * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value + * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value + * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value + * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value + * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value + * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value + * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value + */ + AbortInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; + values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; + values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; + values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; + values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; + values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; + values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; + values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; + values[valuesById[2] = "UNKNOWN_IP"] = 2; + values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; + values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; + values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; + values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; + values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; + values[valuesById[6] = "INVALID_ARGUMENT"] = 6; + values[valuesById[9] = "TRACE_TOO_LONG"] = 9; + values[valuesById[10] = "INTERNAL_ERROR"] = 10; + values[valuesById[15] = "UNSUPPORTED"] = 15; + values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; + values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; + values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; + values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; + values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; + values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; + values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; + values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; + values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; + values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; + values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; + values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; + values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; + values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; + values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; + return values; + })(); + + return AbortInfo; + })(); + + v1.DropInfo = (function() { + + /** + * Properties of a DropInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IDropInfo + * @property {google.cloud.networkmanagement.v1.DropInfo.Cause|null} [cause] DropInfo cause + * @property {string|null} [resourceUri] DropInfo resourceUri + * @property {string|null} [sourceIp] DropInfo sourceIp + * @property {string|null} [destinationIp] DropInfo destinationIp + * @property {string|null} [region] DropInfo region + */ + + /** + * Constructs a new DropInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a DropInfo. + * @implements IDropInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set + */ + function DropInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DropInfo cause. + * @member {google.cloud.networkmanagement.v1.DropInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.cause = 0; + + /** + * DropInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.resourceUri = ""; + + /** + * DropInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.sourceIp = ""; + + /** + * DropInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.destinationIp = ""; + + /** + * DropInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.region = ""; + + /** + * Creates a new DropInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo instance + */ + DropInfo.create = function create(properties) { + return new DropInfo(properties); + }; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); + return writer; + }; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DropInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.sourceIp = reader.string(); + break; + } + case 4: { + message.destinationIp = reader.string(); + break; + } + case 5: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DropInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DropInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 42: + case 43: + case 49: + case 50: + case 51: + case 52: + case 53: + case 44: + case 45: + case 46: + case 7: + case 8: + case 47: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 27: + case 28: + case 68: + case 69: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 38: + case 36: + case 21: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 63: + case 22: + case 23: + case 24: + case 60: + case 61: + case 25: + case 26: + case 41: + case 48: + case 54: + case 58: + case 57: + case 64: + case 55: + case 56: + case 29: + case 37: + case 39: + case 40: + case 59: + case 62: + case 65: + case 66: + case 67: + case 70: + case 71: + case 72: + case 73: + case 74: + case 78: + case 75: + case 76: + case 77: + case 79: + case 80: + case 81: + case 82: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo + */ + DropInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.DropInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.DropInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_EXTERNAL_ADDRESS": + case 1: + message.cause = 1; + break; + case "FOREIGN_IP_DISALLOWED": + case 2: + message.cause = 2; + break; + case "FIREWALL_RULE": + case 3: + message.cause = 3; + break; + case "NO_ROUTE": + case 4: + message.cause = 4; + break; + case "ROUTE_BLACKHOLE": + case 5: + message.cause = 5; + break; + case "ROUTE_WRONG_NETWORK": + case 6: + message.cause = 6; + break; + case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": + case 42: + message.cause = 42; + break; + case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": + case 43: + message.cause = 43; + break; + case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": + case 49: + message.cause = 49; + break; + case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": + case 50: + message.cause = 50; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": + case 51: + message.cause = 51; + break; + case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": + case 52: + message.cause = 52; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": + case 53: + message.cause = 53; + break; + case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": + case 44: + message.cause = 44; + break; + case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": + case 45: + message.cause = 45; + break; + case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": + case 46: + message.cause = 46; + break; + case "PRIVATE_TRAFFIC_TO_INTERNET": + case 7: + message.cause = 7; + break; + case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": + case 8: + message.cause = 8; + break; + case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": + case 47: + message.cause = 47; + break; + case "NO_EXTERNAL_ADDRESS": + case 9: + message.cause = 9; + break; + case "UNKNOWN_INTERNAL_ADDRESS": + case 10: + message.cause = 10; + break; + case "FORWARDING_RULE_MISMATCH": + case 11: + message.cause = 11; + break; + case "FORWARDING_RULE_NO_INSTANCES": + case 12: + message.cause = 12; + break; + case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": + case 13: + message.cause = 13; + break; + case "INSTANCE_NOT_RUNNING": + case 14: + message.cause = 14; + break; + case "GKE_CLUSTER_NOT_RUNNING": + case 27: + message.cause = 27; + break; + case "CLOUD_SQL_INSTANCE_NOT_RUNNING": + case 28: + message.cause = 28; + break; + case "REDIS_INSTANCE_NOT_RUNNING": + case 68: + message.cause = 68; + break; + case "REDIS_CLUSTER_NOT_RUNNING": + case 69: + message.cause = 69; + break; + case "TRAFFIC_TYPE_BLOCKED": + case 15: + message.cause = 15; + break; + case "GKE_MASTER_UNAUTHORIZED_ACCESS": + case 16: + message.cause = 16; + break; + case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": + case 17: + message.cause = 17; + break; + case "DROPPED_INSIDE_GKE_SERVICE": + case 18: + message.cause = 18; + break; + case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": + case 19: + message.cause = 19; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PEERING": + case 20: + message.cause = 20; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": + case 38: + message.cause = 38; + break; + case "GKE_PSC_ENDPOINT_MISSING": + case 36: + message.cause = 36; + break; + case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": + case 21: + message.cause = 21; + break; + case "GKE_CONTROL_PLANE_REGION_MISMATCH": + case 30: + message.cause = 30; + break; + case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": + case 31: + message.cause = 31; + break; + case "GKE_CONTROL_PLANE_NO_ROUTE": + case 32: + message.cause = 32; + break; + case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": + case 33: + message.cause = 33; + break; + case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": + case 34: + message.cause = 34; + break; + case "CLOUD_SQL_INSTANCE_NO_ROUTE": + case 35: + message.cause = 35; + break; + case "CLOUD_SQL_CONNECTOR_REQUIRED": + case 63: + message.cause = 63; + break; + case "CLOUD_FUNCTION_NOT_ACTIVE": + case 22: + message.cause = 22; + break; + case "VPC_CONNECTOR_NOT_SET": + case 23: + message.cause = 23; + break; + case "VPC_CONNECTOR_NOT_RUNNING": + case 24: + message.cause = 24; + break; + case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": + case 60: + message.cause = 60; + break; + case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": + case 61: + message.cause = 61; + break; + case "FORWARDING_RULE_REGION_MISMATCH": + case 25: + message.cause = 25; + break; + case "PSC_CONNECTION_NOT_ACCEPTED": + case 26: + message.cause = 26; + break; + case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": + case 41: + message.cause = 41; + break; + case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": + case 48: + message.cause = 48; + break; + case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": + case 54: + message.cause = 54; + break; + case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": + case 58: + message.cause = 58; + break; + case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": + case 57: + message.cause = 57; + break; + case "PSC_TRANSITIVITY_NOT_PROPAGATED": + case 64: + message.cause = 64; + break; + case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": + case 55: + message.cause = 55; + break; + case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": + case 56: + message.cause = 56; + break; + case "CLOUD_RUN_REVISION_NOT_READY": + case 29: + message.cause = 29; + break; + case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": + case 37: + message.cause = 37; + break; + case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": + case 39: + message.cause = 39; + break; + case "CLOUD_NAT_NO_ADDRESSES": + case 40: + message.cause = 40; + break; + case "ROUTING_LOOP": + case 59: + message.cause = 59; + break; + case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": + case 62: + message.cause = 62; + break; + case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": + case 65: + message.cause = 65; + break; + case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": + case 66: + message.cause = 66; + break; + case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": + case 67: + message.cause = 67; + break; + case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": + case 70: + message.cause = 70; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PORT": + case 71: + message.cause = 71; + break; + case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": + case 72: + message.cause = 72; + break; + case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": + case 73: + message.cause = 73; + break; + case "REDIS_INSTANCE_NO_EXTERNAL_IP": + case 74: + message.cause = 74; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": + case 78: + message.cause = 78; + break; + case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": + case 75: + message.cause = 75; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PORT": + case 76: + message.cause = 76; + break; + case "REDIS_CLUSTER_NO_EXTERNAL_IP": + case 77: + message.cause = 77; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": + case 79: + message.cause = 79; + break; + case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": + case 80: + message.cause = 80; + break; + case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": + case 81: + message.cause = 81; + break; + case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": + case 82: + message.cause = 82; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.DropInfo} message DropInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DropInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.sourceIp = ""; + object.destinationIp = ""; + object.region = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this DropInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + * @returns {Object.} JSON object + */ + DropInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DropInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DropInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1.DropInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value + * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value + * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value + * @property {number} NO_ROUTE=4 NO_ROUTE value + * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value + * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value + * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value + * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value + * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value + * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value + * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value + * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value + * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value + * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value + * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value + * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value + * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value + * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value + * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value + * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value + * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value + * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value + * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value + * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value + * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value + * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value + * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value + * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value + * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value + * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value + * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value + * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value + * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value + * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value + * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value + * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value + * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value + * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value + * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value + * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value + * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value + * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value + * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value + * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value + * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value + * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value + * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value + * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value + * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value + * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value + * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value + * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value + * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value + * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value + * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value + * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value + * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value + * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value + * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value + * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value + * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value + * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value + * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value + * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value + * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value + * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value + * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value + * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value + * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value + */ + DropInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; + values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; + values[valuesById[3] = "FIREWALL_RULE"] = 3; + values[valuesById[4] = "NO_ROUTE"] = 4; + values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; + values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; + values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; + values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; + values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; + values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; + values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; + values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; + values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; + values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; + values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; + values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; + values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; + values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; + values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; + values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; + values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; + values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; + values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; + values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; + values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; + values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; + values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; + values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; + values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; + values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; + values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; + values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; + values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; + values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; + values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; + values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; + values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; + values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; + values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; + values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; + values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; + values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; + values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; + values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; + values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; + values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; + values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; + values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; + values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; + values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; + values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; + values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; + values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; + values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; + values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; + values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; + values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; + values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; + values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; + values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; + values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; + values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; + values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; + values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; + values[valuesById[59] = "ROUTING_LOOP"] = 59; + values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; + values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; + values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; + values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; + values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; + values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; + values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; + values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; + values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; + values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; + values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; + values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; + values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; + values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; + values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; + values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; + values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; + return values; + })(); + + return DropInfo; + })(); + + v1.GKEMasterInfo = (function() { + + /** + * Properties of a GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IGKEMasterInfo + * @property {string|null} [clusterUri] GKEMasterInfo clusterUri + * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri + * @property {string|null} [internalIp] GKEMasterInfo internalIp + * @property {string|null} [externalIp] GKEMasterInfo externalIp + */ + + /** + * Constructs a new GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a GKEMasterInfo. + * @implements IGKEMasterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set + */ + function GKEMasterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GKEMasterInfo clusterUri. + * @member {string} clusterUri + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterUri = ""; + + /** + * GKEMasterInfo clusterNetworkUri. + * @member {string} clusterNetworkUri + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterNetworkUri = ""; + + /** + * GKEMasterInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.internalIp = ""; + + /** + * GKEMasterInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.externalIp = ""; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo instance + */ + GKEMasterInfo.create = function create(properties) { + return new GKEMasterInfo(properties); + }; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); + if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + return writer; + }; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.clusterUri = reader.string(); + break; + } + case 4: { + message.clusterNetworkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GKEMasterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GKEMasterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + if (!$util.isString(message.clusterUri)) + return "clusterUri: string expected"; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + if (!$util.isString(message.clusterNetworkUri)) + return "clusterNetworkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + return null; + }; + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo + */ + GKEMasterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.GKEMasterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); + if (object.clusterUri != null) + message.clusterUri = String(object.clusterUri); + if (object.clusterNetworkUri != null) + message.clusterNetworkUri = String(object.clusterNetworkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + return message; + }; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.GKEMasterInfo} message GKEMasterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GKEMasterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterUri = ""; + object.clusterNetworkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + } + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + object.clusterUri = message.clusterUri; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + object.clusterNetworkUri = message.clusterNetworkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + return object; + }; + + /** + * Converts this GKEMasterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + * @returns {Object.} JSON object + */ + GKEMasterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GKEMasterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GKEMasterInfo"; + }; + + return GKEMasterInfo; + })(); + + v1.CloudSQLInstanceInfo = (function() { + + /** + * Properties of a CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICloudSQLInstanceInfo + * @property {string|null} [displayName] CloudSQLInstanceInfo displayName + * @property {string|null} [uri] CloudSQLInstanceInfo uri + * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri + * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp + * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp + * @property {string|null} [region] CloudSQLInstanceInfo region + */ + + /** + * Constructs a new CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CloudSQLInstanceInfo. + * @implements ICloudSQLInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set + */ + function CloudSQLInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudSQLInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.displayName = ""; + + /** + * CloudSQLInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.uri = ""; + + /** + * CloudSQLInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.networkUri = ""; + + /** + * CloudSQLInstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.internalIp = ""; + + /** + * CloudSQLInstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.externalIp = ""; + + /** + * CloudSQLInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.region = ""; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance + */ + CloudSQLInstanceInfo.create = function create(properties) { + return new CloudSQLInstanceInfo(properties); + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); + return writer; + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSQLInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + */ + CloudSQLInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSQLInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudSQLInstanceInfo"; + }; + + return CloudSQLInstanceInfo; + })(); + + v1.RedisInstanceInfo = (function() { + + /** + * Properties of a RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRedisInstanceInfo + * @property {string|null} [displayName] RedisInstanceInfo displayName + * @property {string|null} [uri] RedisInstanceInfo uri + * @property {string|null} [networkUri] RedisInstanceInfo networkUri + * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp + * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp + * @property {string|null} [region] RedisInstanceInfo region + */ + + /** + * Constructs a new RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RedisInstanceInfo. + * @implements IRedisInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set + */ + function RedisInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.displayName = ""; + + /** + * RedisInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.uri = ""; + + /** + * RedisInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.networkUri = ""; + + /** + * RedisInstanceInfo primaryEndpointIp. + * @member {string} primaryEndpointIp + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.primaryEndpointIp = ""; + + /** + * RedisInstanceInfo readEndpointIp. + * @member {string} readEndpointIp + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.readEndpointIp = ""; + + /** + * RedisInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.region = ""; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo instance + */ + RedisInstanceInfo.create = function create(properties) { + return new RedisInstanceInfo(properties); + }; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); + if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.primaryEndpointIp = reader.string(); + break; + } + case 5: { + message.readEndpointIp = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + if (!$util.isString(message.primaryEndpointIp)) + return "primaryEndpointIp: string expected"; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + if (!$util.isString(message.readEndpointIp)) + return "readEndpointIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo + */ + RedisInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RedisInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.primaryEndpointIp != null) + message.primaryEndpointIp = String(object.primaryEndpointIp); + if (object.readEndpointIp != null) + message.readEndpointIp = String(object.readEndpointIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.RedisInstanceInfo} message RedisInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.primaryEndpointIp = ""; + object.readEndpointIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + object.primaryEndpointIp = message.primaryEndpointIp; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + object.readEndpointIp = message.readEndpointIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + RedisInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisInstanceInfo"; + }; + + return RedisInstanceInfo; + })(); + + v1.RedisClusterInfo = (function() { + + /** + * Properties of a RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRedisClusterInfo + * @property {string|null} [displayName] RedisClusterInfo displayName + * @property {string|null} [uri] RedisClusterInfo uri + * @property {string|null} [networkUri] RedisClusterInfo networkUri + * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress + * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress + * @property {string|null} [location] RedisClusterInfo location + */ + + /** + * Constructs a new RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RedisClusterInfo. + * @implements IRedisClusterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set + */ + function RedisClusterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisClusterInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.displayName = ""; + + /** + * RedisClusterInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.uri = ""; + + /** + * RedisClusterInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.networkUri = ""; + + /** + * RedisClusterInfo discoveryEndpointIpAddress. + * @member {string} discoveryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; + + /** + * RedisClusterInfo secondaryEndpointIpAddress. + * @member {string} secondaryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; + + /** + * RedisClusterInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.location = ""; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo instance + */ + RedisClusterInfo.create = function create(properties) { + return new RedisClusterInfo(properties); + }; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); + if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); + return writer; + }; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.discoveryEndpointIpAddress = reader.string(); + break; + } + case 5: { + message.secondaryEndpointIpAddress = reader.string(); + break; + } + case 6: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisClusterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisClusterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + if (!$util.isString(message.discoveryEndpointIpAddress)) + return "discoveryEndpointIpAddress: string expected"; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + if (!$util.isString(message.secondaryEndpointIpAddress)) + return "secondaryEndpointIpAddress: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo + */ + RedisClusterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RedisClusterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.discoveryEndpointIpAddress != null) + message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); + if (object.secondaryEndpointIpAddress != null) + message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.RedisClusterInfo} message RedisClusterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisClusterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.discoveryEndpointIpAddress = ""; + object.secondaryEndpointIpAddress = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this RedisClusterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + * @returns {Object.} JSON object + */ + RedisClusterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisClusterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisClusterInfo"; + }; + + return RedisClusterInfo; + })(); + + v1.CloudFunctionInfo = (function() { + + /** + * Properties of a CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICloudFunctionInfo + * @property {string|null} [displayName] CloudFunctionInfo displayName + * @property {string|null} [uri] CloudFunctionInfo uri + * @property {string|null} [location] CloudFunctionInfo location + * @property {number|Long|null} [versionId] CloudFunctionInfo versionId + */ + + /** + * Constructs a new CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CloudFunctionInfo. + * @implements ICloudFunctionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set + */ + function CloudFunctionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.displayName = ""; + + /** + * CloudFunctionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.uri = ""; + + /** + * CloudFunctionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.location = ""; + + /** + * CloudFunctionInfo versionId. + * @member {number|Long} versionId + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo instance + */ + CloudFunctionInfo.create = function create(properties) { + return new CloudFunctionInfo(properties); + }; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); + return writer; + }; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + case 4: { + message.versionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) + return "versionId: integer|Long expected"; + return null; + }; + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo + */ + CloudFunctionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CloudFunctionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.versionId != null) + if ($util.Long) + (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; + else if (typeof object.versionId === "string") + message.versionId = parseInt(object.versionId, 10); + else if (typeof object.versionId === "number") + message.versionId = object.versionId; + else if (typeof object.versionId === "object") + message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.CloudFunctionInfo} message CloudFunctionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionId = options.longs === String ? "0" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (typeof message.versionId === "number") + object.versionId = options.longs === String ? String(message.versionId) : message.versionId; + else + object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; + return object; + }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudFunctionInfo"; + }; + + return CloudFunctionInfo; + })(); + + v1.CloudRunRevisionInfo = (function() { + + /** + * Properties of a CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICloudRunRevisionInfo + * @property {string|null} [displayName] CloudRunRevisionInfo displayName + * @property {string|null} [uri] CloudRunRevisionInfo uri + * @property {string|null} [location] CloudRunRevisionInfo location + * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri + */ + + /** + * Constructs a new CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CloudRunRevisionInfo. + * @implements ICloudRunRevisionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set + */ + function CloudRunRevisionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.displayName = ""; + + /** + * CloudRunRevisionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.uri = ""; + + /** + * CloudRunRevisionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.location = ""; + + /** + * CloudRunRevisionInfo serviceUri. + * @member {string} serviceUri + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.serviceUri = ""; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo instance + */ + CloudRunRevisionInfo.create = function create(properties) { + return new CloudRunRevisionInfo(properties); + }; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + case 5: { + message.serviceUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + if (!$util.isString(message.serviceUri)) + return "serviceUri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo + */ + CloudRunRevisionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.serviceUri != null) + message.serviceUri = String(object.serviceUri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} message CloudRunRevisionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + object.serviceUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + object.serviceUri = message.serviceUri; + return object; + }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudRunRevisionInfo"; + }; + + return CloudRunRevisionInfo; + })(); + + v1.AppEngineVersionInfo = (function() { + + /** + * Properties of an AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IAppEngineVersionInfo + * @property {string|null} [displayName] AppEngineVersionInfo displayName + * @property {string|null} [uri] AppEngineVersionInfo uri + * @property {string|null} [runtime] AppEngineVersionInfo runtime + * @property {string|null} [environment] AppEngineVersionInfo environment + */ + + /** + * Constructs a new AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an AppEngineVersionInfo. + * @implements IAppEngineVersionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set + */ + function AppEngineVersionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.displayName = ""; + + /** + * AppEngineVersionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.uri = ""; + + /** + * AppEngineVersionInfo runtime. + * @member {string} runtime + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.runtime = ""; + + /** + * AppEngineVersionInfo environment. + * @member {string} environment + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.environment = ""; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo instance + */ + AppEngineVersionInfo.create = function create(properties) { + return new AppEngineVersionInfo(properties); + }; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.runtime = reader.string(); + break; + } + case 4: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.runtime != null && message.hasOwnProperty("runtime")) + if (!$util.isString(message.runtime)) + return "runtime: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo + */ + AppEngineVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.runtime != null) + message.runtime = String(object.runtime); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.AppEngineVersionInfo} message AppEngineVersionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.runtime = ""; + object.environment = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.runtime != null && message.hasOwnProperty("runtime")) + object.runtime = message.runtime; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AppEngineVersionInfo"; + }; + + return AppEngineVersionInfo; + })(); + + v1.VpcConnectorInfo = (function() { + + /** + * Properties of a VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IVpcConnectorInfo + * @property {string|null} [displayName] VpcConnectorInfo displayName + * @property {string|null} [uri] VpcConnectorInfo uri + * @property {string|null} [location] VpcConnectorInfo location + */ + + /** + * Constructs a new VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a VpcConnectorInfo. + * @implements IVpcConnectorInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set + */ + function VpcConnectorInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcConnectorInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.displayName = ""; + + /** + * VpcConnectorInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.uri = ""; + + /** + * VpcConnectorInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.location = ""; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo instance + */ + VpcConnectorInfo.create = function create(properties) { + return new VpcConnectorInfo(properties); + }; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + return writer; + }; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcConnectorInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcConnectorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo + */ + VpcConnectorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.VpcConnectorInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.VpcConnectorInfo} message VpcConnectorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcConnectorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + * @returns {Object.} JSON object + */ + VpcConnectorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcConnectorInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpcConnectorInfo"; + }; + + return VpcConnectorInfo; + })(); + + v1.NatInfo = (function() { + + /** + * Properties of a NatInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface INatInfo + * @property {google.cloud.networkmanagement.v1.NatInfo.Type|null} [type] NatInfo type + * @property {string|null} [protocol] NatInfo protocol + * @property {string|null} [networkUri] NatInfo networkUri + * @property {string|null} [oldSourceIp] NatInfo oldSourceIp + * @property {string|null} [newSourceIp] NatInfo newSourceIp + * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp + * @property {string|null} [newDestinationIp] NatInfo newDestinationIp + * @property {number|null} [oldSourcePort] NatInfo oldSourcePort + * @property {number|null} [newSourcePort] NatInfo newSourcePort + * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort + * @property {number|null} [newDestinationPort] NatInfo newDestinationPort + * @property {string|null} [routerUri] NatInfo routerUri + * @property {string|null} [natGatewayName] NatInfo natGatewayName + */ + + /** + * Constructs a new NatInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a NatInfo. + * @implements INatInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set + */ + function NatInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NatInfo type. + * @member {google.cloud.networkmanagement.v1.NatInfo.Type} type + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.type = 0; + + /** + * NatInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.protocol = ""; + + /** + * NatInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.networkUri = ""; + + /** + * NatInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourceIp = ""; + + /** + * NatInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newSourceIp = ""; + + /** + * NatInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationIp = ""; + + /** + * NatInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationIp = ""; + + /** + * NatInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourcePort = 0; + + /** + * NatInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newSourcePort = 0; + + /** + * NatInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationPort = 0; + + /** + * NatInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationPort = 0; + + /** + * NatInfo routerUri. + * @member {string} routerUri + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.routerUri = ""; + + /** + * NatInfo natGatewayName. + * @member {string} natGatewayName + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.natGatewayName = ""; + + /** + * Creates a new NatInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo instance + */ + NatInfo.create = function create(properties) { + return new NatInfo(properties); + }; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); + if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); + if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); + return writer; + }; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NatInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.protocol = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.oldSourceIp = reader.string(); + break; + } + case 5: { + message.newSourceIp = reader.string(); + break; + } + case 6: { + message.oldDestinationIp = reader.string(); + break; + } + case 7: { + message.newDestinationIp = reader.string(); + break; + } + case 8: { + message.oldSourcePort = reader.int32(); + break; + } + case 9: { + message.newSourcePort = reader.int32(); + break; + } + case 10: { + message.oldDestinationPort = reader.int32(); + break; + } + case 11: { + message.newDestinationPort = reader.int32(); + break; + } + case 12: { + message.routerUri = reader.string(); + break; + } + case 13: { + message.natGatewayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NatInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NatInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + if (!$util.isString(message.routerUri)) + return "routerUri: string expected"; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + if (!$util.isString(message.natGatewayName)) + return "natGatewayName: string expected"; + return null; + }; + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo + */ + NatInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.NatInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.NatInfo(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INTERNAL_TO_EXTERNAL": + case 1: + message.type = 1; + break; + case "EXTERNAL_TO_INTERNAL": + case 2: + message.type = 2; + break; + case "CLOUD_NAT": + case 3: + message.type = 3; + break; + case "PRIVATE_SERVICE_CONNECT": + case 4: + message.type = 4; + break; + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.routerUri != null) + message.routerUri = String(object.routerUri); + if (object.natGatewayName != null) + message.natGatewayName = String(object.natGatewayName); + return message; + }; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.NatInfo} message NatInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NatInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.protocol = ""; + object.networkUri = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.routerUri = ""; + object.natGatewayName = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] : message.type; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + object.routerUri = message.routerUri; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + object.natGatewayName = message.natGatewayName; + return object; + }; + + /** + * Converts this NatInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + * @returns {Object.} JSON object + */ + NatInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NatInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NatInfo"; + }; + + /** + * Type enum. + * @name google.cloud.networkmanagement.v1.NatInfo.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value + * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value + * @property {number} CLOUD_NAT=3 CLOUD_NAT value + * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value + */ + NatInfo.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; + values[valuesById[3] = "CLOUD_NAT"] = 3; + values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; + return values; + })(); + + return NatInfo; + })(); + + v1.ProxyConnectionInfo = (function() { + + /** + * Properties of a ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IProxyConnectionInfo + * @property {string|null} [protocol] ProxyConnectionInfo protocol + * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp + * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp + * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp + * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp + * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort + * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort + * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort + * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort + * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri + * @property {string|null} [networkUri] ProxyConnectionInfo networkUri + */ + + /** + * Constructs a new ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ProxyConnectionInfo. + * @implements IProxyConnectionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set + */ + function ProxyConnectionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProxyConnectionInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.protocol = ""; + + /** + * ProxyConnectionInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourceIp = ""; + + /** + * ProxyConnectionInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourceIp = ""; + + /** + * ProxyConnectionInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationIp = ""; + + /** + * ProxyConnectionInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationIp = ""; + + /** + * ProxyConnectionInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourcePort = 0; + + /** + * ProxyConnectionInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourcePort = 0; + + /** + * ProxyConnectionInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationPort = 0; + + /** + * ProxyConnectionInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationPort = 0; + + /** + * ProxyConnectionInfo subnetUri. + * @member {string} subnetUri + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.subnetUri = ""; + + /** + * ProxyConnectionInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.networkUri = ""; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo instance + */ + ProxyConnectionInfo.create = function create(properties) { + return new ProxyConnectionInfo(properties); + }; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); + if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); + return writer; + }; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protocol = reader.string(); + break; + } + case 2: { + message.oldSourceIp = reader.string(); + break; + } + case 3: { + message.newSourceIp = reader.string(); + break; + } + case 4: { + message.oldDestinationIp = reader.string(); + break; + } + case 5: { + message.newDestinationIp = reader.string(); + break; + } + case 6: { + message.oldSourcePort = reader.int32(); + break; + } + case 7: { + message.newSourcePort = reader.int32(); + break; + } + case 8: { + message.oldDestinationPort = reader.int32(); + break; + } + case 9: { + message.newDestinationPort = reader.int32(); + break; + } + case 10: { + message.subnetUri = reader.string(); + break; + } + case 11: { + message.networkUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProxyConnectionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProxyConnectionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + if (!$util.isString(message.subnetUri)) + return "subnetUri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + return null; + }; + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo + */ + ProxyConnectionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.subnetUri != null) + message.subnetUri = String(object.subnetUri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + return message; + }; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ProxyConnectionInfo} message ProxyConnectionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProxyConnectionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protocol = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.subnetUri = ""; + object.networkUri = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + object.subnetUri = message.subnetUri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + return object; + }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + * @returns {Object.} JSON object + */ + ProxyConnectionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProxyConnectionInfo"; + }; + + return ProxyConnectionInfo; + })(); + + v1.LoadBalancerBackendInfo = (function() { + + /** + * Properties of a LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILoadBalancerBackendInfo + * @property {string|null} [name] LoadBalancerBackendInfo name + * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri + * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri + * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri + * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri + * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri + * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget + * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri + * @property {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState + */ + + /** + * Constructs a new LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LoadBalancerBackendInfo. + * @implements ILoadBalancerBackendInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set + */ + function LoadBalancerBackendInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackendInfo name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.name = ""; + + /** + * LoadBalancerBackendInfo instanceUri. + * @member {string} instanceUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceUri = ""; + + /** + * LoadBalancerBackendInfo backendServiceUri. + * @member {string} backendServiceUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendServiceUri = ""; + + /** + * LoadBalancerBackendInfo instanceGroupUri. + * @member {string} instanceGroupUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; + + /** + * LoadBalancerBackendInfo networkEndpointGroupUri. + * @member {string} networkEndpointGroupUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; + + /** + * LoadBalancerBackendInfo backendBucketUri. + * @member {string} backendBucketUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendBucketUri = ""; + + /** + * LoadBalancerBackendInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * LoadBalancerBackendInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; + + /** + * LoadBalancerBackendInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerBackendInfo healthCheckFirewallsConfigState. + * @member {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance + */ + LoadBalancerBackendInfo.create = function create(properties) { + return new LoadBalancerBackendInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); + if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); + if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); + if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); + if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); + if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instanceUri = reader.string(); + break; + } + case 3: { + message.backendServiceUri = reader.string(); + break; + } + case 4: { + message.instanceGroupUri = reader.string(); + break; + } + case 5: { + message.networkEndpointGroupUri = reader.string(); + break; + } + case 8: { + message.backendBucketUri = reader.string(); + break; + } + case 9: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 10: { + message.pscGoogleApiTarget = reader.string(); + break; + } + case 6: { + message.healthCheckUri = reader.string(); + break; + } + case 7: { + message.healthCheckFirewallsConfigState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackendInfo.verify = function verify(message) { + if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) + if (!$util.isString(message.instanceUri)) + return "instanceUri: string expected"; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + if (!$util.isString(message.backendServiceUri)) + return "backendServiceUri: string expected"; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + if (!$util.isString(message.instanceGroupUri)) + return "instanceGroupUri: string expected"; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + if (!$util.isString(message.networkEndpointGroupUri)) + return "networkEndpointGroupUri: string expected"; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + if (!$util.isString(message.backendBucketUri)) + return "backendBucketUri: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + switch (message.healthCheckFirewallsConfigState) { + default: + return "healthCheckFirewallsConfigState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + */ + LoadBalancerBackendInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceUri != null) + message.instanceUri = String(object.instanceUri); + if (object.backendServiceUri != null) + message.backendServiceUri = String(object.backendServiceUri); + if (object.instanceGroupUri != null) + message.instanceGroupUri = String(object.instanceGroupUri); + if (object.networkEndpointGroupUri != null) + message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); + if (object.backendBucketUri != null) + message.backendBucketUri = String(object.backendBucketUri); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + switch (object.healthCheckFirewallsConfigState) { + default: + if (typeof object.healthCheckFirewallsConfigState === "number") { + message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; + break; + } + break; + case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallsConfigState = 0; + break; + case "FIREWALLS_CONFIGURED": + case 1: + message.healthCheckFirewallsConfigState = 1; + break; + case "FIREWALLS_PARTIALLY_CONFIGURED": + case 2: + message.healthCheckFirewallsConfigState = 2; + break; + case "FIREWALLS_NOT_CONFIGURED": + case 3: + message.healthCheckFirewallsConfigState = 3; + break; + case "FIREWALLS_UNSUPPORTED": + case 4: + message.healthCheckFirewallsConfigState = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackendInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceUri = ""; + object.backendServiceUri = ""; + object.instanceGroupUri = ""; + object.networkEndpointGroupUri = ""; + object.healthCheckUri = ""; + object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; + object.backendBucketUri = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) + object.instanceUri = message.instanceUri; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + object.backendServiceUri = message.backendServiceUri; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + object.instanceGroupUri = message.instanceGroupUri; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + object.networkEndpointGroupUri = message.networkEndpointGroupUri; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + object.backendBucketUri = message.backendBucketUri; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackendInfo"; + }; + + /** + * HealthCheckFirewallsConfigState enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value + * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value + * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value + * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value + * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value + */ + LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; + values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; + values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; + values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; + return values; + })(); + + return LoadBalancerBackendInfo; + })(); + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value + * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value + * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value + * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value + * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value + * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value + * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value + * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value + * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value + * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value + */ + v1.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; + values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; + values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; + values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; + values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; + values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; + values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; + values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; + values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; + values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; + return values; + })(); + + v1.StorageBucketInfo = (function() { + + /** + * Properties of a StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IStorageBucketInfo + * @property {string|null} [bucket] StorageBucketInfo bucket + */ + + /** + * Constructs a new StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a StorageBucketInfo. + * @implements IStorageBucketInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set + */ + function StorageBucketInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageBucketInfo bucket. + * @member {string} bucket + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @instance + */ + StorageBucketInfo.prototype.bucket = ""; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo instance + */ + StorageBucketInfo.create = function create(properties) { + return new StorageBucketInfo(properties); + }; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageBucketInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageBucketInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo + */ + StorageBucketInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.StorageBucketInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.StorageBucketInfo} message StorageBucketInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageBucketInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this StorageBucketInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @instance + * @returns {Object.} JSON object + */ + StorageBucketInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageBucketInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.StorageBucketInfo"; + }; + + return StorageBucketInfo; + })(); + + v1.ServerlessNegInfo = (function() { + + /** + * Properties of a ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IServerlessNegInfo + * @property {string|null} [negUri] ServerlessNegInfo negUri + */ + + /** + * Constructs a new ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ServerlessNegInfo. + * @implements IServerlessNegInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set + */ + function ServerlessNegInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerlessNegInfo negUri. + * @member {string} negUri + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @instance + */ + ServerlessNegInfo.prototype.negUri = ""; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo instance + */ + ServerlessNegInfo.create = function create(properties) { + return new ServerlessNegInfo(properties); + }; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); + return writer; + }; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.negUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerlessNegInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerlessNegInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.negUri != null && message.hasOwnProperty("negUri")) + if (!$util.isString(message.negUri)) + return "negUri: string expected"; + return null; + }; + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo + */ + ServerlessNegInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ServerlessNegInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); + if (object.negUri != null) + message.negUri = String(object.negUri); + return message; + }; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.ServerlessNegInfo} message ServerlessNegInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerlessNegInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.negUri = ""; + if (message.negUri != null && message.hasOwnProperty("negUri")) + object.negUri = message.negUri; + return object; + }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @instance + * @returns {Object.} JSON object + */ + ServerlessNegInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerlessNegInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ServerlessNegInfo"; + }; + + return ServerlessNegInfo; + })(); + + v1.ReachabilityService = (function() { + + /** + * Constructs a new ReachabilityService service. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ReachabilityService + * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; + + /** + * Creates new ReachabilityService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. + */ + ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef ListConnectivityTestsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse + */ + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { + return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, request, callback); + }, "name", { value: "ListConnectivityTests" }); + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef GetConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} [response] ConnectivityTest + */ + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { + return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1.ConnectivityTest, request, callback); + }, "name", { value: "GetConnectivityTest" }); + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef CreateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { + return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConnectivityTest" }); + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef UpdateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { + return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConnectivityTest" }); + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef RerunConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { + return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RerunConnectivityTest" }); + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef DeleteConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { + return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConnectivityTest" }); + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReachabilityService; + })(); + + v1.ListConnectivityTestsRequest = (function() { + + /** + * Properties of a ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IListConnectivityTestsRequest + * @property {string|null} [parent] ListConnectivityTestsRequest parent + * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize + * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken + * @property {string|null} [filter] ListConnectivityTestsRequest filter + * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy + */ + + /** + * Constructs a new ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ListConnectivityTestsRequest. + * @implements IListConnectivityTestsRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set + */ + function ListConnectivityTestsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectivityTestsRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.parent = ""; + + /** + * ListConnectivityTestsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageSize = 0; + + /** + * ListConnectivityTestsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageToken = ""; + + /** + * ListConnectivityTestsRequest filter. + * @member {string} filter + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.filter = ""; + + /** + * ListConnectivityTestsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance + */ + ListConnectivityTestsRequest.create = function create(properties) { + return new ListConnectivityTestsRequest(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + */ + ListConnectivityTestsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsRequest"; + }; + + return ListConnectivityTestsRequest; + })(); + + v1.ListConnectivityTestsResponse = (function() { + + /** + * Properties of a ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1 + * @interface IListConnectivityTestsResponse + * @property {Array.|null} [resources] ListConnectivityTestsResponse resources + * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken + * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable + */ + + /** + * Constructs a new ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ListConnectivityTestsResponse. + * @implements IListConnectivityTestsResponse + * @constructor + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set + */ + function ListConnectivityTestsResponse(properties) { + this.resources = []; + 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]]; + } + + /** + * ListConnectivityTestsResponse resources. + * @member {Array.} resources + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; + + /** + * ListConnectivityTestsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.nextPageToken = ""; + + /** + * ListConnectivityTestsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance + */ + ListConnectivityTestsResponse.create = function create(properties) { + return new ListConnectivityTestsResponse(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.networkmanagement.v1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resources[i]); + if (error) + return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + */ + ListConnectivityTestsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"; + }; + + return ListConnectivityTestsResponse; + })(); + + v1.GetConnectivityTestRequest = (function() { + + /** + * Properties of a GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IGetConnectivityTestRequest + * @property {string|null} [name] GetConnectivityTestRequest name + */ + + /** + * Constructs a new GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a GetConnectivityTestRequest. + * @implements IGetConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set + */ + function GetConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @instance + */ + GetConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest instance + */ + GetConnectivityTestRequest.create = function create(properties) { + return new GetConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encode = function encode(message, writer) { + 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); + 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectivityTestRequest.verify = function verify(message) { + if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest + */ + GetConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} message GetConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GetConnectivityTestRequest"; + }; + + return GetConnectivityTestRequest; + })(); + + v1.CreateConnectivityTestRequest = (function() { + + /** + * Properties of a CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICreateConnectivityTestRequest + * @property {string|null} [parent] CreateConnectivityTestRequest parent + * @property {string|null} [testId] CreateConnectivityTestRequest testId + * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource + */ + + /** + * Constructs a new CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CreateConnectivityTestRequest. + * @implements ICreateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set + */ + function CreateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectivityTestRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.parent = ""; + + /** + * CreateConnectivityTestRequest testId. + * @member {string} testId + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.testId = ""; + + /** + * CreateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance + */ + CreateConnectivityTestRequest.create = function create(properties) { + return new CreateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.testId = reader.string(); + break; + } + case 3: { + message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) + if (!$util.isString(message.testId)) + return "testId: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + */ + CreateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.testId != null) + message.testId = String(object.testId); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.testId = ""; + object.resource = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.testId != null && message.hasOwnProperty("testId")) + object.testId = message.testId; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CreateConnectivityTestRequest"; + }; + + return CreateConnectivityTestRequest; + })(); + + v1.UpdateConnectivityTestRequest = (function() { + + /** + * Properties of an UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IUpdateConnectivityTestRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask + * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource + */ + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an UpdateConnectivityTestRequest. + * @implements IUpdateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set + */ + function UpdateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectivityTestRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.updateMask = null; + + /** + * UpdateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance + */ + UpdateConnectivityTestRequest.create = function create(properties) { + return new UpdateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); + 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.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + */ + UpdateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.resource = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest"; + }; + + return UpdateConnectivityTestRequest; + })(); + + v1.DeleteConnectivityTestRequest = (function() { + + /** + * Properties of a DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IDeleteConnectivityTestRequest + * @property {string|null} [name] DeleteConnectivityTestRequest name + */ + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a DeleteConnectivityTestRequest. + * @implements IDeleteConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set + */ + function DeleteConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @instance + */ + DeleteConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance + */ + DeleteConnectivityTestRequest.create = function create(properties) { + return new DeleteConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encode = function encode(message, writer) { + 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); + 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectivityTestRequest.verify = function verify(message) { + if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + */ + DeleteConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest"; + }; + + return DeleteConnectivityTestRequest; + })(); + + v1.RerunConnectivityTestRequest = (function() { + + /** + * Properties of a RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRerunConnectivityTestRequest + * @property {string|null} [name] RerunConnectivityTestRequest name + */ + + /** + * Constructs a new RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RerunConnectivityTestRequest. + * @implements IRerunConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set + */ + function RerunConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RerunConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @instance + */ + RerunConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance + */ + RerunConnectivityTestRequest.create = function create(properties) { + return new RerunConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encode = function encode(message, writer) { + 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); + 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RerunConnectivityTestRequest.verify = function verify(message) { + if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + */ + RerunConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RerunConnectivityTestRequest"; + }; + + return RerunConnectivityTestRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.networkmanagement.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} [statusDetail] OperationMetadata statusDetail + * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusDetail. + * @member {string} statusDetail + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusDetail = ""; + + /** + * OperationMetadata cancelRequested. + * @member {boolean} cancelRequested + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.cancelRequested = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); + if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusDetail = reader.string(); + break; + } + case 6: { + message.cancelRequested = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + 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.networkmanagement.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + if (typeof message.cancelRequested !== "boolean") + return "cancelRequested: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: 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.networkmanagement.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.networkmanagement.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.cancelRequested != null) + message.cancelRequested = Boolean(object.cancelRequested); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusDetail = ""; + object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + object.cancelRequested = message.cancelRequested; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + return v1; + })(); + + return networkmanagement; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + 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; + })(); + + 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.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; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + 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; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + 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"]); + } + 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.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.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.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.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-networkmanagement/v1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json new file mode 100644 index 00000000000..ba8311bc60f --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json @@ -0,0 +1,4271 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "networkmanagement": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.NetworkManagement.V1", + "go_package": "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb", + "java_multiple_files": true, + "java_outer_classname": "ReachabilityServiceProto", + "java_package": "com.google.cloud.networkmanagement.v1", + "php_namespace": "Google\\Cloud\\NetworkManagement\\V1", + "ruby_package": "Google::Cloud::NetworkManagement::V1" + }, + "nested": { + "ConnectivityTest": { + "options": { + "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", + "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "source": { + "type": "Endpoint", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "destination": { + "type": "Endpoint", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protocol": { + "type": "string", + "id": 5 + }, + "relatedProjects": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reachabilityDetails": { + "type": "ReachabilityDetails", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "probingDetails": { + "type": "ProbingDetails", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bypassFirewallChecks": { + "type": "bool", + "id": 17 + } + } + }, + "Endpoint": { + "oneofs": { + "_forwardingRuleTarget": { + "oneof": [ + "forwardingRuleTarget" + ] + }, + "_loadBalancerId": { + "oneof": [ + "loadBalancerId" + ] + }, + "_loadBalancerType": { + "oneof": [ + "loadBalancerType" + ] + } + }, + "fields": { + "ipAddress": { + "type": "string", + "id": 1 + }, + "port": { + "type": "int32", + "id": 2 + }, + "instance": { + "type": "string", + "id": 3 + }, + "forwardingRule": { + "type": "string", + "id": 13 + }, + "forwardingRuleTarget": { + "type": "ForwardingRuleTarget", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "gkeMasterCluster": { + "type": "string", + "id": 7 + }, + "cloudSqlInstance": { + "type": "string", + "id": 8 + }, + "redisInstance": { + "type": "string", + "id": 17 + }, + "redisCluster": { + "type": "string", + "id": 18 + }, + "cloudFunction": { + "type": "CloudFunctionEndpoint", + "id": 10 + }, + "appEngineVersion": { + "type": "AppEngineVersionEndpoint", + "id": 11 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionEndpoint", + "id": 12 + }, + "network": { + "type": "string", + "id": 4 + }, + "networkType": { + "type": "NetworkType", + "id": 5 + }, + "projectId": { + "type": "string", + "id": 6 + } + }, + "nested": { + "NetworkType": { + "values": { + "NETWORK_TYPE_UNSPECIFIED": 0, + "GCP_NETWORK": 1, + "NON_GCP_NETWORK": 2 + } + }, + "ForwardingRuleTarget": { + "values": { + "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "LOAD_BALANCER": 2, + "VPN_GATEWAY": 3, + "PSC": 4 + } + }, + "CloudFunctionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "AppEngineVersionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "CloudRunRevisionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ReachabilityDetails": { + "fields": { + "result": { + "type": "Result", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "traces": { + "rule": "repeated", + "type": "Trace", + "id": 5 + } + }, + "nested": { + "Result": { + "values": { + "RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "AMBIGUOUS": 4, + "UNDETERMINED": 5 + } + } + } + }, + "LatencyPercentile": { + "fields": { + "percent": { + "type": "int32", + "id": 1 + }, + "latencyMicros": { + "type": "int64", + "id": 2 + } + } + }, + "LatencyDistribution": { + "fields": { + "latencyPercentiles": { + "rule": "repeated", + "type": "LatencyPercentile", + "id": 1 + } + } + }, + "ProbingDetails": { + "fields": { + "result": { + "type": "ProbingResult", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "abortCause": { + "type": "ProbingAbortCause", + "id": 4 + }, + "sentProbeCount": { + "type": "int32", + "id": 5 + }, + "successfulProbeCount": { + "type": "int32", + "id": 6 + }, + "endpointInfo": { + "type": "EndpointInfo", + "id": 7 + }, + "probingLatency": { + "type": "LatencyDistribution", + "id": 8 + }, + "destinationEgressLocation": { + "type": "EdgeLocation", + "id": 9 + } + }, + "nested": { + "ProbingResult": { + "values": { + "PROBING_RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "REACHABILITY_INCONSISTENT": 3, + "UNDETERMINED": 4 + } + }, + "ProbingAbortCause": { + "values": { + "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, + "PERMISSION_DENIED": 1, + "NO_SOURCE_LOCATION": 2 + } + }, + "EdgeLocation": { + "fields": { + "metropolitanArea": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Trace": { + "fields": { + "endpointInfo": { + "type": "EndpointInfo", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + }, + "forwardTraceId": { + "type": "int32", + "id": 4 + } + } + }, + "Step": { + "oneofs": { + "stepInfo": { + "oneof": [ + "instance", + "firewall", + "route", + "endpoint", + "googleService", + "forwardingRule", + "vpnGateway", + "vpnTunnel", + "vpcConnector", + "deliver", + "forward", + "abort", + "drop", + "loadBalancer", + "network", + "gkeMaster", + "cloudSqlInstance", + "redisInstance", + "redisCluster", + "cloudFunction", + "appEngineVersion", + "cloudRunRevision", + "nat", + "proxyConnection", + "loadBalancerBackendInfo", + "storageBucket", + "serverlessNeg" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "causesDrop": { + "type": "bool", + "id": 3 + }, + "projectId": { + "type": "string", + "id": 4 + }, + "instance": { + "type": "InstanceInfo", + "id": 5 + }, + "firewall": { + "type": "FirewallInfo", + "id": 6 + }, + "route": { + "type": "RouteInfo", + "id": 7 + }, + "endpoint": { + "type": "EndpointInfo", + "id": 8 + }, + "googleService": { + "type": "GoogleServiceInfo", + "id": 24 + }, + "forwardingRule": { + "type": "ForwardingRuleInfo", + "id": 9 + }, + "vpnGateway": { + "type": "VpnGatewayInfo", + "id": 10 + }, + "vpnTunnel": { + "type": "VpnTunnelInfo", + "id": 11 + }, + "vpcConnector": { + "type": "VpcConnectorInfo", + "id": 21 + }, + "deliver": { + "type": "DeliverInfo", + "id": 12 + }, + "forward": { + "type": "ForwardInfo", + "id": 13 + }, + "abort": { + "type": "AbortInfo", + "id": 14 + }, + "drop": { + "type": "DropInfo", + "id": 15 + }, + "loadBalancer": { + "type": "LoadBalancerInfo", + "id": 16, + "options": { + "deprecated": true + } + }, + "network": { + "type": "NetworkInfo", + "id": 17 + }, + "gkeMaster": { + "type": "GKEMasterInfo", + "id": 18 + }, + "cloudSqlInstance": { + "type": "CloudSQLInstanceInfo", + "id": 19 + }, + "redisInstance": { + "type": "RedisInstanceInfo", + "id": 30 + }, + "redisCluster": { + "type": "RedisClusterInfo", + "id": 31 + }, + "cloudFunction": { + "type": "CloudFunctionInfo", + "id": 20 + }, + "appEngineVersion": { + "type": "AppEngineVersionInfo", + "id": 22 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionInfo", + "id": 23 + }, + "nat": { + "type": "NatInfo", + "id": 25 + }, + "proxyConnection": { + "type": "ProxyConnectionInfo", + "id": 26 + }, + "loadBalancerBackendInfo": { + "type": "LoadBalancerBackendInfo", + "id": 27 + }, + "storageBucket": { + "type": "StorageBucketInfo", + "id": 28 + }, + "serverlessNeg": { + "type": "ServerlessNegInfo", + "id": 29 + } + }, + "nested": { + "State": { + "valuesOptions": { + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { + "deprecated": true + }, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { + "deprecated": true + } + }, + "values": { + "STATE_UNSPECIFIED": 0, + "START_FROM_INSTANCE": 1, + "START_FROM_INTERNET": 2, + "START_FROM_GOOGLE_SERVICE": 27, + "START_FROM_PRIVATE_NETWORK": 3, + "START_FROM_GKE_MASTER": 21, + "START_FROM_CLOUD_SQL_INSTANCE": 22, + "START_FROM_REDIS_INSTANCE": 32, + "START_FROM_REDIS_CLUSTER": 33, + "START_FROM_CLOUD_FUNCTION": 23, + "START_FROM_APP_ENGINE_VERSION": 25, + "START_FROM_CLOUD_RUN_REVISION": 26, + "START_FROM_STORAGE_BUCKET": 29, + "START_FROM_PSC_PUBLISHED_SERVICE": 30, + "START_FROM_SERVERLESS_NEG": 31, + "APPLY_INGRESS_FIREWALL_RULE": 4, + "APPLY_EGRESS_FIREWALL_RULE": 5, + "APPLY_ROUTE": 6, + "APPLY_FORWARDING_RULE": 7, + "ANALYZE_LOAD_BALANCER_BACKEND": 28, + "SPOOFING_APPROVED": 8, + "ARRIVE_AT_INSTANCE": 9, + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, + "ARRIVE_AT_VPN_GATEWAY": 12, + "ARRIVE_AT_VPN_TUNNEL": 13, + "ARRIVE_AT_VPC_CONNECTOR": 24, + "NAT": 14, + "PROXY_CONNECTION": 15, + "DELIVER": 16, + "DROP": 17, + "FORWARD": 18, + "ABORT": 19, + "VIEWER_PERMISSION_MISSING": 20 + } + } + } + }, + "InstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "interface": { + "type": "string", + "id": 3 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "serviceAccount": { + "type": "string", + "id": 8, + "options": { + "deprecated": true + } + }, + "pscNetworkAttachmentUri": { + "type": "string", + "id": 9 + } + } + }, + "NetworkInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedSubnetUri": { + "type": "string", + "id": 5 + }, + "matchedIpRange": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "FirewallInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "direction": { + "type": "string", + "id": 3 + }, + "action": { + "type": "string", + "id": 4 + }, + "priority": { + "type": "int32", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 6 + }, + "targetTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "targetServiceAccounts": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "policy": { + "type": "string", + "id": 9 + }, + "policyUri": { + "type": "string", + "id": 11 + }, + "firewallRuleType": { + "type": "FirewallRuleType", + "id": 10 + } + }, + "nested": { + "FirewallRuleType": { + "values": { + "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, + "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, + "VPC_FIREWALL_RULE": 2, + "IMPLIED_VPC_FIREWALL_RULE": 3, + "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, + "NETWORK_FIREWALL_POLICY_RULE": 5, + "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, + "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, + "TRACKING_STATE": 101 + } + } + } + }, + "RouteInfo": { + "oneofs": { + "_nccHubUri": { + "oneof": [ + "nccHubUri" + ] + }, + "_nccSpokeUri": { + "oneof": [ + "nccSpokeUri" + ] + }, + "_advertisedRouteSourceRouterUri": { + "oneof": [ + "advertisedRouteSourceRouterUri" + ] + }, + "_advertisedRouteNextHopUri": { + "oneof": [ + "advertisedRouteNextHopUri" + ] + } + }, + "fields": { + "routeType": { + "type": "RouteType", + "id": 8 + }, + "nextHopType": { + "type": "NextHopType", + "id": 9 + }, + "routeScope": { + "type": "RouteScope", + "id": 14 + }, + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "region": { + "type": "string", + "id": 19 + }, + "destIpRange": { + "type": "string", + "id": 3 + }, + "nextHop": { + "type": "string", + "id": 4 + }, + "networkUri": { + "type": "string", + "id": 5 + }, + "priority": { + "type": "int32", + "id": 6 + }, + "instanceTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "srcIpRange": { + "type": "string", + "id": 10 + }, + "destPortRanges": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "srcPortRanges": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "protocols": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "nccHubUri": { + "type": "string", + "id": 15, + "options": { + "proto3_optional": true + } + }, + "nccSpokeUri": { + "type": "string", + "id": 16, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteSourceRouterUri": { + "type": "string", + "id": 17, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteNextHopUri": { + "type": "string", + "id": 18, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "RouteType": { + "values": { + "ROUTE_TYPE_UNSPECIFIED": 0, + "SUBNET": 1, + "STATIC": 2, + "DYNAMIC": 3, + "PEERING_SUBNET": 4, + "PEERING_STATIC": 5, + "PEERING_DYNAMIC": 6, + "POLICY_BASED": 7, + "ADVERTISED": 101 + } + }, + "NextHopType": { + "values": { + "NEXT_HOP_TYPE_UNSPECIFIED": 0, + "NEXT_HOP_IP": 1, + "NEXT_HOP_INSTANCE": 2, + "NEXT_HOP_NETWORK": 3, + "NEXT_HOP_PEERING": 4, + "NEXT_HOP_INTERCONNECT": 5, + "NEXT_HOP_VPN_TUNNEL": 6, + "NEXT_HOP_VPN_GATEWAY": 7, + "NEXT_HOP_INTERNET_GATEWAY": 8, + "NEXT_HOP_BLACKHOLE": 9, + "NEXT_HOP_ILB": 10, + "NEXT_HOP_ROUTER_APPLIANCE": 11, + "NEXT_HOP_NCC_HUB": 12 + } + }, + "RouteScope": { + "values": { + "ROUTE_SCOPE_UNSPECIFIED": 0, + "NETWORK": 1, + "NCC_HUB": 2 + } + } + } + }, + "GoogleServiceInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "googleServiceType": { + "type": "GoogleServiceType", + "id": 2 + } + }, + "nested": { + "GoogleServiceType": { + "values": { + "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, + "IAP": 1, + "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, + "CLOUD_DNS": 3, + "GOOGLE_API": 4, + "GOOGLE_API_PSC": 5, + "GOOGLE_API_VPC_SC": 6 + } + } + } + }, + "ForwardingRuleInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedProtocol": { + "type": "string", + "id": 3 + }, + "matchedPortRange": { + "type": "string", + "id": 6 + }, + "vip": { + "type": "string", + "id": 4 + }, + "target": { + "type": "string", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "loadBalancerName": { + "type": "string", + "id": 9 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 10 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerInfo": { + "fields": { + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 1 + }, + "healthCheckUri": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "backends": { + "rule": "repeated", + "type": "LoadBalancerBackend", + "id": 3 + }, + "backendType": { + "type": "BackendType", + "id": 4 + }, + "backendUri": { + "type": "string", + "id": 5 + } + }, + "nested": { + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "INTERNAL_TCP_UDP": 1, + "NETWORK_TCP_UDP": 2, + "HTTP_PROXY": 3, + "TCP_PROXY": 4, + "SSL_PROXY": 5 + } + }, + "BackendType": { + "values": { + "BACKEND_TYPE_UNSPECIFIED": 0, + "BACKEND_SERVICE": 1, + "TARGET_POOL": 2, + "TARGET_INSTANCE": 3 + } + } + } + }, + "LoadBalancerBackend": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "healthCheckFirewallState": { + "type": "HealthCheckFirewallState", + "id": 3 + }, + "healthCheckAllowingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "healthCheckBlockingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "HealthCheckFirewallState": { + "values": { + "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, + "CONFIGURED": 1, + "MISCONFIGURED": 2 + } + } + } + }, + "VpnGatewayInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "ipAddress": { + "type": "string", + "id": 4 + }, + "vpnTunnelUri": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "VpnTunnelInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "sourceGateway": { + "type": "string", + "id": 3 + }, + "remoteGateway": { + "type": "string", + "id": 4 + }, + "remoteGatewayIp": { + "type": "string", + "id": 5 + }, + "sourceGatewayIp": { + "type": "string", + "id": 6 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "routingType": { + "type": "RoutingType", + "id": 9 + } + }, + "nested": { + "RoutingType": { + "values": { + "ROUTING_TYPE_UNSPECIFIED": 0, + "ROUTE_BASED": 1, + "POLICY_BASED": 2, + "DYNAMIC": 3 + } + } + } + }, + "EndpointInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "destinationIp": { + "type": "string", + "id": 2 + }, + "protocol": { + "type": "string", + "id": 3 + }, + "sourcePort": { + "type": "int32", + "id": 4 + }, + "destinationPort": { + "type": "int32", + "id": 5 + }, + "sourceNetworkUri": { + "type": "string", + "id": 6 + }, + "destinationNetworkUri": { + "type": "string", + "id": 7 + }, + "sourceAgentUri": { + "type": "string", + "id": 8 + } + } + }, + "DeliverInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "storageBucket": { + "type": "string", + "id": 4 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Target": { + "values": { + "TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "INTERNET": 2, + "GOOGLE_API": 3, + "GKE_MASTER": 4, + "CLOUD_SQL_INSTANCE": 5, + "PSC_PUBLISHED_SERVICE": 6, + "PSC_GOOGLE_API": 7, + "PSC_VPC_SC": 8, + "SERVERLESS_NEG": 9, + "STORAGE_BUCKET": 10, + "PRIVATE_NETWORK": 11, + "CLOUD_FUNCTION": 12, + "APP_ENGINE_VERSION": 13, + "CLOUD_RUN_REVISION": 14, + "GOOGLE_MANAGED_SERVICE": 15, + "REDIS_INSTANCE": 16, + "REDIS_CLUSTER": 17 + } + } + } + }, + "ForwardInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + } + }, + "nested": { + "Target": { + "valuesOptions": { + "GKE_MASTER": { + "deprecated": true + }, + "CLOUD_SQL_INSTANCE": { + "deprecated": true + } + }, + "values": { + "TARGET_UNSPECIFIED": 0, + "PEERING_VPC": 1, + "VPN_GATEWAY": 2, + "INTERCONNECT": 3, + "GKE_MASTER": 4, + "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, + "CLOUD_SQL_INSTANCE": 6, + "ANOTHER_PROJECT": 7, + "NCC_HUB": 8, + "ROUTER_APPLIANCE": 9 + } + } + } + }, + "AbortInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "projectsMissingPermission": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Cause": { + "valuesOptions": { + "UNKNOWN_NETWORK": { + "deprecated": true + }, + "UNKNOWN_PROJECT": { + "deprecated": true + }, + "NO_EXTERNAL_IP": { + "deprecated": true + }, + "UNINTENDED_DESTINATION": { + "deprecated": true + }, + "SOURCE_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_SOURCE_NETWORK": { + "deprecated": true + }, + "DESTINATION_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_DESTINATION_NETWORK": { + "deprecated": true + } + }, + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_NETWORK": 1, + "UNKNOWN_PROJECT": 3, + "NO_EXTERNAL_IP": 7, + "UNINTENDED_DESTINATION": 8, + "SOURCE_ENDPOINT_NOT_FOUND": 11, + "MISMATCHED_SOURCE_NETWORK": 12, + "DESTINATION_ENDPOINT_NOT_FOUND": 13, + "MISMATCHED_DESTINATION_NETWORK": 14, + "UNKNOWN_IP": 2, + "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, + "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, + "PERMISSION_DENIED": 4, + "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, + "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, + "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, + "NO_SOURCE_LOCATION": 5, + "INVALID_ARGUMENT": 6, + "TRACE_TOO_LONG": 9, + "INTERNAL_ERROR": 10, + "UNSUPPORTED": 15, + "MISMATCHED_IP_VERSION": 16, + "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, + "RESOURCE_CONFIG_NOT_FOUND": 18, + "VM_INSTANCE_CONFIG_NOT_FOUND": 24, + "NETWORK_CONFIG_NOT_FOUND": 25, + "FIREWALL_CONFIG_NOT_FOUND": 26, + "ROUTE_CONFIG_NOT_FOUND": 27, + "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, + "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, + "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, + "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, + "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, + "NON_ROUTABLE_IP_ADDRESS": 22, + "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, + "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 + } + } + } + }, + "DropInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "sourceIp": { + "type": "string", + "id": 3 + }, + "destinationIp": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Cause": { + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_EXTERNAL_ADDRESS": 1, + "FOREIGN_IP_DISALLOWED": 2, + "FIREWALL_RULE": 3, + "NO_ROUTE": 4, + "ROUTE_BLACKHOLE": 5, + "ROUTE_WRONG_NETWORK": 6, + "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, + "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, + "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, + "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, + "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, + "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, + "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, + "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, + "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, + "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, + "PRIVATE_TRAFFIC_TO_INTERNET": 7, + "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, + "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, + "NO_EXTERNAL_ADDRESS": 9, + "UNKNOWN_INTERNAL_ADDRESS": 10, + "FORWARDING_RULE_MISMATCH": 11, + "FORWARDING_RULE_NO_INSTANCES": 12, + "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, + "INSTANCE_NOT_RUNNING": 14, + "GKE_CLUSTER_NOT_RUNNING": 27, + "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, + "REDIS_INSTANCE_NOT_RUNNING": 68, + "REDIS_CLUSTER_NOT_RUNNING": 69, + "TRAFFIC_TYPE_BLOCKED": 15, + "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, + "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, + "DROPPED_INSIDE_GKE_SERVICE": 18, + "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, + "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, + "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, + "GKE_PSC_ENDPOINT_MISSING": 36, + "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, + "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, + "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, + "GKE_CONTROL_PLANE_NO_ROUTE": 32, + "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, + "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, + "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, + "CLOUD_SQL_CONNECTOR_REQUIRED": 63, + "CLOUD_FUNCTION_NOT_ACTIVE": 22, + "VPC_CONNECTOR_NOT_SET": 23, + "VPC_CONNECTOR_NOT_RUNNING": 24, + "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, + "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, + "FORWARDING_RULE_REGION_MISMATCH": 25, + "PSC_CONNECTION_NOT_ACCEPTED": 26, + "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, + "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, + "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, + "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, + "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, + "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, + "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, + "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, + "CLOUD_RUN_REVISION_NOT_READY": 29, + "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, + "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, + "CLOUD_NAT_NO_ADDRESSES": 40, + "ROUTING_LOOP": 59, + "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, + "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, + "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, + "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, + "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, + "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, + "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, + "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, + "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, + "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, + "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, + "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, + "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, + "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, + "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, + "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82 + } + } + } + }, + "GKEMasterInfo": { + "fields": { + "clusterUri": { + "type": "string", + "id": 2 + }, + "clusterNetworkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + } + } + }, + "CloudSQLInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "region": { + "type": "string", + "id": 7 + } + } + }, + "RedisInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "primaryEndpointIp": { + "type": "string", + "id": 4 + }, + "readEndpointIp": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "RedisClusterInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "discoveryEndpointIpAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "secondaryEndpointIpAddress": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "location": { + "type": "string", + "id": 6 + } + } + }, + "CloudFunctionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + }, + "versionId": { + "type": "int64", + "id": 4 + } + } + }, + "CloudRunRevisionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 4 + }, + "serviceUri": { + "type": "string", + "id": 5 + } + } + }, + "AppEngineVersionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "runtime": { + "type": "string", + "id": 3 + }, + "environment": { + "type": "string", + "id": 4 + } + } + }, + "VpcConnectorInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + } + } + }, + "NatInfo": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "protocol": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "oldSourceIp": { + "type": "string", + "id": 4 + }, + "newSourceIp": { + "type": "string", + "id": 5 + }, + "oldDestinationIp": { + "type": "string", + "id": 6 + }, + "newDestinationIp": { + "type": "string", + "id": 7 + }, + "oldSourcePort": { + "type": "int32", + "id": 8 + }, + "newSourcePort": { + "type": "int32", + "id": 9 + }, + "oldDestinationPort": { + "type": "int32", + "id": 10 + }, + "newDestinationPort": { + "type": "int32", + "id": 11 + }, + "routerUri": { + "type": "string", + "id": 12 + }, + "natGatewayName": { + "type": "string", + "id": 13 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INTERNAL_TO_EXTERNAL": 1, + "EXTERNAL_TO_INTERNAL": 2, + "CLOUD_NAT": 3, + "PRIVATE_SERVICE_CONNECT": 4 + } + } + } + }, + "ProxyConnectionInfo": { + "fields": { + "protocol": { + "type": "string", + "id": 1 + }, + "oldSourceIp": { + "type": "string", + "id": 2 + }, + "newSourceIp": { + "type": "string", + "id": 3 + }, + "oldDestinationIp": { + "type": "string", + "id": 4 + }, + "newDestinationIp": { + "type": "string", + "id": 5 + }, + "oldSourcePort": { + "type": "int32", + "id": 6 + }, + "newSourcePort": { + "type": "int32", + "id": 7 + }, + "oldDestinationPort": { + "type": "int32", + "id": 8 + }, + "newDestinationPort": { + "type": "int32", + "id": 9 + }, + "subnetUri": { + "type": "string", + "id": 10 + }, + "networkUri": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerBackendInfo": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "instanceUri": { + "type": "string", + "id": 2 + }, + "backendServiceUri": { + "type": "string", + "id": 3 + }, + "instanceGroupUri": { + "type": "string", + "id": 4 + }, + "networkEndpointGroupUri": { + "type": "string", + "id": 5 + }, + "backendBucketUri": { + "type": "string", + "id": 8 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 9 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 10 + }, + "healthCheckUri": { + "type": "string", + "id": 6 + }, + "healthCheckFirewallsConfigState": { + "type": "HealthCheckFirewallsConfigState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "HealthCheckFirewallsConfigState": { + "values": { + "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, + "FIREWALLS_CONFIGURED": 1, + "FIREWALLS_PARTIALLY_CONFIGURED": 2, + "FIREWALLS_NOT_CONFIGURED": 3, + "FIREWALLS_UNSUPPORTED": 4 + } + } + } + }, + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "HTTPS_ADVANCED_LOAD_BALANCER": 1, + "HTTPS_LOAD_BALANCER": 2, + "REGIONAL_HTTPS_LOAD_BALANCER": 3, + "INTERNAL_HTTPS_LOAD_BALANCER": 4, + "SSL_PROXY_LOAD_BALANCER": 5, + "TCP_PROXY_LOAD_BALANCER": 6, + "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, + "NETWORK_LOAD_BALANCER": 8, + "LEGACY_NETWORK_LOAD_BALANCER": 9, + "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 + } + }, + "StorageBucketInfo": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + } + } + }, + "ServerlessNegInfo": { + "fields": { + "negUri": { + "type": "string", + "id": 1 + } + } + }, + "ReachabilityService": { + "options": { + "(google.api.default_host)": "networkmanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListConnectivityTests": { + "requestType": "ListConnectivityTestsRequest", + "responseType": "ListConnectivityTestsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/global}/connectivityTests", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/global}/connectivityTests" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetConnectivityTest": { + "requestType": "GetConnectivityTestRequest", + "responseType": "ConnectivityTest", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/global/connectivityTests/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/global/connectivityTests/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateConnectivityTest": { + "requestType": "CreateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/global}/connectivityTests", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "parent,test_id,resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/global}/connectivityTests", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "parent,test_id,resource" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConnectivityTest": { + "requestType": "UpdateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "update_mask,resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "update_mask,resource" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RerunConnectivityTest": { + "requestType": "RerunConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConnectivityTest": { + "requestType": "DeleteConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/global/connectivityTests/*}", + "(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/global/connectivityTests/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "ListConnectivityTestsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListConnectivityTestsResponse": { + "fields": { + "resources": { + "rule": "repeated", + "type": "ConnectivityTest", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "CreateConnectivityTestRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "testId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateConnectivityTestRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "RerunConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "target": { + "type": "string", + "id": 3 + }, + "verb": { + "type": "string", + "id": 4 + }, + "statusDetail": { + "type": "string", + "id": 5 + }, + "cancelRequested": { + "type": "bool", + "id": 6 + }, + "apiVersion": { + "type": "string", + "id": 7 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + } + } + }, + "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 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js new file mode 100644 index 00000000000..cbd3d9c9f0e --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js @@ -0,0 +1,79 @@ +// 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, testId, resource) { + // [START networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + */ + // const testId = 'abc123' + /** + * Required. A `ConnectivityTest` resource + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callCreateConnectivityTest() { + // Construct request + const request = { + parent, + testId, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.createConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js new file mode 100644 index 00000000000..7cd83e08556 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callDeleteConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.deleteConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js new file mode 100644 index 00000000000..36f308151bf --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callGetConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networkmanagementClient.getConnectivityTest(request); + console.log(response); + } + + callGetConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js new file mode 100644 index 00000000000..11366d5248a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.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(parent) { + // [START networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Number of `ConnectivityTests` to return. + */ + // const pageSize = 1234 + /** + * Page token from an earlier query, as returned in `next_page_token`. + */ + // const pageToken = 'abc123' + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callListConnectivityTests() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networkmanagementClient.listConnectivityTestsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnectivityTests(); + // [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js new file mode 100644 index 00000000000..e279d602dd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callRerunConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.rerunConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRerunConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js new file mode 100644 index 00000000000..808714b00bb --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js @@ -0,0 +1,68 @@ +// 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, resource) { + // [START networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. Only fields specified in update_mask are updated. + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callUpdateConnectivityTest() { + // Construct request + const request = { + updateMask, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.updateConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json new file mode 100644 index 00000000000..9c56c9e9913 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -0,0 +1,283 @@ +{ + "clientLibrary": { + "name": "nodejs-networkmanagement", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.networkmanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async", + "title": "ReachabilityService listConnectivityTests Sample", + "origin": "API_DEFINITION", + "description": " Lists all Connectivity Tests owned by a project.", + "canonical": true, + "file": "reachability_service.list_connectivity_tests.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", + "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.networkmanagement.v1.ListConnectivityTestsResponse", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async", + "title": "ReachabilityService getConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific Connectivity Test.", + "canonical": true, + "file": "reachability_service.get_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networkmanagement.v1.ConnectivityTest", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async", + "title": "ReachabilityService createConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", + "canonical": true, + "file": "reachability_service.create_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "test_id", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async", + "title": "ReachabilityService updateConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", + "canonical": true, + "file": "reachability_service.update_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async", + "title": "ReachabilityService rerunConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", + "canonical": true, + "file": "reachability_service.rerun_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async", + "title": "ReachabilityService deleteConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific `ConnectivityTest`.", + "canonical": true, + "file": "reachability_service.delete_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts new file mode 100644 index 00000000000..88c81931ccf --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 ReachabilityServiceClient = v1.ReachabilityServiceClient; +type ReachabilityServiceClient = v1.ReachabilityServiceClient; +export {v1, ReachabilityServiceClient}; +export default {v1, ReachabilityServiceClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..0a5d92ed4df --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json @@ -0,0 +1,87 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.networkmanagement.v1", + "libraryPackage": "@google-cloud/network-management", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts new file mode 100644 index 00000000000..5d88a6370d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from './reachability_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts new file mode 100644 index 00000000000..f7fc6ca3bf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts @@ -0,0 +1,1595 @@ +// 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/reachability_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './reachability_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Reachability service in the Google Cloud Network Management API provides + * services that analyze the reachability within a single Google Virtual Private + * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + * networks, or between VPC networks and internet hosts. A reachability analysis + * is based on Google Cloud network configurations. + * + * You can use the analysis results to verify these configurations and + * to troubleshoot connectivity issues. + * @class + * @memberof v1 + */ +export class ReachabilityServiceClient { + 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; + reachabilityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ReachabilityServiceClient. + * + * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; + 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 = 'networkmanagement.' + 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 = { + connectivityTestPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/global/connectivityTests/{test}' + ), + 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 = { + listConnectivityTests: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') + }; + + 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/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/global}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; + const createConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + const updateConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; + const updateConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + const rerunConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; + const rerunConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + const deleteConnectivityTestResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), + createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), + updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), + updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), + rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), + rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), + deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), + deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networkmanagement.v1.ReachabilityService', 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.reachabilityServiceStub) { + return this.reachabilityServiceStub; + } + + // Put together the "service stub" for + // google.cloud.networkmanagement.v1.ReachabilityService. + this.reachabilityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1.ReachabilityService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networkmanagement.v1.ReachabilityService, + 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 reachabilityServiceStubMethods = + ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; + for (const methodName of reachabilityServiceStubMethods) { + const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; + } + + /** + * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. + * 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/reachability_service.get_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async + */ + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|undefined, {}|undefined + ]>; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + callback: Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); + } + +/** + * Creates a new Connectivity Test. + * After you create a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, containing non-existent resources in the network, or you + * don't have read permissions to the network configurations of listed + * projects), then the reachability result returns a value of `UNKNOWN`. + * + * If the endpoint specifications in `ConnectivityTest` are + * incomplete, the reachability result returns a value of + * AMBIGUOUS. For more information, + * see the Connectivity Test documentation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * @param {string} request.testId + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource + * Required. A `ConnectivityTest` 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 + * 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/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async + */ + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + 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.createConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createConnectivityTest()`. + * @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/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async + */ + async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the configuration of an existing `ConnectivityTest`. + * After you update a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * The Reachability state in the test resource is updated with the new result. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, they contain non-existent resources in the network, or the + * user does not have read permissions to the network configurations of + * listed projects), then the reachability result returns a value of + * UNKNOWN. + * + * If the endpoint specifications in `ConnectivityTest` are incomplete, the + * reachability result returns a value of `AMBIGUOUS`. See the documentation + * in `ConnectivityTest` for more details. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource + * Required. Only fields specified in update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + 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({ + 'resource.name': request.resource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateConnectivityTest()`. + * @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/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Rerun an existing `ConnectivityTest`. + * After the user triggers the rerun, the reachability analysis is performed + * as part of the long running operation, which completes when the analysis + * completes. + * + * Even though the test configuration remains the same, the reachability + * result may change due to underlying network configuration changes. + * + * If the endpoint specifications in `ConnectivityTest` become invalid (for + * example, specified resources are deleted in the network, or you lost + * read permissions to the network configurations of listed projects), then + * the reachability result returns a value of `UNKNOWN`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async + */ + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + 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.rerunConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `rerunConnectivityTest()`. + * @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/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async + */ + async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific `ConnectivityTest`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + 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.deleteConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteConnectivityTest()`. + * @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/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all Connectivity Tests owned by a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. + * 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse + ]>; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>, + callback?: PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTestsStream( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.createStream( + this.innerApiCalls.listConnectivityTests as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConnectivityTests`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. 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/reachability_service.list_connectivity_tests.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async + */ + listConnectivityTestsAsync( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.asyncIterate( + this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. + * + * @param {string} project + * @param {string} test + * @returns {string} Resource name string. + */ + connectivityTestPath(project:string,test:string) { + return this.pathTemplates.connectivityTestPathTemplate.render({ + project: project, + test: test, + }); + } + + /** + * Parse the project from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; + } + + /** + * Parse the test from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the test. + */ + matchTestFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; + } + + /** + * 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.reachabilityServiceStub && !this._terminated) { + return this.reachabilityServiceStub.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-networkmanagement/v1/src/v1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json new file mode 100644 index 00000000000..6fcdab96cf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1.ReachabilityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListConnectivityTests": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RerunConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json new file mode 100644 index 00000000000..d84c76feae1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/networkmanagement/v1/connectivity_test.proto", + "../../protos/google/cloud/networkmanagement/v1/reachability.proto", + "../../protos/google/cloud/networkmanagement/v1/trace.proto" +] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..ef3e3b070ae --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 networkmanagement = require('@google-cloud/network-management'); + +function main() { + const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..d3182081b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from '@google-cloud/network-management'; + +// check that the client class type name can be used +function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const reachabilityServiceClient = new ReachabilityServiceClient(); + doStuffWithReachabilityServiceClient(reachabilityServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/test/gapic_reachability_service_v1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts new file mode 100644 index 00000000000..35e3ba63eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts @@ -0,0 +1,2018 @@ +// 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 reachabilityserviceModule 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.ReachabilityServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); + 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 = reachabilityserviceModule.v1.ReachabilityServiceClient.servicePath; + assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = reachabilityserviceModule.v1.ReachabilityServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = reachabilityserviceModule.v1.ReachabilityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + await client.initialize(); + assert(client.reachabilityServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.reachabilityServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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('getConnectivityTest', () => { + it('invokes getConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); + const [response] = await client.getConnectivityTest(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnectivityTest( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with closed client', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnectivityTest(request), expectedError); + }); + }); + + describe('createConnectivityTest', () => { + it('invokes createConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.createConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnectivityTest( + 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.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateConnectivityTest', () => { + it('invokes updateConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnectivityTest( + 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.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('rerunConnectivityTest', () => { + it('invokes rerunConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.rerunConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rerunConnectivityTest( + 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.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.rerunConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.rerunConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRerunConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRerunConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteConnectivityTest', () => { + it('invokes deleteConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectivityTest( + 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.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listConnectivityTests', () => { + it('invokes listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); + const [response] = await client.listConnectivityTests(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectivityTests( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConnectivityTests(request), expectedError); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTestsStream without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { + 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.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConnectivityTestsStream with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; + const iterable = client.listConnectivityTestsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectivityTestsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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('connectivityTest', () => { + const fakePath = "/rendered/path/connectivityTest"; + const expectedParameters = { + project: "projectValue", + test: "testValue", + }; + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectivityTestPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.connectivityTestPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('connectivityTestPath', () => { + const result = client.connectivityTestPath("projectValue", "testValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConnectivityTestName', () => { + const result = client.matchProjectFromConnectivityTestName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestFromConnectivityTestName', () => { + const result = client.matchTestFromConnectivityTestName(fakePath); + assert.strictEqual(result, "testValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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-networkmanagement/v1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js new file mode 100644 index 00000000000..d975be0ab73 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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: 'ReachabilityService', + filename: './reachability-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js new file mode 100644 index 00000000000..22d92e8132c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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/network-management', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md new file mode 100644 index 00000000000..90c3778ad46 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md @@ -0,0 +1 @@ +Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json new file mode 100644 index 00000000000..d6594c83107 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json @@ -0,0 +1,59 @@ +{ + "name": "@google-cloud/network-management", + "version": "0.1.0", + "description": "Networkmanagement client for Node.js", + "repository": "googleapis/nodejs-networkmanagement", + "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 networkmanagement", + "networkmanagement", + "reachability service", + "vpc flow logs service" + ], + "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-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto new file mode 100644 index 00000000000..a001077d66c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -0,0 +1,422 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/trace.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TestOuterClass"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// A Connectivity Test for a network reachability analysis. +message ConnectivityTest { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + pattern: "projects/{project}/locations/global/connectivityTests/{test}" + }; + + // Identifier. Unique name of the resource using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + string description = 2; + + // Required. Source specification of the Connectivity Test. + // + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify + // the source location. + // + // Examples: + // If the source IP address is an internal IP address within a Google Cloud + // Virtual Private Cloud (VPC) network, then you must also specify the VPC + // network. Otherwise, specify the VM instance, which already contains its + // internal IP address and VPC network information. + // + // If the source of the test is within an on-premises network, then you must + // provide the destination VPC network. + // + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to identify the + // endpoint. So, you must also specify the source IP address or VPC network. + // + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that you don't + // intend to test. + Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination specification of the Connectivity Test. + // + // You can use a combination of destination IP address, Compute Engine + // VM instance, or VPC network to uniquely identify the destination + // location. + // + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either + // a destination IP address or VPC network to identify the destination + // interface. + // + // A reachability analysis proceeds even if the destination location is + // ambiguous. However, the result can include endpoints that you don't + // intend to test. + Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; + + // IP Protocol of the test. When not provided, "TCP" is assumed. + string protocol = 5; + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project boundaries. + repeated string related_projects = 6; + + // Output only. The display name of a Connectivity Test. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user-provided metadata. + map labels = 8; + + // Output only. The time the test was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the test's configuration was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reachability details of this test from the latest run. + // The details are updated when creating a new test, updating an + // existing test, or triggering a one-time rerun of an existing test. + ReachabilityDetails reachability_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The probing details of this test from the latest run, present + // for applicable tests only. The details are updated when creating a new + // test, updating an existing test, or triggering a one-time rerun of an + // existing test. + ProbingDetails probing_details = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the test should skip firewall checking. + // If not provided, we assume false. + bool bypass_firewall_checks = 17; +} + +// Source or destination of the Connectivity Test. +message Endpoint { + // The type definition of an endpoint's network. Use one of the + // following choices: + enum NetworkType { + // Default type if unspecified. + NETWORK_TYPE_UNSPECIFIED = 0; + + // A network hosted within Google Cloud. + // To receive more detailed output, specify the URI for the source or + // destination network. + GCP_NETWORK = 1; + + // A network hosted outside of Google Cloud. + // This can be an on-premises network, or a network hosted by another cloud + // provider. + NON_GCP_NETWORK = 2; + } + + // Type of the target of a forwarding rule. + enum ForwardingRuleTarget { + // Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + + // Compute Engine instance for protocol forwarding. + INSTANCE = 1; + + // Load Balancer. The specific type can be found from [load_balancer_type] + // [google.cloud.networkmanagement.v1beta1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2; + + // Classic Cloud VPN Gateway. + VPN_GATEWAY = 3; + + // Forwarding Rule is a Private Service Connect endpoint. + PSC = 4; + } + + // Wrapper for Cloud Function attributes. + message CloudFunctionEndpoint { + // A [Cloud Function](https://cloud.google.com/functions) name. + string uri = 1; + } + + // Wrapper for the App Engine service version attributes. + message AppEngineVersionEndpoint { + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + // name. + string uri = 1; + } + + // Wrapper for Cloud Run revision attributes. + message CloudRunRevisionEndpoint { + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + // URI. The format is: + // projects/{project}/locations/{location}/revisions/{revision} + string uri = 1; + } + + // The IP address of the endpoint, which can be an external or internal IP. + string ip_address = 1; + + // The IP protocol port of the endpoint. + // Only applicable when protocol is TCP or UDP. + int32 port = 2; + + // A Compute Engine instance URI. + string instance = 3; + + // A forwarding rule and its corresponding IP address represent the frontend + // configuration of a Google Cloud load balancer. Forwarding rules are also + // used for protocol forwarding, Private Service Connect and other network + // services to provide forwarding information in the control plane. Format: + // projects/{project}/global/forwardingRules/{id} or + // projects/{project}/regions/{region}/forwardingRules/{id} + string forwarding_rule = 13; + + // Output only. Specifies the type of the target of the forwarding rule. + optional ForwardingRuleTarget forwarding_rule_target = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the load balancer the forwarding rule points to. Empty + // for forwarding rules not related to load balancers. + optional string load_balancer_id = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the load balancer the forwarding rule points to. + optional LoadBalancerType load_balancer_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A cluster URI for [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + string gke_master_cluster = 7; + + // DNS endpoint of [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // Requires gke_master_cluster to be set, can't be used simultaneoulsly with + // ip_address or network. Applicable only to destination endpoint. + string fqdn = 19; + + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. + string cloud_sql_instance = 8; + + // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + // URI. + string redis_instance = 17; + + // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + // URI. + string redis_cluster = 18; + + // A [Cloud Function](https://cloud.google.com/functions). + CloudFunctionEndpoint cloud_function = 10; + + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + AppEngineVersionEndpoint app_engine_version = 11; + + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + CloudRunRevisionEndpoint cloud_run_revision = 12; + + // A Compute Engine network URI. + string network = 4; + + // Type of the network where the endpoint is located. + // Applicable only to source endpoint, as destination network type can be + // inferred from the source. + NetworkType network_type = 5; + + // Project ID where the endpoint is located. + // The Project ID can be derived from the URI if you provide a VM instance or + // network URI. + // The following are two cases where you must provide the project ID: + // 1. Only the IP address is specified, and the IP address is within a Google + // Cloud project. + // 2. When you are using Shared VPC and the IP address that you provide is + // from the service project. In this case, the network that the IP address + // resides in is defined in the host project. + string project_id = 6; +} + +// Results of the configuration analysis from the last run of the test. +message ReachabilityDetails { + // The overall result of the test's configuration analysis. + enum Result { + // No result was specified. + RESULT_UNSPECIFIED = 0; + + // Possible scenarios are: + // + // * The configuration analysis determined that a packet originating from + // the source is expected to reach the destination. + // * The analysis didn't complete because the user lacks permission for + // some of the resources in the trace. However, at the time the user's + // permission became insufficient, the trace had been successful so far. + REACHABLE = 1; + + // A packet originating from the source is expected to be dropped before + // reaching the destination. + UNREACHABLE = 2; + + // The source and destination endpoints do not uniquely identify + // the test location in the network, and the reachability result contains + // multiple traces. For some traces, a packet could be delivered, and for + // others, it would not be. This result is also assigned to + // configuration analysis of return path if on its own it should be + // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. + AMBIGUOUS = 4; + + // The configuration analysis did not complete. Possible reasons are: + // + // * A permissions error occurred--for example, the user might not have + // read permission for all of the resources named in the test. + // * An internal error occurred. + // * The analyzer received an invalid or unsupported argument or was unable + // to identify a known endpoint. + UNDETERMINED = 5; + } + + // The overall result of the test's configuration analysis. + Result result = 1; + + // The time of the configuration analysis. + google.protobuf.Timestamp verify_time = 2; + + // The details of a failure or a cancellation of reachability analysis. + google.rpc.Status error = 3; + + // Result may contain a list of traces if a test has multiple possible + // paths in the network, such as when destination endpoint is a load balancer + // with multiple backends. + repeated Trace traces = 5; +} + +// Latency percentile rank and value. +message LatencyPercentile { + // Percentage of samples this data point applies to. + int32 percent = 1; + + // percent-th percentile of latency observed, in microseconds. + // Fraction of percent/100 of samples have latency lower or + // equal to the value of this field. + int64 latency_micros = 2; +} + +// Describes measured latency distribution. +message LatencyDistribution { + // Representative latency percentiles. + repeated LatencyPercentile latency_percentiles = 1; +} + +// Results of active probing from the last run of the test. +message ProbingDetails { + // Overall probing result of the test. + enum ProbingResult { + // No result was specified. + PROBING_RESULT_UNSPECIFIED = 0; + + // At least 95% of packets reached the destination. + REACHABLE = 1; + + // No packets reached the destination. + UNREACHABLE = 2; + + // Less than 95% of packets reached the destination. + REACHABILITY_INCONSISTENT = 3; + + // Reachability could not be determined. Possible reasons are: + // * The user lacks permission to access some of the network resources + // required to run the test. + // * No valid source endpoint could be derived from the request. + // * An internal error occurred. + UNDETERMINED = 4; + } + + // Abort cause types. + enum ProbingAbortCause { + // No reason was specified. + PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + + // The user lacks permission to access some of the + // network resources required to run the test. + PERMISSION_DENIED = 1; + + // No valid source endpoint could be derived from the request. + NO_SOURCE_LOCATION = 2; + } + + // Representation of a network edge location as per + // https://cloud.google.com/vpc/docs/edge-locations. + message EdgeLocation { + // Name of the metropolitan area. + string metropolitan_area = 1; + } + + // The overall result of active probing. + ProbingResult result = 1; + + // The time that reachability was assessed through active probing. + google.protobuf.Timestamp verify_time = 2; + + // Details about an internal failure or the cancellation of active probing. + google.rpc.Status error = 3; + + // The reason probing was aborted. + ProbingAbortCause abort_cause = 4; + + // Number of probes sent. + int32 sent_probe_count = 5; + + // Number of probes that reached the destination. + int32 successful_probe_count = 6; + + // The source and destination endpoints derived from the test input and used + // for active probing. + EndpointInfo endpoint_info = 7; + + // Latency as measured by active probing in one direction: + // from the source to the destination endpoint. + LatencyDistribution probing_latency = 8; + + // The EdgeLocation from which a packet destined for/originating from the + // internet will egress/ingress the Google network. + // This will only be populated for a connectivity test which has an internet + // destination/source address. + // The absence of this field *must not* be used as an indication that the + // destination/source is part of the Google network. + EdgeLocation destination_egress_location = 9; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto new file mode 100644 index 00000000000..d888696545b --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto @@ -0,0 +1,304 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/connectivity_test.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "ReachabilityServiceProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// The Reachability service in Google Cloud Network Management API + +// The Reachability service in the Google Cloud Network Management API provides +// services that analyze the reachability within a single Google Virtual Private +// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises +// networks, or between VPC networks and internet hosts. A reachability analysis +// is based on Google Cloud network configurations. +// +// You can use the analysis results to verify these configurations and +// to troubleshoot connectivity issues. +service ReachabilityService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Connectivity Tests owned by a project. + rpc ListConnectivityTests(ListConnectivityTestsRequest) + returns (ListConnectivityTestsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + }; + } + + // Gets the details of a specific Connectivity Test. + rpc GetConnectivityTest(GetConnectivityTestRequest) + returns (ConnectivityTest) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }; + } + + // Creates a new Connectivity Test. + // After you create a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, containing non-existent resources in the network, or you + // don't have read permissions to the network configurations of listed + // projects), then the reachability result returns a value of `UNKNOWN`. + // + // If the endpoint specifications in `ConnectivityTest` are + // incomplete, the reachability result returns a value of + // AMBIGUOUS. For more information, + // see the Connectivity Test documentation. + rpc CreateConnectivityTest(CreateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + body: "resource" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configuration of an existing `ConnectivityTest`. + // After you update a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // The Reachability state in the test resource is updated with the new result. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, they contain non-existent resources in the network, or the + // user does not have read permissions to the network configurations of + // listed projects), then the reachability result returns a value of + // UNKNOWN. + // + // If the endpoint specifications in `ConnectivityTest` are incomplete, the + // reachability result returns a value of `AMBIGUOUS`. See the documentation + // in `ConnectivityTest` for more details. + rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}" + body: "resource" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Rerun an existing `ConnectivityTest`. + // After the user triggers the rerun, the reachability analysis is performed + // as part of the long running operation, which completes when the analysis + // completes. + // + // Even though the test configuration remains the same, the reachability + // result may change due to underlying network configuration changes. + // + // If the endpoint specifications in `ConnectivityTest` become invalid (for + // example, specified resources are deleted in the network, or you lost + // read permissions to the network configurations of listed projects), then + // the reachability result returns a value of `UNKNOWN`. + rpc RerunConnectivityTest(RerunConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a specific `ConnectivityTest`. + rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListConnectivityTests` method. +message ListConnectivityTestsRequest { + // Required. The parent resource of the Connectivity Tests: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Number of `ConnectivityTests` to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; + + // Lists the `ConnectivityTests` that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form ` ` where operators: `<`, `>`, + // `<=`, + // `>=`, + // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + // roughly synonymous with equality). can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/proj-1/locations/global/connectivityTests/test-1 + // + // - Filter by labels: + // - Resources that have a key called `foo` + // labels.foo:* + // - Resources that have a key called `foo` whose value is `bar` + // labels.foo = bar + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// Response for the `ListConnectivityTests` method. +message ListConnectivityTestsResponse { + // List of Connectivity Tests. + repeated ConnectivityTest resources = 1; + + // Page token to fetch the next set of Connectivity Tests. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetConnectivityTest` method. +message GetConnectivityTestRequest { + // Required. `ConnectivityTest` resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `CreateConnectivityTest` method. +message CreateConnectivityTestRequest { + // Required. The parent resource of the Connectivity Test to create: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The logical name of the Connectivity Test in your project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project + string test_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A `ConnectivityTest` resource + ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateConnectivityTest` method. +message UpdateConnectivityTestRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteConnectivityTest` method. +message DeleteConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `RerunConnectivityTest` method. +message RerunConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/locations/global/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto new file mode 100644 index 00000000000..b8169361686 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto @@ -0,0 +1,1876 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// Trace represents one simulated packet forwarding path. +// +// * Each trace contains multiple ordered steps. +// * Each step is in a particular state with associated configuration. +// * State is categorized as final or non-final states. +// * Each final state has a reason associated. +// * Each trace must end with a final state (the last step). +// ``` +// |---------------------Trace----------------------| +// Step1(State) Step2(State) --- StepN(State(final)) +// ``` +message Trace { + // Derived from the source and destination endpoints definition specified by + // user request, and validated by the data plane model. + // If there are multiple traces starting from different source locations, then + // the endpoint_info may be different between traces. + EndpointInfo endpoint_info = 1; + + // A trace of a test contains multiple steps from the initial state to the + // final state (delivered, dropped, forwarded, or aborted). + // + // The steps are ordered by the processing sequence within the simulated + // network state machine. It is critical to preserve the order of the steps + // and avoid reordering or sorting them. + repeated Step steps = 2; + + // ID of trace. For forward traces, this ID is unique for each trace. For + // return traces, it matches ID of associated forward trace. A single forward + // trace can be associated with none, one or more than one return trace. + int32 forward_trace_id = 4; +} + +// A simulated forwarding path is composed of multiple steps. +// Each step has a well-defined state and an associated configuration. +message Step { + // Type of states that are defined in the network state machine. + // Each step in the packet trace is in a specific state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Initial state: packet originating from a Compute Engine instance. + // An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1; + + // Initial state: packet originating from the internet. + // The endpoint information is populated. + START_FROM_INTERNET = 2; + + // Initial state: packet originating from a Google service. + // The google_service information is populated. + START_FROM_GOOGLE_SERVICE = 27; + + // Initial state: packet originating from a VPC or on-premises network + // with internal source IP. + // If the source is a VPC network visible to the user, a NetworkInfo + // is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3; + + // Initial state: packet originating from a Google Kubernetes Engine cluster + // master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21; + + // Initial state: packet originating from a Cloud SQL instance. + // A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22; + + // Initial state: packet originating from a Redis instance. + // A RedisInstanceInfo is populated with starting instance information. + START_FROM_REDIS_INSTANCE = 32; + + // Initial state: packet originating from a Redis Cluster. + // A RedisClusterInfo is populated with starting Cluster information. + START_FROM_REDIS_CLUSTER = 33; + + // Initial state: packet originating from a Cloud Function. + // A CloudFunctionInfo is populated with starting function information. + START_FROM_CLOUD_FUNCTION = 23; + + // Initial state: packet originating from an App Engine service version. + // An AppEngineVersionInfo is populated with starting version information. + START_FROM_APP_ENGINE_VERSION = 25; + + // Initial state: packet originating from a Cloud Run revision. + // A CloudRunRevisionInfo is populated with starting revision information. + START_FROM_CLOUD_RUN_REVISION = 26; + + // Initial state: packet originating from a Storage Bucket. Used only for + // return traces. + // The storage_bucket information is populated. + START_FROM_STORAGE_BUCKET = 29; + + // Initial state: packet originating from a published service that uses + // Private Service Connect. Used only for return traces. + START_FROM_PSC_PUBLISHED_SERVICE = 30; + + // Initial state: packet originating from a serverless network endpoint + // group backend. Used only for return traces. + // The serverless_neg information is populated. + START_FROM_SERVERLESS_NEG = 31; + + // Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4; + + // Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5; + + // Config checking state: verify route. + APPLY_ROUTE = 6; + + // Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7; + + // Config checking state: verify load balancer backend configuration. + ANALYZE_LOAD_BALANCER_BACKEND = 28; + + // Config checking state: packet sent or received under foreign IP + // address and allowed. + SPOOFING_APPROVED = 8; + + // Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9; + + // Forwarding state: arriving at a Compute Engine internal load balancer. + // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not + // used in new tests. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; + + // Forwarding state: arriving at a Compute Engine external load balancer. + // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not + // used in new tests. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; + + // Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12; + + // Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13; + + // Forwarding state: arriving at a VPC connector. + ARRIVE_AT_VPC_CONNECTOR = 24; + + // Transition state: packet header translated. + NAT = 14; + + // Transition state: original connection is terminated and a new proxied + // connection is initiated. + PROXY_CONNECTION = 15; + + // Final state: packet could be delivered. + DELIVER = 16; + + // Final state: packet could be dropped. + DROP = 17; + + // Final state: packet could be forwarded to a network with an unknown + // configuration. + FORWARD = 18; + + // Final state: analysis is aborted. + ABORT = 19; + + // Special state: viewer of the test result does not have permission to + // see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20; + } + + // A description of the step. Usually this is a summary of the state. + string description = 1; + + // Each step is in one of the pre-defined states. + State state = 2; + + // This is a step that leads to the final state Drop. + bool causes_drop = 3; + + // Project ID that contains the configuration this step is validating. + string project_id = 4; + + // Configuration or metadata associated with each step. + // The configuration is filtered based on viewer's permission. If a viewer + // has no permission to view the configuration in this step, for non-final + // states a special state is populated (VIEWER_PERMISSION_MISSING), and for + // final state the configuration is cleared. + oneof step_info { + // Display information of a Compute Engine instance. + InstanceInfo instance = 5; + + // Display information of a Compute Engine firewall rule. + FirewallInfo firewall = 6; + + // Display information of a Compute Engine route. + RouteInfo route = 7; + + // Display information of the source and destination under analysis. + // The endpoint information in an intermediate state may differ with the + // initial input, as it might be modified by state like NAT, + // or Connection Proxy. + EndpointInfo endpoint = 8; + + // Display information of a Google service + GoogleServiceInfo google_service = 24; + + // Display information of a Compute Engine forwarding rule. + ForwardingRuleInfo forwarding_rule = 9; + + // Display information of a Compute Engine VPN gateway. + VpnGatewayInfo vpn_gateway = 10; + + // Display information of a Compute Engine VPN tunnel. + VpnTunnelInfo vpn_tunnel = 11; + + // Display information of a VPC connector. + VpcConnectorInfo vpc_connector = 21; + + // Display information of the final state "deliver" and reason. + DeliverInfo deliver = 12; + + // Display information of the final state "forward" and reason. + ForwardInfo forward = 13; + + // Display information of the final state "abort" and reason. + AbortInfo abort = 14; + + // Display information of the final state "drop" and reason. + DropInfo drop = 15; + + // Display information of the load balancers. Deprecated in favor of the + // `load_balancer_backend_info` field, not used in new tests. + LoadBalancerInfo load_balancer = 16 [deprecated = true]; + + // Display information of a Google Cloud network. + NetworkInfo network = 17; + + // Display information of a Google Kubernetes Engine cluster master. + GKEMasterInfo gke_master = 18; + + // Display information of a Cloud SQL instance. + CloudSQLInstanceInfo cloud_sql_instance = 19; + + // Display information of a Redis Instance. + RedisInstanceInfo redis_instance = 30; + + // Display information of a Redis Cluster. + RedisClusterInfo redis_cluster = 31; + + // Display information of a Cloud Function. + CloudFunctionInfo cloud_function = 20; + + // Display information of an App Engine service version. + AppEngineVersionInfo app_engine_version = 22; + + // Display information of a Cloud Run revision. + CloudRunRevisionInfo cloud_run_revision = 23; + + // Display information of a NAT. + NatInfo nat = 25; + + // Display information of a ProxyConnection. + ProxyConnectionInfo proxy_connection = 26; + + // Display information of a specific load balancer backend. + LoadBalancerBackendInfo load_balancer_backend_info = 27; + + // Display information of a Storage Bucket. Used only for return traces. + StorageBucketInfo storage_bucket = 28; + + // Display information of a Serverless network endpoint group backend. Used + // only for return traces. + ServerlessNegInfo serverless_neg = 29; + } +} + +// For display only. Metadata associated with a Compute Engine instance. +message InstanceInfo { + // Name of a Compute Engine instance. + string display_name = 1; + + // URI of a Compute Engine instance. + string uri = 2; + + // Name of the network interface of a Compute Engine instance. + string interface = 3; + + // URI of a Compute Engine network. + string network_uri = 4; + + // Internal IP address of the network interface. + string internal_ip = 5; + + // External IP address of the network interface. + string external_ip = 6; + + // Network tags configured on the instance. + repeated string network_tags = 7; + + // Service account authorized for the instance. + string service_account = 8 [deprecated = true]; + + // URI of the PSC network attachment the NIC is attached to (if relevant). + string psc_network_attachment_uri = 9; +} + +// For display only. Metadata associated with a Compute Engine network. +// Next ID: 7 +message NetworkInfo { + // Name of a Compute Engine network. + string display_name = 1; + + // URI of a Compute Engine network. + string uri = 2; + + // URI of the subnet matching the source IP address of the test. + string matched_subnet_uri = 5; + + // The IP range of the subnet matching the source IP address of the test. + string matched_ip_range = 4; + + // The region of the subnet matching the source IP address of the test. + string region = 6; +} + +// For display only. Metadata associated with a VPC firewall rule, an implied +// VPC firewall rule, or a firewall policy rule. +message FirewallInfo { + // The firewall rule's type. + enum FirewallRuleType { + // Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + + // Hierarchical firewall policy rule. For details, see + // [Hierarchical firewall policies + // overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + + // VPC firewall rule. For details, see + // [VPC firewall rules + // overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2; + + // Implied VPC firewall rule. For details, see + // [Implied + // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3; + + // Implicit firewall rules that are managed by serverless VPC access to + // allow ingress access. They are not visible in the Google Cloud console. + // For details, see [VPC connector's implicit + // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + + // Global network firewall policy rule. + // For details, see [Network firewall + // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). + NETWORK_FIREWALL_POLICY_RULE = 5; + + // Regional network firewall policy rule. + // For details, see [Regional network firewall + // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + + // Firewall policy rule containing attributes not yet supported in + // Connectivity tests. Firewall analysis is skipped if such a rule can + // potentially be matched. Please see the [list of unsupported + // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + + // Tracking state for response traffic created when request traffic goes + // through allow firewall rule. + // For details, see [firewall rules + // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + TRACKING_STATE = 101; + } + + // The display name of the firewall rule. This field might be empty for + // firewall policy rules. + string display_name = 1; + + // The URI of the firewall rule. This field is not applicable to implied + // VPC firewall rules. + string uri = 2; + + // Possible values: INGRESS, EGRESS + string direction = 3; + + // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + string action = 4; + + // The priority of the firewall rule. + int32 priority = 5; + + // The URI of the VPC network that the firewall rule is associated with. + // This field is not applicable to hierarchical firewall policy rules. + string network_uri = 6; + + // The target tags defined by the VPC firewall rule. This field is not + // applicable to firewall policy rules. + repeated string target_tags = 7; + + // The target service accounts specified by the firewall rule. + repeated string target_service_accounts = 8; + + // The name of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy = 9; + + // The URI of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy_uri = 11; + + // The firewall rule's type. + FirewallRuleType firewall_rule_type = 10; +} + +// For display only. Metadata associated with a Compute Engine route. +message RouteInfo { + // Type of route: + enum RouteType { + // Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0; + + // Route is a subnet route automatically created by the system. + SUBNET = 1; + + // Static route created by the user, including the default route to the + // internet. + STATIC = 2; + + // Dynamic route exchanged between BGP peers. + DYNAMIC = 3; + + // A subnet route received from peering network. + PEERING_SUBNET = 4; + + // A static route received from peering network. + PEERING_STATIC = 5; + + // A dynamic route received from peering network. + PEERING_DYNAMIC = 6; + + // Policy based route. + POLICY_BASED = 7; + + // Advertised route. Synthetic route which is used to transition from the + // StartFromPrivateNetwork state in Connectivity tests. + ADVERTISED = 101; + } + + // Type of next hop: + enum NextHopType { + // Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0; + + // Next hop is an IP address. + NEXT_HOP_IP = 1; + + // Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2; + + // Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3; + + // Next hop is a peering VPC. + NEXT_HOP_PEERING = 4; + + // Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5; + + // Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6; + + // Next hop is a VPN gateway. This scenario only happens when tracing + // connectivity from an on-premises network to Google Cloud through a VPN. + // The analysis simulates a packet departing from the on-premises network + // through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7; + + // Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8; + + // Next hop is blackhole; that is, the next hop either does not exist or is + // not running. + NEXT_HOP_BLACKHOLE = 9; + + // Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10; + + // Next hop is a + // [router appliance + // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). + NEXT_HOP_ROUTER_APPLIANCE = 11; + + // Next hop is an NCC hub. + NEXT_HOP_NCC_HUB = 12; + } + + // Indicates where routes are applicable. + enum RouteScope { + // Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0; + + // Route is applicable to packets in Network. + NETWORK = 1; + + // Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2; + } + + // Type of route. + RouteType route_type = 8; + + // Type of next hop. + NextHopType next_hop_type = 9; + + // Indicates where route is applicable. + RouteScope route_scope = 14; + + // Name of a route. + string display_name = 1; + + // URI of a route (if applicable). + string uri = 2; + + // Region of the route (if applicable). + string region = 19; + + // Destination IP range of the route. + string dest_ip_range = 3; + + // Next hop of the route. + string next_hop = 4; + + // URI of a Compute Engine network. NETWORK routes only. + string network_uri = 5; + + // Priority of the route. + int32 priority = 6; + + // Instance tags of the route. + repeated string instance_tags = 7; + + // Source IP address range of the route. Policy based routes only. + string src_ip_range = 10; + + // Destination port ranges of the route. Policy based routes only. + repeated string dest_port_ranges = 11; + + // Source port ranges of the route. Policy based routes only. + repeated string src_port_ranges = 12; + + // Protocols of the route. Policy based routes only. + repeated string protocols = 13; + + // URI of a NCC Hub. NCC_HUB routes only. + optional string ncc_hub_uri = 15; + + // URI of a NCC Spoke. NCC_HUB routes only. + optional string ncc_spoke_uri = 16; + + // For advertised dynamic routes, the URI of the Cloud Router that advertised + // the corresponding IP prefix. + optional string advertised_route_source_router_uri = 17; + + // For advertised routes, the URI of their next hop, i.e. the URI of the + // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + // the advertised prefix is advertised through, or URI of the source peered + // network. + optional string advertised_route_next_hop_uri = 18; +} + +// For display only. Details of a Google Service sending packets to a +// VPC network. Although the source IP might be a publicly routable address, +// some Google Services use special routes within Google production +// infrastructure to reach Compute Engine Instances. +// https://cloud.google.com/vpc/docs/routes#special_return_paths +message GoogleServiceInfo { + // Recognized type of a Google Service. + enum GoogleServiceType { + // Unspecified Google Service. + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + + // Identity aware proxy. + // https://cloud.google.com/iap/docs/using-tcp-forwarding + IAP = 1; + + // One of two services sharing IP ranges: + // * Load Balancer proxy + // * Centralized Health Check prober + // https://cloud.google.com/load-balancing/docs/firewall-rules + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + + // Connectivity from Cloud DNS to forwarding targets or alternate name + // servers that use private routing. + // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + // https://cloud.google.com/dns/docs/policies#firewall-rules + CLOUD_DNS = 3; + + // private.googleapis.com and restricted.googleapis.com + GOOGLE_API = 4; + + // Google API via Private Service Connect. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_PSC = 5; + + // Google API via VPC Service Controls. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_VPC_SC = 6; + } + + // Source IP address. + string source_ip = 1; + + // Recognized type of a Google Service. + GoogleServiceType google_service_type = 2; +} + +// For display only. Metadata associated with a Compute Engine forwarding rule. +message ForwardingRuleInfo { + // Name of the forwarding rule. + string display_name = 1; + + // URI of the forwarding rule. + string uri = 2; + + // Protocol defined in the forwarding rule that matches the packet. + string matched_protocol = 3; + + // Port range defined in the forwarding rule that matches the packet. + string matched_port_range = 6; + + // VIP of the forwarding rule. + string vip = 4; + + // Target type of the forwarding rule. + string target = 5; + + // Network URI. + string network_uri = 7; + + // Region of the forwarding rule. Set only for regional forwarding rules. + string region = 8; + + // Name of the load balancer the forwarding rule belongs to. Empty for + // forwarding rules not related to load balancers (like PSC forwarding rules). + string load_balancer_name = 9; + + // URI of the PSC service attachment this forwarding rule targets (if + // applicable). + string psc_service_attachment_uri = 10; + + // PSC Google API target this forwarding rule targets (if applicable). + string psc_google_api_target = 11; +} + +// For display only. Metadata associated with a load balancer. +message LoadBalancerInfo { + // The type definition for a load balancer: + enum LoadBalancerType { + // Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1; + + // Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2; + + // HTTP(S) proxy load balancer. + HTTP_PROXY = 3; + + // TCP proxy load balancer. + TCP_PROXY = 4; + + // SSL proxy load balancer. + SSL_PROXY = 5; + } + + // The type definition for a load balancer backend configuration: + enum BackendType { + // Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0; + + // Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1; + + // Target Pool as the load balancer's backend. + TARGET_POOL = 2; + + // Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3; + } + + // Type of the load balancer. + LoadBalancerType load_balancer_type = 1; + + // URI of the health check for the load balancer. Deprecated and no longer + // populated as different load balancer backends might have different health + // checks. + string health_check_uri = 2 [deprecated = true]; + + // Information for the loadbalancer backends. + repeated LoadBalancerBackend backends = 3; + + // Type of load balancer's backend configuration. + BackendType backend_type = 4; + + // Backend configuration URI. + string backend_uri = 5; +} + +// For display only. Metadata associated with a specific load balancer backend. +message LoadBalancerBackend { + // State of a health check firewall configuration: + enum HealthCheckFirewallState { + // State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + + // There are configured firewall rules to allow health check probes to the + // backend. + CONFIGURED = 1; + + // There are firewall rules configured to allow partial health check ranges + // or block all health check ranges. + // If a health check probe is sent from denied IP ranges, + // the health check to the backend will fail. Then, the backend will be + // marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2; + } + + // Name of a Compute Engine instance or network endpoint. + string display_name = 1; + + // URI of a Compute Engine instance or network endpoint. + string uri = 2; + + // State of the health check firewall configuration. + HealthCheckFirewallState health_check_firewall_state = 3; + + // A list of firewall rule URIs allowing probes from health check IP ranges. + repeated string health_check_allowing_firewall_rules = 4; + + // A list of firewall rule URIs blocking probes from health check IP ranges. + repeated string health_check_blocking_firewall_rules = 5; +} + +// For display only. Metadata associated with a Compute Engine VPN gateway. +message VpnGatewayInfo { + // Name of a VPN gateway. + string display_name = 1; + + // URI of a VPN gateway. + string uri = 2; + + // URI of a Compute Engine network where the VPN gateway is configured. + string network_uri = 3; + + // IP address of the VPN gateway. + string ip_address = 4; + + // A VPN tunnel that is associated with this VPN gateway. + // There may be multiple VPN tunnels configured on a VPN gateway, and only + // the one relevant to the test is displayed. + string vpn_tunnel_uri = 5; + + // Name of a Google Cloud region where this VPN gateway is configured. + string region = 6; +} + +// For display only. Metadata associated with a Compute Engine VPN tunnel. +message VpnTunnelInfo { + // Types of VPN routing policy. For details, refer to [Networks and Tunnel + // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + enum RoutingType { + // Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0; + + // Route based VPN. + ROUTE_BASED = 1; + + // Policy based routing. + POLICY_BASED = 2; + + // Dynamic (BGP) routing. + DYNAMIC = 3; + } + + // Name of a VPN tunnel. + string display_name = 1; + + // URI of a VPN tunnel. + string uri = 2; + + // URI of the VPN gateway at local end of the tunnel. + string source_gateway = 3; + + // URI of a VPN gateway at remote end of the tunnel. + string remote_gateway = 4; + + // Remote VPN gateway's IP address. + string remote_gateway_ip = 5; + + // Local VPN gateway's IP address. + string source_gateway_ip = 6; + + // URI of a Compute Engine network where the VPN tunnel is configured. + string network_uri = 7; + + // Name of a Google Cloud region where this VPN tunnel is configured. + string region = 8; + + // Type of the routing policy. + RoutingType routing_type = 9; +} + +// For display only. The specification of the endpoints for the test. +// EndpointInfo is derived from source and destination Endpoint and validated +// by the backend data plane model. +message EndpointInfo { + // Source IP address. + string source_ip = 1; + + // Destination IP address. + string destination_ip = 2; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 3; + + // Source port. Only valid when protocol is TCP or UDP. + int32 source_port = 4; + + // Destination port. Only valid when protocol is TCP or UDP. + int32 destination_port = 5; + + // URI of the network where this packet originates from. + string source_network_uri = 6; + + // URI of the network where this packet is sent to. + string destination_network_uri = 7; + + // URI of the source telemetry agent this packet originates from. + string source_agent_uri = 8; +} + +// Details of the final state "deliver" and associated resource. +message DeliverInfo { + // Deliver target types: + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Target is a Compute Engine instance. + INSTANCE = 1; + + // Target is the internet. + INTERNET = 2; + + // Target is a Google API. + GOOGLE_API = 3; + + // Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4; + + // Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5; + + // Target is a published service that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + PSC_PUBLISHED_SERVICE = 6; + + // Target is Google APIs that use [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_GOOGLE_API = 7; + + // Target is a VPC-SC that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_VPC_SC = 8; + + // Target is a serverless network endpoint group. + SERVERLESS_NEG = 9; + + // Target is a Cloud Storage bucket. + STORAGE_BUCKET = 10; + + // Target is a private network. Used only for return traces. + PRIVATE_NETWORK = 11; + + // Target is a Cloud Function. Used only for return traces. + CLOUD_FUNCTION = 12; + + // Target is a App Engine service version. Used only for return traces. + APP_ENGINE_VERSION = 13; + + // Target is a Cloud Run revision. Used only for return traces. + CLOUD_RUN_REVISION = 14; + + // Target is a Google-managed service. Used only for return traces. + GOOGLE_MANAGED_SERVICE = 15; + + // Target is a Redis Instance. + REDIS_INSTANCE = 16; + + // Target is a Redis Cluster. + REDIS_CLUSTER = 17; + } + + // Target type where the packet is delivered to. + Target target = 1; + + // URI of the resource that the packet is delivered to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the Cloud Storage Bucket the packet is delivered to (if + // applicable). + string storage_bucket = 4; + + // PSC Google API target the packet is delivered to (if applicable). + string psc_google_api_target = 5; +} + +// Details of the final state "forward" and associated resource. +message ForwardInfo { + // Forward target types. + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Forwarded to a VPC peering network. + PEERING_VPC = 1; + + // Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2; + + // Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3; + + // Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4 [deprecated = true]; + + // Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + + // Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6 [deprecated = true]; + + // Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7; + + // Forwarded to an NCC Hub. + NCC_HUB = 8; + + // Forwarded to a router appliance. + ROUTER_APPLIANCE = 9; + } + + // Target type where this packet is forwarded to. + Target target = 1; + + // URI of the resource that the packet is forwarded to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; +} + +// Details of the final state "abort" and associated resource. +message AbortInfo { + // Abort cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Aborted due to unknown network. Deprecated, not used in the new tests. + UNKNOWN_NETWORK = 1 [deprecated = true]; + + // Aborted because no project information can be derived from the test + // input. Deprecated, not used in the new tests. + UNKNOWN_PROJECT = 3 [deprecated = true]; + + // Aborted because traffic is sent from a public IP to an instance without + // an external IP. Deprecated, not used in the new tests. + NO_EXTERNAL_IP = 7 [deprecated = true]; + + // Aborted because none of the traces matches destination information + // specified in the input test request. Deprecated, not used in the new + // tests. + UNINTENDED_DESTINATION = 8 [deprecated = true]; + + // Aborted because the source endpoint could not be found. Deprecated, not + // used in the new tests. + SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; + + // Aborted because the source network does not match the source endpoint. + // Deprecated, not used in the new tests. + MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; + + // Aborted because the destination endpoint could not be found. Deprecated, + // not used in the new tests. + DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; + + // Aborted because the destination network does not match the destination + // endpoint. Deprecated, not used in the new tests. + MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; + + // Aborted because no endpoint with the packet's destination IP address is + // found. + UNKNOWN_IP = 2; + + // Aborted because no endpoint with the packet's destination IP is found in + // the Google-managed project. + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; + + // Aborted because the source IP address doesn't belong to any of the + // subnets of the source VPC network. + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; + + // Aborted because user lacks permission to access all or part of the + // network configurations required to run the test. + PERMISSION_DENIED = 4; + + // Aborted because user lacks permission to access Cloud NAT configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; + + // Aborted because user lacks permission to access Network endpoint group + // endpoint configs required to run the test. + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; + + // Aborted because user lacks permission to access Cloud Router configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; + + // Aborted because no valid source or destination endpoint is derived from + // the input test request. + NO_SOURCE_LOCATION = 5; + + // Aborted because the source or destination endpoint specified in + // the request is invalid. Some examples: + // - The request might contain malformed resource URI, project ID, or IP + // address. + // - The request might contain inconsistent information (for example, the + // request might include both the instance and the network, but the instance + // might not have a NIC in that network). + INVALID_ARGUMENT = 6; + + // Aborted because the number of steps in the trace exceeds a certain + // limit. It might be caused by a routing loop. + TRACE_TOO_LONG = 9; + + // Aborted due to internal server error. + INTERNAL_ERROR = 10; + + // Aborted because the test scenario is not supported. + UNSUPPORTED = 15; + + // Aborted because the source and destination resources have no common IP + // version. + MISMATCHED_IP_VERSION = 16; + + // Aborted because the connection between the control plane and the node of + // the source cluster is initiated by the node and managed by the + // Konnectivity proxy. + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + + // Aborted because expected resource configuration was missing. + RESOURCE_CONFIG_NOT_FOUND = 18; + + // Aborted because expected VM instance configuration was missing. + VM_INSTANCE_CONFIG_NOT_FOUND = 24; + + // Aborted because expected network configuration was missing. + NETWORK_CONFIG_NOT_FOUND = 25; + + // Aborted because expected firewall configuration was missing. + FIREWALL_CONFIG_NOT_FOUND = 26; + + // Aborted because expected route configuration was missing. + ROUTE_CONFIG_NOT_FOUND = 27; + + // Aborted because a PSC endpoint selection for the Google-managed service + // is ambiguous (several PSC endpoints satisfy test input). + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; + + // Aborted because tests with a PSC-based Cloud SQL instance as a source are + // not supported. + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; + + // Aborted because tests with a Redis Cluster as a source are not supported. + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; + + // Aborted because tests with a Redis Instance as a source are not + // supported. + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; + + // Aborted because tests with a forwarding rule as a source are not + // supported. + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + + // Aborted because one of the endpoints is a non-routable IP address + // (loopback, link-local, etc). + NON_ROUTABLE_IP_ADDRESS = 22; + + // Aborted due to an unknown issue in the Google-managed project. + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + + // Aborted due to an unsupported configuration of the Google-managed + // project. + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + } + + // Causes that the analysis is aborted. + Cause cause = 1; + + // URI of the resource that caused the abort. + string resource_uri = 2; + + // IP address that caused the abort. + string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // List of project IDs the user specified in the request but lacks access to. + // In this case, analysis is aborted with the PERMISSION_DENIED cause. + repeated string projects_missing_permission = 3; +} + +// Details of the final state "drop" and associated resource. +message DropInfo { + // Drop cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Destination external address cannot be resolved to a known target. If + // the address is used in a Google Cloud project, provide the project ID + // as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1; + + // A Compute Engine instance can only send or receive a packet with a + // foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2; + + // Dropped due to a firewall rule, unless allowed due to connection + // tracking. + FIREWALL_RULE = 3; + + // Dropped due to no matching routes. + NO_ROUTE = 4; + + // Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5; + + // Packet is sent to a wrong (unintended) network. Example: you trace a + // packet from VM1:Network1 to VM2:Network2, however, the route configured + // in Network1 sends the packet destined for VM2's IP address to Network3. + ROUTE_WRONG_NETWORK = 6; + + // Route's next hop IP address cannot be resolved to a GCP resource. + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + + // Route's next hop resource is not found. + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + + // Route's next hop instance doesn't have a NIC in the route's network. + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + + // Route's next hop IP address is not a primary IP address of the next hop + // instance. + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + + // Route's next hop forwarding rule doesn't match next hop IP address. + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + + // Route's next hop VPN tunnel is down (does not have valid IKE SAs). + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + + // Route's next hop forwarding rule type is invalid (it's not a forwarding + // rule of the internal passthrough load balancer). + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + + // Packet is sent from the Internet to the private IPv6 address. + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + + // The packet does not match a policy-based VPN tunnel local selector. + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + + // The packet does not match a policy-based VPN tunnel remote selector. + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + + // Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7; + + // Instance with only an internal IP address tries to access Google API and + // services, but private Google access is not enabled in the subnet. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + + // Source endpoint tries to access Google API and services through the VPN + // tunnel to another network, but Private Google Access needs to be enabled + // in the source endpoint network. + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + + // Instance with only an internal IP address tries to access external hosts, + // but Cloud NAT is not enabled in the subnet, unless special configurations + // on a VM allow this connection. + NO_EXTERNAL_ADDRESS = 9; + + // Destination internal address cannot be resolved to a known target. If + // this is a shared VPC scenario, verify if the service project ID is + // provided as test input. Otherwise, verify if the IP address is being + // used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10; + + // Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11; + + // Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12; + + // Firewalls block the health check probes to the backends and cause + // the backends to be unavailable for traffic from the load balancer. + // For more details, see [Health check firewall + // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + + // Packet is sent from or to a Compute Engine instance that is not in a + // running state. + INSTANCE_NOT_RUNNING = 14; + + // Packet sent from or to a GKE cluster that is not in running state. + GKE_CLUSTER_NOT_RUNNING = 27; + + // Packet sent from or to a Cloud SQL instance that is not in running state. + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + + // Packet sent from or to a Redis Instance that is not in running state. + REDIS_INSTANCE_NOT_RUNNING = 68; + + // Packet sent from or to a Redis Cluster that is not in running state. + REDIS_CLUSTER_NOT_RUNNING = 69; + + // The type of traffic is blocked and the user cannot configure a firewall + // rule to enable it. See [Always blocked + // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + // more details. + TRAFFIC_TYPE_BLOCKED = 15; + + // Access to Google Kubernetes Engine cluster master's endpoint is not + // authorized. See [Access to the cluster + // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + // for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + + // Access to the Cloud SQL instance endpoint is not authorized. + // See [Authorizing with authorized + // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + // more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + + // Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18; + + // Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + + // Packet was dropped because there is no peering between the originating + // network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + + // Packet was dropped because the Google-managed service uses Private + // Service Connect (PSC), but the PSC endpoint is not found in the project. + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + + // Packet was dropped because the GKE cluster uses Private Service Connect + // (PSC), but the PSC endpoint is not found in the project. + GKE_PSC_ENDPOINT_MISSING = 36; + + // Packet was dropped because the Cloud SQL instance has neither a private + // nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + + // Packet was dropped because a GKE cluster private endpoint is + // unreachable from a region different from the cluster's region. + GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + + // Packet sent from a public GKE cluster control plane to a private + // IP address. + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + + // Packet was dropped because there is no route from a GKE cluster + // control plane to a destination network. + GKE_CONTROL_PLANE_NO_ROUTE = 32; + + // Packet sent from a Cloud SQL instance to an external IP address is not + // allowed. The Cloud SQL instance is not configured to send packets to + // external IP addresses. + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + + // Packet sent from a Cloud SQL instance with only a public IP address to a + // private IP address. + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + + // Packet was dropped because there is no route from a Cloud SQL + // instance to a destination network. + CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + + // Packet was dropped because the Cloud SQL instance requires all + // connections to use Cloud SQL connectors and to target the Cloud SQL proxy + // port (3307). + CLOUD_SQL_CONNECTOR_REQUIRED = 63; + + // Packet could be dropped because the Cloud Function is not in an active + // status. + CLOUD_FUNCTION_NOT_ACTIVE = 22; + + // Packet could be dropped because no VPC connector is set. + VPC_CONNECTOR_NOT_SET = 23; + + // Packet could be dropped because the VPC connector is not in a running + // state. + VPC_CONNECTOR_NOT_RUNNING = 24; + + // Packet could be dropped because the traffic from the serverless service + // to the VPC connector is not allowed. + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; + + // Packet could be dropped because the health check traffic to the VPC + // connector is not allowed. + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; + + // Packet could be dropped because it was sent from a different region + // to a regional forwarding without global access. + FORWARDING_RULE_REGION_MISMATCH = 25; + + // The Private Service Connect endpoint is in a project that is not approved + // to connect to the service. + PSC_CONNECTION_NOT_ACCEPTED = 26; + + // The packet is sent to the Private Service Connect endpoint over the + // peering, but [it's not + // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule does not have + // global access enabled. + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule has multiple ports + // specified. + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group) targeting a Cloud SQL service attachment, but this + // configuration is not supported. + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + + // No NAT subnets are defined for the PSC service attachment. + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + + // PSC endpoint is accessed via NCC, but PSC transitivity configuration is + // not yet propagated. + PSC_TRANSITIVITY_NOT_PROPAGATED = 64; + + // The packet sent from the hybrid NEG proxy matches a non-dynamic route, + // but such a configuration is not supported. + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + + // The packet sent from the hybrid NEG proxy matches a dynamic route with a + // next hop in a different region, but such a configuration is not + // supported. + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + + // Packet sent from a Cloud Run revision that is not ready. + CLOUD_RUN_REVISION_NOT_READY = 29; + + // Packet was dropped inside Private Service Connect service producer. + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + + // Packet sent to a load balancer, which requires a proxy-only subnet and + // the subnet is not found. + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + + // Packet sent to Cloud Nat without active NAT IPs. + CLOUD_NAT_NO_ADDRESSES = 40; + + // Packet is stuck in a routing loop. + ROUTING_LOOP = 59; + + // Packet is dropped inside a Google-managed service due to being delivered + // in return trace to an endpoint that doesn't match the endpoint the packet + // was sent from in forward trace. Used only for return traces. + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; + + // Packet is dropped due to a load balancer backend instance not having a + // network interface in the network expected by the load balancer. + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; + + // Packet is dropped due to a backend service named port not being defined + // on the instance group level. + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; + + // Packet is dropped due to a destination IP range being part of a Private + // NAT IP range. + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; + + // Generic drop cause for a packet being dropped inside a Redis Instance + // service project. + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Instance. Port 6379 should be used to connect to a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PORT = 71; + + // Packet is dropped due to connecting from PUPI address to a PSA based + // Redis Instance. + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; + + // Packet is dropped due to no route to the destination network. + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; + + // Redis Instance does not have an external IP address. + REDIS_INSTANCE_NO_EXTERNAL_IP = 74; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Instance. Only TCP connections are accepted by a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; + + // Generic drop cause for a packet being dropped inside a Redis Cluster + // service project. + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to + // a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PORT = 76; + + // Redis Cluster does not have an external IP address. + REDIS_CLUSTER_NO_EXTERNAL_IP = 77; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix advertised + // via BGP by the Cloud Router. + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix included to + // the local traffic selector of the VPN tunnel. + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; + + // Packet from the unknown peered network is dropped due to no known route + // from the source network to the destination IP address. + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + + // Sending packets processed by the Private NAT Gateways to the Private + // Service Connect endpoints is not supported. + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; + } + + // Cause that the packet is dropped. + Cause cause = 1; + + // URI of the resource that caused the drop. + string resource_uri = 2; + + // Source IP address of the dropped packet (if relevant). + string source_ip = 3; + + // Destination IP address of the dropped packet (if relevant). + string destination_ip = 4; + + // Region of the dropped packet (if relevant). + string region = 5; +} + +// For display only. Metadata associated with a Google Kubernetes Engine (GKE) +// cluster master. +message GKEMasterInfo { + // URI of a GKE cluster. + string cluster_uri = 2; + + // URI of a GKE cluster network. + string cluster_network_uri = 4; + + // Internal IP address of a GKE cluster control plane. + string internal_ip = 5; + + // External IP address of a GKE cluster control plane. + string external_ip = 6; + + // DNS endpoint of a GKE cluster control plane. + string dns_endpoint = 7; +} + +// For display only. Metadata associated with a Cloud SQL instance. +message CloudSQLInstanceInfo { + // Name of a Cloud SQL instance. + string display_name = 1; + + // URI of a Cloud SQL instance. + string uri = 2; + + // URI of a Cloud SQL instance network or empty string if the instance does + // not have one. + string network_uri = 4; + + // Internal IP address of a Cloud SQL instance. + string internal_ip = 5; + + // External IP address of a Cloud SQL instance. + string external_ip = 6; + + // Region in which the Cloud SQL instance is running. + string region = 7; +} + +// For display only. Metadata associated with a Cloud Redis Instance. +message RedisInstanceInfo { + // Name of a Cloud Redis Instance. + string display_name = 1; + + // URI of a Cloud Redis Instance. + string uri = 2; + + // URI of a Cloud Redis Instance network. + string network_uri = 3; + + // Primary endpoint IP address of a Cloud Redis Instance. + string primary_endpoint_ip = 4; + + // Read endpoint IP address of a Cloud Redis Instance (if applicable). + string read_endpoint_ip = 5; + + // Region in which the Cloud Redis Instance is defined. + string region = 6; +} + +// For display only. Metadata associated with a Redis Cluster. +message RedisClusterInfo { + // Name of a Redis Cluster. + string display_name = 1; + + // URI of a Redis Cluster in format + // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + string uri = 2; + + // URI of a Redis Cluster network in format + // "projects/{project_id}/global/networks/{network_id}". + string network_uri = 3; + + // Discovery endpoint IP address of a Redis Cluster. + string discovery_endpoint_ip_address = 4 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Secondary endpoint IP address of a Redis Cluster. + string secondary_endpoint_ip_address = 5 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the region in which the Redis Cluster is defined. For example, + // "us-central1". + string location = 6; +} + +// For display only. Metadata associated with a Cloud Function. +message CloudFunctionInfo { + // Name of a Cloud Function. + string display_name = 1; + + // URI of a Cloud Function. + string uri = 2; + + // Location in which the Cloud Function is deployed. + string location = 3; + + // Latest successfully deployed version id of the Cloud Function. + int64 version_id = 4; +} + +// For display only. Metadata associated with a Cloud Run revision. +message CloudRunRevisionInfo { + // Name of a Cloud Run revision. + string display_name = 1; + + // URI of a Cloud Run revision. + string uri = 2; + + // Location in which this revision is deployed. + string location = 4; + + // URI of Cloud Run service this revision belongs to. + string service_uri = 5; +} + +// For display only. Metadata associated with an App Engine version. +message AppEngineVersionInfo { + // Name of an App Engine version. + string display_name = 1; + + // URI of an App Engine version. + string uri = 2; + + // Runtime of the App Engine version. + string runtime = 3; + + // App Engine execution environment for a version. + string environment = 4; +} + +// For display only. Metadata associated with a VPC connector. +message VpcConnectorInfo { + // Name of a VPC connector. + string display_name = 1; + + // URI of a VPC connector. + string uri = 2; + + // Location in which the VPC connector is deployed. + string location = 3; +} + +// For display only. Metadata associated with NAT. +message NatInfo { + // Types of NAT. + enum Type { + // Type is unspecified. + TYPE_UNSPECIFIED = 0; + + // From Compute Engine instance's internal address to external address. + INTERNAL_TO_EXTERNAL = 1; + + // From Compute Engine instance's external address to internal address. + EXTERNAL_TO_INTERNAL = 2; + + // Cloud NAT Gateway. + CLOUD_NAT = 3; + + // Private service connect NAT. + PRIVATE_SERVICE_CONNECT = 4; + } + + // Type of NAT. + Type type = 1; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 2; + + // URI of the network where NAT translation takes place. + string network_uri = 3; + + // Source IP address before NAT translation. + string old_source_ip = 4; + + // Source IP address after NAT translation. + string new_source_ip = 5; + + // Destination IP address before NAT translation. + string old_destination_ip = 6; + + // Destination IP address after NAT translation. + string new_destination_ip = 7; + + // Source port before NAT translation. Only valid when protocol is TCP or UDP. + int32 old_source_port = 8; + + // Source port after NAT translation. Only valid when protocol is TCP or UDP. + int32 new_source_port = 9; + + // Destination port before NAT translation. Only valid when protocol is TCP or + // UDP. + int32 old_destination_port = 10; + + // Destination port after NAT translation. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 11; + + // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + string router_uri = 12; + + // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + string nat_gateway_name = 13; +} + +// For display only. Metadata associated with ProxyConnection. +message ProxyConnectionInfo { + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 1; + + // Source IP address of an original connection. + string old_source_ip = 2; + + // Source IP address of a new connection. + string new_source_ip = 3; + + // Destination IP address of an original connection + string old_destination_ip = 4; + + // Destination IP address of a new connection. + string new_destination_ip = 5; + + // Source port of an original connection. Only valid when protocol is TCP or + // UDP. + int32 old_source_port = 6; + + // Source port of a new connection. Only valid when protocol is TCP or UDP. + int32 new_source_port = 7; + + // Destination port of an original connection. Only valid when protocol is TCP + // or UDP. + int32 old_destination_port = 8; + + // Destination port of a new connection. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 9; + + // Uri of proxy subnet. + string subnet_uri = 10; + + // URI of the network where connection is proxied. + string network_uri = 11; +} + +// For display only. Metadata associated with the load balancer backend. +message LoadBalancerBackendInfo { + // Health check firewalls configuration state enum. + enum HealthCheckFirewallsConfigState { + // Configuration state unspecified. It usually means that the backend has + // no health check attached, or there was an unexpected configuration error + // preventing Connectivity tests from verifying health check configuration. + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; + + // Firewall rules (policies) allowing health check traffic from all required + // IP ranges to the backend are configured. + FIREWALLS_CONFIGURED = 1; + + // Firewall rules (policies) allow health check traffic only from a part of + // required IP ranges. + FIREWALLS_PARTIALLY_CONFIGURED = 2; + + // Firewall rules (policies) deny health check traffic from all required + // IP ranges to the backend. + FIREWALLS_NOT_CONFIGURED = 3; + + // The network contains firewall rules of unsupported types, so Connectivity + // tests were not able to verify health check configuration status. Please + // refer to the documentation for the list of unsupported configurations: + // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs + FIREWALLS_UNSUPPORTED = 4; + } + + // Display name of the backend. For example, it might be an instance name for + // the instance group backends, or an IP address and port for zonal network + // endpoint group backends. + string name = 1; + + // URI of the backend instance (if applicable). Populated for instance group + // backends, and zonal NEG backends. + string instance_uri = 2; + + // URI of the backend service this backend belongs to (if applicable). + string backend_service_uri = 3; + + // URI of the instance group this backend belongs to (if applicable). + string instance_group_uri = 4; + + // URI of the network endpoint group this backend belongs to (if applicable). + string network_endpoint_group_uri = 5; + + // URI of the backend bucket this backend targets (if applicable). + string backend_bucket_uri = 8; + + // URI of the PSC service attachment this PSC NEG backend targets (if + // applicable). + string psc_service_attachment_uri = 9; + + // PSC Google API target this PSC NEG backend targets (if applicable). + string psc_google_api_target = 10; + + // URI of the health check attached to this backend (if applicable). + string health_check_uri = 6; + + // Output only. Health check firewalls configuration state for the backend. + // This is a result of the static firewall analysis (verifying that health + // check traffic from required IP ranges to the backend is allowed or not). + // The backend might still be unhealthy even if these firewalls are + // configured. Please refer to the documentation for more information: + // https://cloud.google.com/load-balancing/docs/firewall-rules + HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Type of a load balancer. For more information, see [Summary of Google Cloud +// load +// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). +enum LoadBalancerType { + // Forwarding rule points to a different target than a load balancer or a + // load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1; + + // Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2; + + // Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3; + + // Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4; + + // External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5; + + // External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6; + + // Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + + // External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8; + + // Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9; + + // Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10; +} + +// For display only. Metadata associated with Storage Bucket. +message StorageBucketInfo { + // Cloud Storage Bucket name. + string bucket = 1; +} + +// For display only. Metadata associated with the serverless network endpoint +// group backend. +message ServerlessNegInfo { + // URI of the serverless network endpoint group. + string neg_uri = 1; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto new file mode 100644 index 00000000000..bb6d06d3af6 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto @@ -0,0 +1,228 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/reachability.proto"; +import "google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "VpcFlowLogsProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// The VPC Flow Logs service in the Google Cloud Network Management API provides +// configurations that generate Flow Logs. The service and the configuration +// resources created using this service are global. +service VpcFlowLogsService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all `VpcFlowLogsConfigs` in a given project. + rpc ListVpcFlowLogsConfigs(ListVpcFlowLogsConfigsRequest) + returns (ListVpcFlowLogsConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific `VpcFlowLogsConfig`. + rpc GetVpcFlowLogsConfig(GetVpcFlowLogsConfigRequest) + returns (VpcFlowLogsConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new `VpcFlowLogsConfig`. + // If a configuration with the exact same settings already exists (even if the + // ID is different), the creation fails. + // Notes: + // 1. Creating a configuration with state=DISABLED will fail. + // 2. The following fields are not considrered as `settings` for the purpose + // of the check mentioned above, therefore - creating another configuration + // with the same fields but different values for the following fields will + // fail as well: + // - name + // - create_time + // - update_time + // - labels + // - description + rpc CreateVpcFlowLogsConfig(CreateVpcFlowLogsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" + body: "vpc_flow_logs_config" + }; + option (google.api.method_signature) = + "parent,vpc_flow_logs_config,vpc_flow_logs_config_id"; + option (google.longrunning.operation_info) = { + response_type: "VpcFlowLogsConfig" + metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }; + } + + // Updates an existing `VpcFlowLogsConfig`. + // If a configuration with the exact same settings already exists (even if the + // ID is different), the creation fails. + // Notes: + // 1. The following fields are not considrered as `settings` for the purpose + // of the check mentioned above, therefore - updating another configuration + // with the same fields but different values for the following fields will + // fail as well: + // - name + // - create_time + // - update_time + // - labels + // - description + rpc UpdateVpcFlowLogsConfig(UpdateVpcFlowLogsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + body: "vpc_flow_logs_config" + }; + option (google.api.method_signature) = "vpc_flow_logs_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "VpcFlowLogsConfig" + metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }; + } + + // Deletes a specific `VpcFlowLogsConfig`. + rpc DeleteVpcFlowLogsConfig(DeleteVpcFlowLogsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }; + } +} + +// Request for the `ListVpcFlowLogsConfigs` method. +message ListVpcFlowLogsConfigsRequest { + // Required. The parent resource of the VpcFlowLogsConfig: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; + + // Optional. Number of `VpcFlowLogsConfigs` to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token from an earlier query, as returned in + // `next_page_token`. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + // A filter expression must use the supported [CEL logic operators] + // (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the `ListVpcFlowLogsConfigs` method. +message ListVpcFlowLogsConfigsResponse { + // List of VPC Flow Log configurations. + repeated VpcFlowLogsConfig vpc_flow_logs_configs = 1; + + // Page token to fetch the next set of configurations. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetVpcFlowLogsConfig` method. +message GetVpcFlowLogsConfigRequest { + // Required. `VpcFlowLogsConfig` resource name using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; +} + +// Request for the `CreateVpcFlowLogsConfig` method. +message CreateVpcFlowLogsConfigRequest { + // Required. The parent resource of the VPC Flow Logs configuration to create: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; + + // Required. ID of the `VpcFlowLogsConfig`. + string vpc_flow_logs_config_id = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; + + // Required. A `VpcFlowLogsConfig` resource + VpcFlowLogsConfig vpc_flow_logs_config = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateVpcFlowLogsConfig` method. +message UpdateVpcFlowLogsConfigRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + VpcFlowLogsConfig vpc_flow_logs_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteVpcFlowLogsConfig` method. +message DeleteVpcFlowLogsConfigRequest { + // Required. `VpcFlowLogsConfig` resource name using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto new file mode 100644 index 00000000000..03137065ab0 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto @@ -0,0 +1,152 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "VpcFlowLogsConfigProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// A configuration to generate VPC Flow Logs. +message VpcFlowLogsConfig { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + pattern: "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}" + plural: "vpcFlowLogsConfigs" + singular: "vpcFlowLogsConfig" + }; + + // Determines whether this configuration will be generating logs. + // Setting state=DISABLED will pause the log generation for this config. + enum State { + // If not specified, will default to ENABLED. + STATE_UNSPECIFIED = 0; + + // When ENABLED, this configuration will generate logs. + ENABLED = 1; + + // When DISABLED, this configuration will not generate logs. + DISABLED = 2; + } + + // Toggles the aggregation interval for collecting flow logs by 5-tuple. + enum AggregationInterval { + // If not specified, will default to INTERVAL_5_SEC. + AGGREGATION_INTERVAL_UNSPECIFIED = 0; + + // Aggregate logs in 5s intervals. + INTERVAL_5_SEC = 1; + + // Aggregate logs in 30s intervals. + INTERVAL_30_SEC = 2; + + // Aggregate logs in 1m intervals. + INTERVAL_1_MIN = 3; + + // Aggregate logs in 5m intervals. + INTERVAL_5_MIN = 4; + + // Aggregate logs in 10m intervals. + INTERVAL_10_MIN = 5; + + // Aggregate logs in 15m intervals. + INTERVAL_15_MIN = 6; + } + + // Configures which log fields would be included. + enum Metadata { + // If not specified, will default to INCLUDE_ALL_METADATA. + METADATA_UNSPECIFIED = 0; + + // Include all metadata fields. + INCLUDE_ALL_METADATA = 1; + + // Exclude all metadata fields. + EXCLUDE_ALL_METADATA = 2; + + // Include only custom fields (specified in metadata_fields). + CUSTOM_METADATA = 3; + } + + // Identifier. Unique name of the configuration using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The user-supplied description of the VPC Flow Logs configuration. + // Maximum of 512 characters. + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The state of the VPC Flow Log configuration. Default value is + // ENABLED. When creating a new configuration, it must be enabled. + optional State state = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The aggregation interval for the logs. Default value is + // INTERVAL_5_SEC. + optional AggregationInterval aggregation_interval = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of the field must be in (0, 1]. The sampling rate of + // VPC Flow Logs where 1.0 means all collected logs are reported. Setting the + // sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, + // use the state field instead. Default value is 1.0. + optional float flow_sampling = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures whether all, none or a subset of metadata fields + // should be added to the reported VPC flow logs. Default value is + // INCLUDE_ALL_METADATA. + optional Metadata metadata = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom metadata fields to include in the reported VPC flow logs. + // Can only be specified if "metadata" was set to CUSTOM_METADATA. + repeated string metadata_fields = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Export filter used to define which VPC Flow Logs should be + // logged. + optional string filter_expr = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Reference to the resource of the config scope. That is, the scope from + // which traffic is logged. The target resource must belong to the same + // project as the configuration. + oneof target_resource { + // Traffic will be logged from the Interconnect Attachment. + // Format: + // projects/{project_id}/regions/{region}/interconnectAttachments/{name} + string interconnect_attachment = 102; + + // Traffic will be logged from the VPN Tunnel. + // Format: projects/{project_id}/regions/{region}/vpnTunnels/{name} + string vpn_tunnel = 103; + } + + // Optional. Resource labels to represent user-provided metadata. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time the config was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the config was updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts new file mode 100644 index 00000000000..e4ee0905dff --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts @@ -0,0 +1,15637 @@ +// 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 networkmanagement. */ + namespace networkmanagement { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Properties of a ConnectivityTest. */ + interface IConnectivityTest { + + /** ConnectivityTest name */ + name?: (string|null); + + /** ConnectivityTest description */ + description?: (string|null); + + /** ConnectivityTest source */ + source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest destination */ + destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest protocol */ + protocol?: (string|null); + + /** ConnectivityTest relatedProjects */ + relatedProjects?: (string[]|null); + + /** ConnectivityTest displayName */ + displayName?: (string|null); + + /** ConnectivityTest labels */ + labels?: ({ [k: string]: string }|null); + + /** ConnectivityTest createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails */ + reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails */ + probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks */ + bypassFirewallChecks?: (boolean|null); + } + + /** Represents a ConnectivityTest. */ + class ConnectivityTest implements IConnectivityTest { + + /** + * Constructs a new ConnectivityTest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest); + + /** ConnectivityTest name. */ + public name: string; + + /** ConnectivityTest description. */ + public description: string; + + /** ConnectivityTest source. */ + public source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest destination. */ + public destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest protocol. */ + public protocol: string; + + /** ConnectivityTest relatedProjects. */ + public relatedProjects: string[]; + + /** ConnectivityTest displayName. */ + public displayName: string; + + /** ConnectivityTest labels. */ + public labels: { [k: string]: string }; + + /** ConnectivityTest createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails. */ + public reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails. */ + public probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks. */ + public bypassFirewallChecks: boolean; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectivityTest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Verifies a ConnectivityTest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectivityTest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @param message ConnectivityTest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectivityTest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectivityTest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Endpoint. */ + interface IEndpoint { + + /** Endpoint ipAddress */ + ipAddress?: (string|null); + + /** Endpoint port */ + port?: (number|null); + + /** Endpoint instance */ + instance?: (string|null); + + /** Endpoint forwardingRule */ + forwardingRule?: (string|null); + + /** Endpoint forwardingRuleTarget */ + forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId */ + loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster */ + gkeMasterCluster?: (string|null); + + /** Endpoint fqdn */ + fqdn?: (string|null); + + /** Endpoint cloudSqlInstance */ + cloudSqlInstance?: (string|null); + + /** Endpoint redisInstance */ + redisInstance?: (string|null); + + /** Endpoint redisCluster */ + redisCluster?: (string|null); + + /** Endpoint cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network */ + network?: (string|null); + + /** Endpoint networkType */ + networkType?: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null); + + /** Endpoint projectId */ + projectId?: (string|null); + } + + /** Represents an Endpoint. */ + class Endpoint implements IEndpoint { + + /** + * Constructs a new Endpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint); + + /** Endpoint ipAddress. */ + public ipAddress: string; + + /** Endpoint port. */ + public port: number; + + /** Endpoint instance. */ + public instance: string; + + /** Endpoint forwardingRule. */ + public forwardingRule: string; + + /** Endpoint forwardingRuleTarget. */ + public forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId. */ + public loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType. */ + public loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster. */ + public gkeMasterCluster: string; + + /** Endpoint fqdn. */ + public fqdn: string; + + /** Endpoint cloudSqlInstance. */ + public cloudSqlInstance: string; + + /** Endpoint redisInstance. */ + public redisInstance: string; + + /** Endpoint redisCluster. */ + public redisCluster: string; + + /** Endpoint cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network. */ + public network: string; + + /** Endpoint networkType. */ + public networkType: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType); + + /** Endpoint projectId. */ + public projectId: string; + + /** Endpoint _forwardingRuleTarget. */ + public _forwardingRuleTarget?: "forwardingRuleTarget"; + + /** Endpoint _loadBalancerId. */ + public _loadBalancerId?: "loadBalancerId"; + + /** Endpoint _loadBalancerType. */ + public _loadBalancerType?: "loadBalancerType"; + + /** + * Creates a new Endpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns Endpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Verifies an Endpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Endpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @param message Endpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Endpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Endpoint { + + /** NetworkType enum. */ + enum NetworkType { + NETWORK_TYPE_UNSPECIFIED = 0, + GCP_NETWORK = 1, + NON_GCP_NETWORK = 2 + } + + /** ForwardingRuleTarget enum. */ + enum ForwardingRuleTarget { + FORWARDING_RULE_TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + LOAD_BALANCER = 2, + VPN_GATEWAY = 3, + PSC = 4 + } + + /** Properties of a CloudFunctionEndpoint. */ + interface ICloudFunctionEndpoint { + + /** CloudFunctionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudFunctionEndpoint. */ + class CloudFunctionEndpoint implements ICloudFunctionEndpoint { + + /** + * Constructs a new CloudFunctionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint); + + /** CloudFunctionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Verifies a CloudFunctionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @param message CloudFunctionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionEndpoint. */ + interface IAppEngineVersionEndpoint { + + /** AppEngineVersionEndpoint uri */ + uri?: (string|null); + } + + /** Represents an AppEngineVersionEndpoint. */ + class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { + + /** + * Constructs a new AppEngineVersionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint); + + /** AppEngineVersionEndpoint uri. */ + public uri: string; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @param message AppEngineVersionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionEndpoint. */ + interface ICloudRunRevisionEndpoint { + + /** CloudRunRevisionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudRunRevisionEndpoint. */ + class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint); + + /** CloudRunRevisionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @param message CloudRunRevisionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReachabilityDetails. */ + interface IReachabilityDetails { + + /** ReachabilityDetails result */ + result?: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null); + + /** ReachabilityDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error */ + error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces */ + traces?: (google.cloud.networkmanagement.v1beta1.ITrace[]|null); + } + + /** Represents a ReachabilityDetails. */ + class ReachabilityDetails implements IReachabilityDetails { + + /** + * Constructs a new ReachabilityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails); + + /** ReachabilityDetails result. */ + public result: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result); + + /** ReachabilityDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces. */ + public traces: google.cloud.networkmanagement.v1beta1.ITrace[]; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ReachabilityDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Verifies a ReachabilityDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReachabilityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @param message ReachabilityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReachabilityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReachabilityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReachabilityDetails { + + /** Result enum. */ + enum Result { + RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + AMBIGUOUS = 4, + UNDETERMINED = 5 + } + } + + /** Properties of a LatencyPercentile. */ + interface ILatencyPercentile { + + /** LatencyPercentile percent */ + percent?: (number|null); + + /** LatencyPercentile latencyMicros */ + latencyMicros?: (number|Long|string|null); + } + + /** Represents a LatencyPercentile. */ + class LatencyPercentile implements ILatencyPercentile { + + /** + * Constructs a new LatencyPercentile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile); + + /** LatencyPercentile percent. */ + public percent: number; + + /** LatencyPercentile latencyMicros. */ + public latencyMicros: (number|Long|string); + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyPercentile instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Verifies a LatencyPercentile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyPercentile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @param message LatencyPercentile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyPercentile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyPercentile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LatencyDistribution. */ + interface ILatencyDistribution { + + /** LatencyDistribution latencyPercentiles */ + latencyPercentiles?: (google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]|null); + } + + /** Represents a LatencyDistribution. */ + class LatencyDistribution implements ILatencyDistribution { + + /** + * Constructs a new LatencyDistribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution); + + /** LatencyDistribution latencyPercentiles. */ + public latencyPercentiles: google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyDistribution instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Verifies a LatencyDistribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyDistribution + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @param message LatencyDistribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyDistribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyDistribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProbingDetails. */ + interface IProbingDetails { + + /** ProbingDetails result */ + result?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null); + + /** ProbingDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error */ + error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause */ + abortCause?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null); + + /** ProbingDetails sentProbeCount */ + sentProbeCount?: (number|null); + + /** ProbingDetails successfulProbeCount */ + successfulProbeCount?: (number|null); + + /** ProbingDetails endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** ProbingDetails probingLatency */ + probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation */ + destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); + } + + /** Represents a ProbingDetails. */ + class ProbingDetails implements IProbingDetails { + + /** + * Constructs a new ProbingDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails); + + /** ProbingDetails result. */ + public result: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult); + + /** ProbingDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause. */ + public abortCause: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause); + + /** ProbingDetails sentProbeCount. */ + public sentProbeCount: number; + + /** ProbingDetails successfulProbeCount. */ + public successfulProbeCount: number; + + /** ProbingDetails endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** ProbingDetails probingLatency. */ + public probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation. */ + public destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ProbingDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Verifies a ProbingDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProbingDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @param message ProbingDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProbingDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProbingDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProbingDetails { + + /** ProbingResult enum. */ + enum ProbingResult { + PROBING_RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + REACHABILITY_INCONSISTENT = 3, + UNDETERMINED = 4 + } + + /** ProbingAbortCause enum. */ + enum ProbingAbortCause { + PROBING_ABORT_CAUSE_UNSPECIFIED = 0, + PERMISSION_DENIED = 1, + NO_SOURCE_LOCATION = 2 + } + + /** Properties of an EdgeLocation. */ + interface IEdgeLocation { + + /** EdgeLocation metropolitanArea */ + metropolitanArea?: (string|null); + } + + /** Represents an EdgeLocation. */ + class EdgeLocation implements IEdgeLocation { + + /** + * Constructs a new EdgeLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation); + + /** EdgeLocation metropolitanArea. */ + public metropolitanArea: string; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns EdgeLocation instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Verifies an EdgeLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EdgeLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @param message EdgeLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EdgeLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EdgeLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Trace. */ + interface ITrace { + + /** Trace endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Trace steps */ + steps?: (google.cloud.networkmanagement.v1beta1.IStep[]|null); + + /** Trace forwardTraceId */ + forwardTraceId?: (number|null); + } + + /** Represents a Trace. */ + class Trace implements ITrace { + + /** + * Constructs a new Trace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ITrace); + + /** Trace endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Trace steps. */ + public steps: google.cloud.networkmanagement.v1beta1.IStep[]; + + /** Trace forwardTraceId. */ + public forwardTraceId: number; + + /** + * Creates a new Trace instance using the specified properties. + * @param [properties] Properties to set + * @returns Trace instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ITrace): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Verifies a Trace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @param message Trace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Step. */ + interface IStep { + + /** Step description */ + description?: (string|null); + + /** Step state */ + state?: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State|null); + + /** Step causesDrop */ + causesDrop?: (boolean|null); + + /** Step projectId */ + projectId?: (string|null); + + /** Step instance */ + instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); + + /** Step firewall */ + firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); + + /** Step route */ + route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); + + /** Step endpoint */ + endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Step googleService */ + googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); + + /** Step forwardingRule */ + forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); + + /** Step vpnGateway */ + vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); + + /** Step vpnTunnel */ + vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); + + /** Step vpcConnector */ + vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); + + /** Step deliver */ + deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); + + /** Step forward */ + forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); + + /** Step abort */ + abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); + + /** Step drop */ + drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); + + /** Step loadBalancer */ + loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); + + /** Step network */ + network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); + + /** Step gkeMaster */ + gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance */ + cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance */ + redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); + + /** Step redisCluster */ + redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); + + /** Step cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); + + /** Step appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); + + /** Step nat */ + nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); + + /** Step proxyConnection */ + proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo */ + loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket */ + storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); + + /** Step serverlessNeg */ + serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); + } + + /** Represents a Step. */ + class Step implements IStep { + + /** + * Constructs a new Step. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IStep); + + /** Step description. */ + public description: string; + + /** Step state. */ + public state: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State); + + /** Step causesDrop. */ + public causesDrop: boolean; + + /** Step projectId. */ + public projectId: string; + + /** Step instance. */ + public instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); + + /** Step firewall. */ + public firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); + + /** Step route. */ + public route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); + + /** Step endpoint. */ + public endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Step googleService. */ + public googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); + + /** Step forwardingRule. */ + public forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); + + /** Step vpnGateway. */ + public vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); + + /** Step vpnTunnel. */ + public vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); + + /** Step vpcConnector. */ + public vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); + + /** Step deliver. */ + public deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); + + /** Step forward. */ + public forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); + + /** Step abort. */ + public abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); + + /** Step drop. */ + public drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); + + /** Step loadBalancer. */ + public loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); + + /** Step network. */ + public network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); + + /** Step gkeMaster. */ + public gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance. */ + public cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance. */ + public redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); + + /** Step redisCluster. */ + public redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); + + /** Step cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); + + /** Step appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); + + /** Step nat. */ + public nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); + + /** Step proxyConnection. */ + public proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo. */ + public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket. */ + public storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); + + /** Step serverlessNeg. */ + public serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); + + /** Step stepInfo. */ + public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); + + /** + * Creates a new Step instance using the specified properties. + * @param [properties] Properties to set + * @returns Step instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IStep): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Step message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Verifies a Step message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Step + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @param message Step + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Step to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Step + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Step { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + START_FROM_INSTANCE = 1, + START_FROM_INTERNET = 2, + START_FROM_GOOGLE_SERVICE = 27, + START_FROM_PRIVATE_NETWORK = 3, + START_FROM_GKE_MASTER = 21, + START_FROM_CLOUD_SQL_INSTANCE = 22, + START_FROM_REDIS_INSTANCE = 32, + START_FROM_REDIS_CLUSTER = 33, + START_FROM_CLOUD_FUNCTION = 23, + START_FROM_APP_ENGINE_VERSION = 25, + START_FROM_CLOUD_RUN_REVISION = 26, + START_FROM_STORAGE_BUCKET = 29, + START_FROM_PSC_PUBLISHED_SERVICE = 30, + START_FROM_SERVERLESS_NEG = 31, + APPLY_INGRESS_FIREWALL_RULE = 4, + APPLY_EGRESS_FIREWALL_RULE = 5, + APPLY_ROUTE = 6, + APPLY_FORWARDING_RULE = 7, + ANALYZE_LOAD_BALANCER_BACKEND = 28, + SPOOFING_APPROVED = 8, + ARRIVE_AT_INSTANCE = 9, + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, + ARRIVE_AT_VPN_GATEWAY = 12, + ARRIVE_AT_VPN_TUNNEL = 13, + ARRIVE_AT_VPC_CONNECTOR = 24, + NAT = 14, + PROXY_CONNECTION = 15, + DELIVER = 16, + DROP = 17, + FORWARD = 18, + ABORT = 19, + VIEWER_PERMISSION_MISSING = 20 + } + } + + /** Properties of an InstanceInfo. */ + interface IInstanceInfo { + + /** InstanceInfo displayName */ + displayName?: (string|null); + + /** InstanceInfo uri */ + uri?: (string|null); + + /** InstanceInfo interface */ + "interface"?: (string|null); + + /** InstanceInfo networkUri */ + networkUri?: (string|null); + + /** InstanceInfo internalIp */ + internalIp?: (string|null); + + /** InstanceInfo externalIp */ + externalIp?: (string|null); + + /** InstanceInfo networkTags */ + networkTags?: (string[]|null); + + /** InstanceInfo serviceAccount */ + serviceAccount?: (string|null); + + /** InstanceInfo pscNetworkAttachmentUri */ + pscNetworkAttachmentUri?: (string|null); + } + + /** Represents an InstanceInfo. */ + class InstanceInfo implements IInstanceInfo { + + /** + * Constructs a new InstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo); + + /** InstanceInfo displayName. */ + public displayName: string; + + /** InstanceInfo uri. */ + public uri: string; + + /** InstanceInfo interface. */ + public interface: string; + + /** InstanceInfo networkUri. */ + public networkUri: string; + + /** InstanceInfo internalIp. */ + public internalIp: string; + + /** InstanceInfo externalIp. */ + public externalIp: string; + + /** InstanceInfo networkTags. */ + public networkTags: string[]; + + /** InstanceInfo serviceAccount. */ + public serviceAccount: string; + + /** InstanceInfo pscNetworkAttachmentUri. */ + public pscNetworkAttachmentUri: string; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Verifies an InstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @param message InstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInfo. */ + interface INetworkInfo { + + /** NetworkInfo displayName */ + displayName?: (string|null); + + /** NetworkInfo uri */ + uri?: (string|null); + + /** NetworkInfo matchedSubnetUri */ + matchedSubnetUri?: (string|null); + + /** NetworkInfo matchedIpRange */ + matchedIpRange?: (string|null); + + /** NetworkInfo region */ + region?: (string|null); + } + + /** Represents a NetworkInfo. */ + class NetworkInfo implements INetworkInfo { + + /** + * Constructs a new NetworkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo); + + /** NetworkInfo displayName. */ + public displayName: string; + + /** NetworkInfo uri. */ + public uri: string; + + /** NetworkInfo matchedSubnetUri. */ + public matchedSubnetUri: string; + + /** NetworkInfo matchedIpRange. */ + public matchedIpRange: string; + + /** NetworkInfo region. */ + public region: string; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Verifies a NetworkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @param message NetworkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FirewallInfo. */ + interface IFirewallInfo { + + /** FirewallInfo displayName */ + displayName?: (string|null); + + /** FirewallInfo uri */ + uri?: (string|null); + + /** FirewallInfo direction */ + direction?: (string|null); + + /** FirewallInfo action */ + action?: (string|null); + + /** FirewallInfo priority */ + priority?: (number|null); + + /** FirewallInfo networkUri */ + networkUri?: (string|null); + + /** FirewallInfo targetTags */ + targetTags?: (string[]|null); + + /** FirewallInfo targetServiceAccounts */ + targetServiceAccounts?: (string[]|null); + + /** FirewallInfo policy */ + policy?: (string|null); + + /** FirewallInfo policyUri */ + policyUri?: (string|null); + + /** FirewallInfo firewallRuleType */ + firewallRuleType?: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null); + } + + /** Represents a FirewallInfo. */ + class FirewallInfo implements IFirewallInfo { + + /** + * Constructs a new FirewallInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo); + + /** FirewallInfo displayName. */ + public displayName: string; + + /** FirewallInfo uri. */ + public uri: string; + + /** FirewallInfo direction. */ + public direction: string; + + /** FirewallInfo action. */ + public action: string; + + /** FirewallInfo priority. */ + public priority: number; + + /** FirewallInfo networkUri. */ + public networkUri: string; + + /** FirewallInfo targetTags. */ + public targetTags: string[]; + + /** FirewallInfo targetServiceAccounts. */ + public targetServiceAccounts: string[]; + + /** FirewallInfo policy. */ + public policy: string; + + /** FirewallInfo policyUri. */ + public policyUri: string; + + /** FirewallInfo firewallRuleType. */ + public firewallRuleType: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType); + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FirewallInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Verifies a FirewallInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirewallInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @param message FirewallInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirewallInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirewallInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FirewallInfo { + + /** FirewallRuleType enum. */ + enum FirewallRuleType { + FIREWALL_RULE_TYPE_UNSPECIFIED = 0, + HIERARCHICAL_FIREWALL_POLICY_RULE = 1, + VPC_FIREWALL_RULE = 2, + IMPLIED_VPC_FIREWALL_RULE = 3, + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, + NETWORK_FIREWALL_POLICY_RULE = 5, + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, + UNSUPPORTED_FIREWALL_POLICY_RULE = 100, + TRACKING_STATE = 101 + } + } + + /** Properties of a RouteInfo. */ + interface IRouteInfo { + + /** RouteInfo routeType */ + routeType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null); + + /** RouteInfo nextHopType */ + nextHopType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null); + + /** RouteInfo routeScope */ + routeScope?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null); + + /** RouteInfo displayName */ + displayName?: (string|null); + + /** RouteInfo uri */ + uri?: (string|null); + + /** RouteInfo region */ + region?: (string|null); + + /** RouteInfo destIpRange */ + destIpRange?: (string|null); + + /** RouteInfo nextHop */ + nextHop?: (string|null); + + /** RouteInfo networkUri */ + networkUri?: (string|null); + + /** RouteInfo priority */ + priority?: (number|null); + + /** RouteInfo instanceTags */ + instanceTags?: (string[]|null); + + /** RouteInfo srcIpRange */ + srcIpRange?: (string|null); + + /** RouteInfo destPortRanges */ + destPortRanges?: (string[]|null); + + /** RouteInfo srcPortRanges */ + srcPortRanges?: (string[]|null); + + /** RouteInfo protocols */ + protocols?: (string[]|null); + + /** RouteInfo nccHubUri */ + nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri */ + nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri */ + advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri */ + advertisedRouteNextHopUri?: (string|null); + } + + /** Represents a RouteInfo. */ + class RouteInfo implements IRouteInfo { + + /** + * Constructs a new RouteInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo); + + /** RouteInfo routeType. */ + public routeType: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType); + + /** RouteInfo nextHopType. */ + public nextHopType: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType); + + /** RouteInfo routeScope. */ + public routeScope: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope); + + /** RouteInfo displayName. */ + public displayName: string; + + /** RouteInfo uri. */ + public uri: string; + + /** RouteInfo region. */ + public region: string; + + /** RouteInfo destIpRange. */ + public destIpRange: string; + + /** RouteInfo nextHop. */ + public nextHop: string; + + /** RouteInfo networkUri. */ + public networkUri: string; + + /** RouteInfo priority. */ + public priority: number; + + /** RouteInfo instanceTags. */ + public instanceTags: string[]; + + /** RouteInfo srcIpRange. */ + public srcIpRange: string; + + /** RouteInfo destPortRanges. */ + public destPortRanges: string[]; + + /** RouteInfo srcPortRanges. */ + public srcPortRanges: string[]; + + /** RouteInfo protocols. */ + public protocols: string[]; + + /** RouteInfo nccHubUri. */ + public nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri. */ + public nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri. */ + public advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri. */ + public advertisedRouteNextHopUri?: (string|null); + + /** RouteInfo _nccHubUri. */ + public _nccHubUri?: "nccHubUri"; + + /** RouteInfo _nccSpokeUri. */ + public _nccSpokeUri?: "nccSpokeUri"; + + /** RouteInfo _advertisedRouteSourceRouterUri. */ + public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; + + /** RouteInfo _advertisedRouteNextHopUri. */ + public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; + + /** + * Creates a new RouteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RouteInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Verifies a RouteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RouteInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @param message RouteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RouteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RouteInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RouteInfo { + + /** RouteType enum. */ + enum RouteType { + ROUTE_TYPE_UNSPECIFIED = 0, + SUBNET = 1, + STATIC = 2, + DYNAMIC = 3, + PEERING_SUBNET = 4, + PEERING_STATIC = 5, + PEERING_DYNAMIC = 6, + POLICY_BASED = 7, + ADVERTISED = 101 + } + + /** NextHopType enum. */ + enum NextHopType { + NEXT_HOP_TYPE_UNSPECIFIED = 0, + NEXT_HOP_IP = 1, + NEXT_HOP_INSTANCE = 2, + NEXT_HOP_NETWORK = 3, + NEXT_HOP_PEERING = 4, + NEXT_HOP_INTERCONNECT = 5, + NEXT_HOP_VPN_TUNNEL = 6, + NEXT_HOP_VPN_GATEWAY = 7, + NEXT_HOP_INTERNET_GATEWAY = 8, + NEXT_HOP_BLACKHOLE = 9, + NEXT_HOP_ILB = 10, + NEXT_HOP_ROUTER_APPLIANCE = 11, + NEXT_HOP_NCC_HUB = 12 + } + + /** RouteScope enum. */ + enum RouteScope { + ROUTE_SCOPE_UNSPECIFIED = 0, + NETWORK = 1, + NCC_HUB = 2 + } + } + + /** Properties of a GoogleServiceInfo. */ + interface IGoogleServiceInfo { + + /** GoogleServiceInfo sourceIp */ + sourceIp?: (string|null); + + /** GoogleServiceInfo googleServiceType */ + googleServiceType?: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null); + } + + /** Represents a GoogleServiceInfo. */ + class GoogleServiceInfo implements IGoogleServiceInfo { + + /** + * Constructs a new GoogleServiceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo); + + /** GoogleServiceInfo sourceIp. */ + public sourceIp: string; + + /** GoogleServiceInfo googleServiceType. */ + public googleServiceType: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType); + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleServiceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Verifies a GoogleServiceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleServiceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @param message GoogleServiceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleServiceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GoogleServiceInfo { + + /** GoogleServiceType enum. */ + enum GoogleServiceType { + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, + IAP = 1, + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, + CLOUD_DNS = 3, + GOOGLE_API = 4, + GOOGLE_API_PSC = 5, + GOOGLE_API_VPC_SC = 6 + } + } + + /** Properties of a ForwardingRuleInfo. */ + interface IForwardingRuleInfo { + + /** ForwardingRuleInfo displayName */ + displayName?: (string|null); + + /** ForwardingRuleInfo uri */ + uri?: (string|null); + + /** ForwardingRuleInfo matchedProtocol */ + matchedProtocol?: (string|null); + + /** ForwardingRuleInfo matchedPortRange */ + matchedPortRange?: (string|null); + + /** ForwardingRuleInfo vip */ + vip?: (string|null); + + /** ForwardingRuleInfo target */ + target?: (string|null); + + /** ForwardingRuleInfo networkUri */ + networkUri?: (string|null); + + /** ForwardingRuleInfo region */ + region?: (string|null); + + /** ForwardingRuleInfo loadBalancerName */ + loadBalancerName?: (string|null); + + /** ForwardingRuleInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** ForwardingRuleInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a ForwardingRuleInfo. */ + class ForwardingRuleInfo implements IForwardingRuleInfo { + + /** + * Constructs a new ForwardingRuleInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo); + + /** ForwardingRuleInfo displayName. */ + public displayName: string; + + /** ForwardingRuleInfo uri. */ + public uri: string; + + /** ForwardingRuleInfo matchedProtocol. */ + public matchedProtocol: string; + + /** ForwardingRuleInfo matchedPortRange. */ + public matchedPortRange: string; + + /** ForwardingRuleInfo vip. */ + public vip: string; + + /** ForwardingRuleInfo target. */ + public target: string; + + /** ForwardingRuleInfo networkUri. */ + public networkUri: string; + + /** ForwardingRuleInfo region. */ + public region: string; + + /** ForwardingRuleInfo loadBalancerName. */ + public loadBalancerName: string; + + /** ForwardingRuleInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** ForwardingRuleInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardingRuleInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Verifies a ForwardingRuleInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardingRuleInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @param message ForwardingRuleInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerInfo. */ + interface ILoadBalancerInfo { + + /** LoadBalancerInfo loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null); + + /** LoadBalancerInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerInfo backends */ + backends?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]|null); + + /** LoadBalancerInfo backendType */ + backendType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null); + + /** LoadBalancerInfo backendUri */ + backendUri?: (string|null); + } + + /** Represents a LoadBalancerInfo. */ + class LoadBalancerInfo implements ILoadBalancerInfo { + + /** + * Constructs a new LoadBalancerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo); + + /** LoadBalancerInfo loadBalancerType. */ + public loadBalancerType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType); + + /** LoadBalancerInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerInfo backends. */ + public backends: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]; + + /** LoadBalancerInfo backendType. */ + public backendType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType); + + /** LoadBalancerInfo backendUri. */ + public backendUri: string; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Verifies a LoadBalancerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @param message LoadBalancerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerInfo { + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + INTERNAL_TCP_UDP = 1, + NETWORK_TCP_UDP = 2, + HTTP_PROXY = 3, + TCP_PROXY = 4, + SSL_PROXY = 5 + } + + /** BackendType enum. */ + enum BackendType { + BACKEND_TYPE_UNSPECIFIED = 0, + BACKEND_SERVICE = 1, + TARGET_POOL = 2, + TARGET_INSTANCE = 3 + } + } + + /** Properties of a LoadBalancerBackend. */ + interface ILoadBalancerBackend { + + /** LoadBalancerBackend displayName */ + displayName?: (string|null); + + /** LoadBalancerBackend uri */ + uri?: (string|null); + + /** LoadBalancerBackend healthCheckFirewallState */ + healthCheckFirewallState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules */ + healthCheckAllowingFirewallRules?: (string[]|null); + + /** LoadBalancerBackend healthCheckBlockingFirewallRules */ + healthCheckBlockingFirewallRules?: (string[]|null); + } + + /** Represents a LoadBalancerBackend. */ + class LoadBalancerBackend implements ILoadBalancerBackend { + + /** + * Constructs a new LoadBalancerBackend. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend); + + /** LoadBalancerBackend displayName. */ + public displayName: string; + + /** LoadBalancerBackend uri. */ + public uri: string; + + /** LoadBalancerBackend healthCheckFirewallState. */ + public healthCheckFirewallState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ + public healthCheckAllowingFirewallRules: string[]; + + /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ + public healthCheckBlockingFirewallRules: string[]; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackend instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Verifies a LoadBalancerBackend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackend + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @param message LoadBalancerBackend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackend + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackend { + + /** HealthCheckFirewallState enum. */ + enum HealthCheckFirewallState { + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, + CONFIGURED = 1, + MISCONFIGURED = 2 + } + } + + /** Properties of a VpnGatewayInfo. */ + interface IVpnGatewayInfo { + + /** VpnGatewayInfo displayName */ + displayName?: (string|null); + + /** VpnGatewayInfo uri */ + uri?: (string|null); + + /** VpnGatewayInfo networkUri */ + networkUri?: (string|null); + + /** VpnGatewayInfo ipAddress */ + ipAddress?: (string|null); + + /** VpnGatewayInfo vpnTunnelUri */ + vpnTunnelUri?: (string|null); + + /** VpnGatewayInfo region */ + region?: (string|null); + } + + /** Represents a VpnGatewayInfo. */ + class VpnGatewayInfo implements IVpnGatewayInfo { + + /** + * Constructs a new VpnGatewayInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo); + + /** VpnGatewayInfo displayName. */ + public displayName: string; + + /** VpnGatewayInfo uri. */ + public uri: string; + + /** VpnGatewayInfo networkUri. */ + public networkUri: string; + + /** VpnGatewayInfo ipAddress. */ + public ipAddress: string; + + /** VpnGatewayInfo vpnTunnelUri. */ + public vpnTunnelUri: string; + + /** VpnGatewayInfo region. */ + public region: string; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnGatewayInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Verifies a VpnGatewayInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnGatewayInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @param message VpnGatewayInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnGatewayInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpnTunnelInfo. */ + interface IVpnTunnelInfo { + + /** VpnTunnelInfo displayName */ + displayName?: (string|null); + + /** VpnTunnelInfo uri */ + uri?: (string|null); + + /** VpnTunnelInfo sourceGateway */ + sourceGateway?: (string|null); + + /** VpnTunnelInfo remoteGateway */ + remoteGateway?: (string|null); + + /** VpnTunnelInfo remoteGatewayIp */ + remoteGatewayIp?: (string|null); + + /** VpnTunnelInfo sourceGatewayIp */ + sourceGatewayIp?: (string|null); + + /** VpnTunnelInfo networkUri */ + networkUri?: (string|null); + + /** VpnTunnelInfo region */ + region?: (string|null); + + /** VpnTunnelInfo routingType */ + routingType?: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null); + } + + /** Represents a VpnTunnelInfo. */ + class VpnTunnelInfo implements IVpnTunnelInfo { + + /** + * Constructs a new VpnTunnelInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo); + + /** VpnTunnelInfo displayName. */ + public displayName: string; + + /** VpnTunnelInfo uri. */ + public uri: string; + + /** VpnTunnelInfo sourceGateway. */ + public sourceGateway: string; + + /** VpnTunnelInfo remoteGateway. */ + public remoteGateway: string; + + /** VpnTunnelInfo remoteGatewayIp. */ + public remoteGatewayIp: string; + + /** VpnTunnelInfo sourceGatewayIp. */ + public sourceGatewayIp: string; + + /** VpnTunnelInfo networkUri. */ + public networkUri: string; + + /** VpnTunnelInfo region. */ + public region: string; + + /** VpnTunnelInfo routingType. */ + public routingType: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType); + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnTunnelInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Verifies a VpnTunnelInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnTunnelInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @param message VpnTunnelInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnTunnelInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VpnTunnelInfo { + + /** RoutingType enum. */ + enum RoutingType { + ROUTING_TYPE_UNSPECIFIED = 0, + ROUTE_BASED = 1, + POLICY_BASED = 2, + DYNAMIC = 3 + } + } + + /** Properties of an EndpointInfo. */ + interface IEndpointInfo { + + /** EndpointInfo sourceIp */ + sourceIp?: (string|null); + + /** EndpointInfo destinationIp */ + destinationIp?: (string|null); + + /** EndpointInfo protocol */ + protocol?: (string|null); + + /** EndpointInfo sourcePort */ + sourcePort?: (number|null); + + /** EndpointInfo destinationPort */ + destinationPort?: (number|null); + + /** EndpointInfo sourceNetworkUri */ + sourceNetworkUri?: (string|null); + + /** EndpointInfo destinationNetworkUri */ + destinationNetworkUri?: (string|null); + + /** EndpointInfo sourceAgentUri */ + sourceAgentUri?: (string|null); + } + + /** Represents an EndpointInfo. */ + class EndpointInfo implements IEndpointInfo { + + /** + * Constructs a new EndpointInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo); + + /** EndpointInfo sourceIp. */ + public sourceIp: string; + + /** EndpointInfo destinationIp. */ + public destinationIp: string; + + /** EndpointInfo protocol. */ + public protocol: string; + + /** EndpointInfo sourcePort. */ + public sourcePort: number; + + /** EndpointInfo destinationPort. */ + public destinationPort: number; + + /** EndpointInfo sourceNetworkUri. */ + public sourceNetworkUri: string; + + /** EndpointInfo destinationNetworkUri. */ + public destinationNetworkUri: string; + + /** EndpointInfo sourceAgentUri. */ + public sourceAgentUri: string; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EndpointInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Verifies an EndpointInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndpointInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @param message EndpointInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndpointInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndpointInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeliverInfo. */ + interface IDeliverInfo { + + /** DeliverInfo target */ + target?: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null); + + /** DeliverInfo resourceUri */ + resourceUri?: (string|null); + + /** DeliverInfo ipAddress */ + ipAddress?: (string|null); + + /** DeliverInfo storageBucket */ + storageBucket?: (string|null); + + /** DeliverInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a DeliverInfo. */ + class DeliverInfo implements IDeliverInfo { + + /** + * Constructs a new DeliverInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo); + + /** DeliverInfo target. */ + public target: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target); + + /** DeliverInfo resourceUri. */ + public resourceUri: string; + + /** DeliverInfo ipAddress. */ + public ipAddress: string; + + /** DeliverInfo storageBucket. */ + public storageBucket: string; + + /** DeliverInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DeliverInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Verifies a DeliverInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeliverInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @param message DeliverInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeliverInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeliverInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeliverInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + INTERNET = 2, + GOOGLE_API = 3, + GKE_MASTER = 4, + CLOUD_SQL_INSTANCE = 5, + PSC_PUBLISHED_SERVICE = 6, + PSC_GOOGLE_API = 7, + PSC_VPC_SC = 8, + SERVERLESS_NEG = 9, + STORAGE_BUCKET = 10, + PRIVATE_NETWORK = 11, + CLOUD_FUNCTION = 12, + APP_ENGINE_VERSION = 13, + CLOUD_RUN_REVISION = 14, + GOOGLE_MANAGED_SERVICE = 15, + REDIS_INSTANCE = 16, + REDIS_CLUSTER = 17 + } + } + + /** Properties of a ForwardInfo. */ + interface IForwardInfo { + + /** ForwardInfo target */ + target?: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null); + + /** ForwardInfo resourceUri */ + resourceUri?: (string|null); + + /** ForwardInfo ipAddress */ + ipAddress?: (string|null); + } + + /** Represents a ForwardInfo. */ + class ForwardInfo implements IForwardInfo { + + /** + * Constructs a new ForwardInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo); + + /** ForwardInfo target. */ + public target: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target); + + /** ForwardInfo resourceUri. */ + public resourceUri: string; + + /** ForwardInfo ipAddress. */ + public ipAddress: string; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Verifies a ForwardInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @param message ForwardInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ForwardInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + PEERING_VPC = 1, + VPN_GATEWAY = 2, + INTERCONNECT = 3, + GKE_MASTER = 4, + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, + CLOUD_SQL_INSTANCE = 6, + ANOTHER_PROJECT = 7, + NCC_HUB = 8, + ROUTER_APPLIANCE = 9 + } + } + + /** Properties of an AbortInfo. */ + interface IAbortInfo { + + /** AbortInfo cause */ + cause?: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null); + + /** AbortInfo resourceUri */ + resourceUri?: (string|null); + + /** AbortInfo ipAddress */ + ipAddress?: (string|null); + + /** AbortInfo projectsMissingPermission */ + projectsMissingPermission?: (string[]|null); + } + + /** Represents an AbortInfo. */ + class AbortInfo implements IAbortInfo { + + /** + * Constructs a new AbortInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo); + + /** AbortInfo cause. */ + public cause: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause); + + /** AbortInfo resourceUri. */ + public resourceUri: string; + + /** AbortInfo ipAddress. */ + public ipAddress: string; + + /** AbortInfo projectsMissingPermission. */ + public projectsMissingPermission: string[]; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AbortInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Verifies an AbortInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbortInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @param message AbortInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbortInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbortInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AbortInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_NETWORK = 1, + UNKNOWN_PROJECT = 3, + NO_EXTERNAL_IP = 7, + UNINTENDED_DESTINATION = 8, + SOURCE_ENDPOINT_NOT_FOUND = 11, + MISMATCHED_SOURCE_NETWORK = 12, + DESTINATION_ENDPOINT_NOT_FOUND = 13, + MISMATCHED_DESTINATION_NETWORK = 14, + UNKNOWN_IP = 2, + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, + PERMISSION_DENIED = 4, + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, + NO_SOURCE_LOCATION = 5, + INVALID_ARGUMENT = 6, + TRACE_TOO_LONG = 9, + INTERNAL_ERROR = 10, + UNSUPPORTED = 15, + MISMATCHED_IP_VERSION = 16, + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, + RESOURCE_CONFIG_NOT_FOUND = 18, + VM_INSTANCE_CONFIG_NOT_FOUND = 24, + NETWORK_CONFIG_NOT_FOUND = 25, + FIREWALL_CONFIG_NOT_FOUND = 26, + ROUTE_CONFIG_NOT_FOUND = 27, + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, + NON_ROUTABLE_IP_ADDRESS = 22, + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 + } + } + + /** Properties of a DropInfo. */ + interface IDropInfo { + + /** DropInfo cause */ + cause?: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null); + + /** DropInfo resourceUri */ + resourceUri?: (string|null); + + /** DropInfo sourceIp */ + sourceIp?: (string|null); + + /** DropInfo destinationIp */ + destinationIp?: (string|null); + + /** DropInfo region */ + region?: (string|null); + } + + /** Represents a DropInfo. */ + class DropInfo implements IDropInfo { + + /** + * Constructs a new DropInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo); + + /** DropInfo cause. */ + public cause: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause); + + /** DropInfo resourceUri. */ + public resourceUri: string; + + /** DropInfo sourceIp. */ + public sourceIp: string; + + /** DropInfo destinationIp. */ + public destinationIp: string; + + /** DropInfo region. */ + public region: string; + + /** + * Creates a new DropInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DropInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Verifies a DropInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DropInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @param message DropInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DropInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DropInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DropInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_EXTERNAL_ADDRESS = 1, + FOREIGN_IP_DISALLOWED = 2, + FIREWALL_RULE = 3, + NO_ROUTE = 4, + ROUTE_BLACKHOLE = 5, + ROUTE_WRONG_NETWORK = 6, + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, + PRIVATE_TRAFFIC_TO_INTERNET = 7, + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, + NO_EXTERNAL_ADDRESS = 9, + UNKNOWN_INTERNAL_ADDRESS = 10, + FORWARDING_RULE_MISMATCH = 11, + FORWARDING_RULE_NO_INSTANCES = 12, + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, + INSTANCE_NOT_RUNNING = 14, + GKE_CLUSTER_NOT_RUNNING = 27, + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, + REDIS_INSTANCE_NOT_RUNNING = 68, + REDIS_CLUSTER_NOT_RUNNING = 69, + TRAFFIC_TYPE_BLOCKED = 15, + GKE_MASTER_UNAUTHORIZED_ACCESS = 16, + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, + DROPPED_INSIDE_GKE_SERVICE = 18, + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, + GKE_PSC_ENDPOINT_MISSING = 36, + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, + GKE_CONTROL_PLANE_REGION_MISMATCH = 30, + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, + GKE_CONTROL_PLANE_NO_ROUTE = 32, + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, + CLOUD_SQL_INSTANCE_NO_ROUTE = 35, + CLOUD_SQL_CONNECTOR_REQUIRED = 63, + CLOUD_FUNCTION_NOT_ACTIVE = 22, + VPC_CONNECTOR_NOT_SET = 23, + VPC_CONNECTOR_NOT_RUNNING = 24, + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, + FORWARDING_RULE_REGION_MISMATCH = 25, + PSC_CONNECTION_NOT_ACCEPTED = 26, + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, + PSC_TRANSITIVITY_NOT_PROPAGATED = 64, + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, + CLOUD_RUN_REVISION_NOT_READY = 29, + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, + CLOUD_NAT_NO_ADDRESSES = 40, + ROUTING_LOOP = 59, + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, + REDIS_INSTANCE_UNSUPPORTED_PORT = 71, + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, + REDIS_INSTANCE_NO_EXTERNAL_IP = 74, + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, + REDIS_CLUSTER_UNSUPPORTED_PORT = 76, + REDIS_CLUSTER_NO_EXTERNAL_IP = 77, + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 + } + } + + /** Properties of a GKEMasterInfo. */ + interface IGKEMasterInfo { + + /** GKEMasterInfo clusterUri */ + clusterUri?: (string|null); + + /** GKEMasterInfo clusterNetworkUri */ + clusterNetworkUri?: (string|null); + + /** GKEMasterInfo internalIp */ + internalIp?: (string|null); + + /** GKEMasterInfo externalIp */ + externalIp?: (string|null); + + /** GKEMasterInfo dnsEndpoint */ + dnsEndpoint?: (string|null); + } + + /** Represents a GKEMasterInfo. */ + class GKEMasterInfo implements IGKEMasterInfo { + + /** + * Constructs a new GKEMasterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo); + + /** GKEMasterInfo clusterUri. */ + public clusterUri: string; + + /** GKEMasterInfo clusterNetworkUri. */ + public clusterNetworkUri: string; + + /** GKEMasterInfo internalIp. */ + public internalIp: string; + + /** GKEMasterInfo externalIp. */ + public externalIp: string; + + /** GKEMasterInfo dnsEndpoint. */ + public dnsEndpoint: string; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GKEMasterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Verifies a GKEMasterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GKEMasterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @param message GKEMasterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GKEMasterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GKEMasterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSQLInstanceInfo. */ + interface ICloudSQLInstanceInfo { + + /** CloudSQLInstanceInfo displayName */ + displayName?: (string|null); + + /** CloudSQLInstanceInfo uri */ + uri?: (string|null); + + /** CloudSQLInstanceInfo networkUri */ + networkUri?: (string|null); + + /** CloudSQLInstanceInfo internalIp */ + internalIp?: (string|null); + + /** CloudSQLInstanceInfo externalIp */ + externalIp?: (string|null); + + /** CloudSQLInstanceInfo region */ + region?: (string|null); + } + + /** Represents a CloudSQLInstanceInfo. */ + class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { + + /** + * Constructs a new CloudSQLInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo); + + /** CloudSQLInstanceInfo displayName. */ + public displayName: string; + + /** CloudSQLInstanceInfo uri. */ + public uri: string; + + /** CloudSQLInstanceInfo networkUri. */ + public networkUri: string; + + /** CloudSQLInstanceInfo internalIp. */ + public internalIp: string; + + /** CloudSQLInstanceInfo externalIp. */ + public externalIp: string; + + /** CloudSQLInstanceInfo region. */ + public region: string; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSQLInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSQLInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @param message CloudSQLInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisInstanceInfo. */ + interface IRedisInstanceInfo { + + /** RedisInstanceInfo displayName */ + displayName?: (string|null); + + /** RedisInstanceInfo uri */ + uri?: (string|null); + + /** RedisInstanceInfo networkUri */ + networkUri?: (string|null); + + /** RedisInstanceInfo primaryEndpointIp */ + primaryEndpointIp?: (string|null); + + /** RedisInstanceInfo readEndpointIp */ + readEndpointIp?: (string|null); + + /** RedisInstanceInfo region */ + region?: (string|null); + } + + /** Represents a RedisInstanceInfo. */ + class RedisInstanceInfo implements IRedisInstanceInfo { + + /** + * Constructs a new RedisInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo); + + /** RedisInstanceInfo displayName. */ + public displayName: string; + + /** RedisInstanceInfo uri. */ + public uri: string; + + /** RedisInstanceInfo networkUri. */ + public networkUri: string; + + /** RedisInstanceInfo primaryEndpointIp. */ + public primaryEndpointIp: string; + + /** RedisInstanceInfo readEndpointIp. */ + public readEndpointIp: string; + + /** RedisInstanceInfo region. */ + public region: string; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Verifies a RedisInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @param message RedisInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisClusterInfo. */ + interface IRedisClusterInfo { + + /** RedisClusterInfo displayName */ + displayName?: (string|null); + + /** RedisClusterInfo uri */ + uri?: (string|null); + + /** RedisClusterInfo networkUri */ + networkUri?: (string|null); + + /** RedisClusterInfo discoveryEndpointIpAddress */ + discoveryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo secondaryEndpointIpAddress */ + secondaryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo location */ + location?: (string|null); + } + + /** Represents a RedisClusterInfo. */ + class RedisClusterInfo implements IRedisClusterInfo { + + /** + * Constructs a new RedisClusterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo); + + /** RedisClusterInfo displayName. */ + public displayName: string; + + /** RedisClusterInfo uri. */ + public uri: string; + + /** RedisClusterInfo networkUri. */ + public networkUri: string; + + /** RedisClusterInfo discoveryEndpointIpAddress. */ + public discoveryEndpointIpAddress: string; + + /** RedisClusterInfo secondaryEndpointIpAddress. */ + public secondaryEndpointIpAddress: string; + + /** RedisClusterInfo location. */ + public location: string; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisClusterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Verifies a RedisClusterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisClusterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @param message RedisClusterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisClusterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisClusterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudFunctionInfo. */ + interface ICloudFunctionInfo { + + /** CloudFunctionInfo displayName */ + displayName?: (string|null); + + /** CloudFunctionInfo uri */ + uri?: (string|null); + + /** CloudFunctionInfo location */ + location?: (string|null); + + /** CloudFunctionInfo versionId */ + versionId?: (number|Long|string|null); + } + + /** Represents a CloudFunctionInfo. */ + class CloudFunctionInfo implements ICloudFunctionInfo { + + /** + * Constructs a new CloudFunctionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo); + + /** CloudFunctionInfo displayName. */ + public displayName: string; + + /** CloudFunctionInfo uri. */ + public uri: string; + + /** CloudFunctionInfo location. */ + public location: string; + + /** CloudFunctionInfo versionId. */ + public versionId: (number|Long|string); + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Verifies a CloudFunctionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @param message CloudFunctionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionInfo. */ + interface ICloudRunRevisionInfo { + + /** CloudRunRevisionInfo displayName */ + displayName?: (string|null); + + /** CloudRunRevisionInfo uri */ + uri?: (string|null); + + /** CloudRunRevisionInfo location */ + location?: (string|null); + + /** CloudRunRevisionInfo serviceUri */ + serviceUri?: (string|null); + } + + /** Represents a CloudRunRevisionInfo. */ + class CloudRunRevisionInfo implements ICloudRunRevisionInfo { + + /** + * Constructs a new CloudRunRevisionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo); + + /** CloudRunRevisionInfo displayName. */ + public displayName: string; + + /** CloudRunRevisionInfo uri. */ + public uri: string; + + /** CloudRunRevisionInfo location. */ + public location: string; + + /** CloudRunRevisionInfo serviceUri. */ + public serviceUri: string; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Verifies a CloudRunRevisionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @param message CloudRunRevisionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionInfo. */ + interface IAppEngineVersionInfo { + + /** AppEngineVersionInfo displayName */ + displayName?: (string|null); + + /** AppEngineVersionInfo uri */ + uri?: (string|null); + + /** AppEngineVersionInfo runtime */ + runtime?: (string|null); + + /** AppEngineVersionInfo environment */ + environment?: (string|null); + } + + /** Represents an AppEngineVersionInfo. */ + class AppEngineVersionInfo implements IAppEngineVersionInfo { + + /** + * Constructs a new AppEngineVersionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo); + + /** AppEngineVersionInfo displayName. */ + public displayName: string; + + /** AppEngineVersionInfo uri. */ + public uri: string; + + /** AppEngineVersionInfo runtime. */ + public runtime: string; + + /** AppEngineVersionInfo environment. */ + public environment: string; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Verifies an AppEngineVersionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @param message AppEngineVersionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcConnectorInfo. */ + interface IVpcConnectorInfo { + + /** VpcConnectorInfo displayName */ + displayName?: (string|null); + + /** VpcConnectorInfo uri */ + uri?: (string|null); + + /** VpcConnectorInfo location */ + location?: (string|null); + } + + /** Represents a VpcConnectorInfo. */ + class VpcConnectorInfo implements IVpcConnectorInfo { + + /** + * Constructs a new VpcConnectorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo); + + /** VpcConnectorInfo displayName. */ + public displayName: string; + + /** VpcConnectorInfo uri. */ + public uri: string; + + /** VpcConnectorInfo location. */ + public location: string; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcConnectorInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Verifies a VpcConnectorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcConnectorInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @param message VpcConnectorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcConnectorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NatInfo. */ + interface INatInfo { + + /** NatInfo type */ + type?: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type|null); + + /** NatInfo protocol */ + protocol?: (string|null); + + /** NatInfo networkUri */ + networkUri?: (string|null); + + /** NatInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** NatInfo newSourceIp */ + newSourceIp?: (string|null); + + /** NatInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** NatInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** NatInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** NatInfo newSourcePort */ + newSourcePort?: (number|null); + + /** NatInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** NatInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** NatInfo routerUri */ + routerUri?: (string|null); + + /** NatInfo natGatewayName */ + natGatewayName?: (string|null); + } + + /** Represents a NatInfo. */ + class NatInfo implements INatInfo { + + /** + * Constructs a new NatInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.INatInfo); + + /** NatInfo type. */ + public type: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type); + + /** NatInfo protocol. */ + public protocol: string; + + /** NatInfo networkUri. */ + public networkUri: string; + + /** NatInfo oldSourceIp. */ + public oldSourceIp: string; + + /** NatInfo newSourceIp. */ + public newSourceIp: string; + + /** NatInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** NatInfo newDestinationIp. */ + public newDestinationIp: string; + + /** NatInfo oldSourcePort. */ + public oldSourcePort: number; + + /** NatInfo newSourcePort. */ + public newSourcePort: number; + + /** NatInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** NatInfo newDestinationPort. */ + public newDestinationPort: number; + + /** NatInfo routerUri. */ + public routerUri: string; + + /** NatInfo natGatewayName. */ + public natGatewayName: string; + + /** + * Creates a new NatInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NatInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.INatInfo): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Verifies a NatInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NatInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @param message NatInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NatInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NatInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NatInfo { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INTERNAL_TO_EXTERNAL = 1, + EXTERNAL_TO_INTERNAL = 2, + CLOUD_NAT = 3, + PRIVATE_SERVICE_CONNECT = 4 + } + } + + /** Properties of a ProxyConnectionInfo. */ + interface IProxyConnectionInfo { + + /** ProxyConnectionInfo protocol */ + protocol?: (string|null); + + /** ProxyConnectionInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** ProxyConnectionInfo newSourceIp */ + newSourceIp?: (string|null); + + /** ProxyConnectionInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** ProxyConnectionInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** ProxyConnectionInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** ProxyConnectionInfo newSourcePort */ + newSourcePort?: (number|null); + + /** ProxyConnectionInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** ProxyConnectionInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** ProxyConnectionInfo subnetUri */ + subnetUri?: (string|null); + + /** ProxyConnectionInfo networkUri */ + networkUri?: (string|null); + } + + /** Represents a ProxyConnectionInfo. */ + class ProxyConnectionInfo implements IProxyConnectionInfo { + + /** + * Constructs a new ProxyConnectionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo); + + /** ProxyConnectionInfo protocol. */ + public protocol: string; + + /** ProxyConnectionInfo oldSourceIp. */ + public oldSourceIp: string; + + /** ProxyConnectionInfo newSourceIp. */ + public newSourceIp: string; + + /** ProxyConnectionInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** ProxyConnectionInfo newDestinationIp. */ + public newDestinationIp: string; + + /** ProxyConnectionInfo oldSourcePort. */ + public oldSourcePort: number; + + /** ProxyConnectionInfo newSourcePort. */ + public newSourcePort: number; + + /** ProxyConnectionInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** ProxyConnectionInfo newDestinationPort. */ + public newDestinationPort: number; + + /** ProxyConnectionInfo subnetUri. */ + public subnetUri: string; + + /** ProxyConnectionInfo networkUri. */ + public networkUri: string; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProxyConnectionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Verifies a ProxyConnectionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProxyConnectionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @param message ProxyConnectionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerBackendInfo. */ + interface ILoadBalancerBackendInfo { + + /** LoadBalancerBackendInfo name */ + name?: (string|null); + + /** LoadBalancerBackendInfo instanceUri */ + instanceUri?: (string|null); + + /** LoadBalancerBackendInfo backendServiceUri */ + backendServiceUri?: (string|null); + + /** LoadBalancerBackendInfo instanceGroupUri */ + instanceGroupUri?: (string|null); + + /** LoadBalancerBackendInfo networkEndpointGroupUri */ + networkEndpointGroupUri?: (string|null); + + /** LoadBalancerBackendInfo backendBucketUri */ + backendBucketUri?: (string|null); + + /** LoadBalancerBackendInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** LoadBalancerBackendInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + + /** LoadBalancerBackendInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ + healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); + } + + /** Represents a LoadBalancerBackendInfo. */ + class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { + + /** + * Constructs a new LoadBalancerBackendInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo); + + /** LoadBalancerBackendInfo name. */ + public name: string; + + /** LoadBalancerBackendInfo instanceUri. */ + public instanceUri: string; + + /** LoadBalancerBackendInfo backendServiceUri. */ + public backendServiceUri: string; + + /** LoadBalancerBackendInfo instanceGroupUri. */ + public instanceGroupUri: string; + + /** LoadBalancerBackendInfo networkEndpointGroupUri. */ + public networkEndpointGroupUri: string; + + /** LoadBalancerBackendInfo backendBucketUri. */ + public backendBucketUri: string; + + /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** LoadBalancerBackendInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** LoadBalancerBackendInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ + public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackendInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackendInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @param message LoadBalancerBackendInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackendInfo { + + /** HealthCheckFirewallsConfigState enum. */ + enum HealthCheckFirewallsConfigState { + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, + FIREWALLS_CONFIGURED = 1, + FIREWALLS_PARTIALLY_CONFIGURED = 2, + FIREWALLS_NOT_CONFIGURED = 3, + FIREWALLS_UNSUPPORTED = 4 + } + } + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + HTTPS_ADVANCED_LOAD_BALANCER = 1, + HTTPS_LOAD_BALANCER = 2, + REGIONAL_HTTPS_LOAD_BALANCER = 3, + INTERNAL_HTTPS_LOAD_BALANCER = 4, + SSL_PROXY_LOAD_BALANCER = 5, + TCP_PROXY_LOAD_BALANCER = 6, + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, + NETWORK_LOAD_BALANCER = 8, + LEGACY_NETWORK_LOAD_BALANCER = 9, + TCP_UDP_INTERNAL_LOAD_BALANCER = 10 + } + + /** Properties of a StorageBucketInfo. */ + interface IStorageBucketInfo { + + /** StorageBucketInfo bucket */ + bucket?: (string|null); + } + + /** Represents a StorageBucketInfo. */ + class StorageBucketInfo implements IStorageBucketInfo { + + /** + * Constructs a new StorageBucketInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo); + + /** StorageBucketInfo bucket. */ + public bucket: string; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageBucketInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Verifies a StorageBucketInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageBucketInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @param message StorageBucketInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageBucketInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageBucketInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerlessNegInfo. */ + interface IServerlessNegInfo { + + /** ServerlessNegInfo negUri */ + negUri?: (string|null); + } + + /** Represents a ServerlessNegInfo. */ + class ServerlessNegInfo implements IServerlessNegInfo { + + /** + * Constructs a new ServerlessNegInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo); + + /** ServerlessNegInfo negUri. */ + public negUri: string; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerlessNegInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Verifies a ServerlessNegInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerlessNegInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @param message ServerlessNegInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerlessNegInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ReachabilityService */ + class ReachabilityService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback): void; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @returns Promise + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): Promise; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConnectivityTest + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback): void; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @returns Promise + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): Promise; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback): void; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @returns Promise + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): Promise; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback): void; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @returns Promise + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): Promise; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback): void; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @returns Promise + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): Promise; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback): void; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @returns Promise + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): Promise; + } + + namespace ReachabilityService { + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. + * @param error Error, if any + * @param [response] ListConnectivityTestsResponse + */ + type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. + * @param error Error, if any + * @param [response] ConnectivityTest + */ + type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ConnectivityTest) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListConnectivityTestsRequest. */ + interface IListConnectivityTestsRequest { + + /** ListConnectivityTestsRequest parent */ + parent?: (string|null); + + /** ListConnectivityTestsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectivityTestsRequest pageToken */ + pageToken?: (string|null); + + /** ListConnectivityTestsRequest filter */ + filter?: (string|null); + + /** ListConnectivityTestsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListConnectivityTestsRequest. */ + class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { + + /** + * Constructs a new ListConnectivityTestsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest); + + /** ListConnectivityTestsRequest parent. */ + public parent: string; + + /** ListConnectivityTestsRequest pageSize. */ + public pageSize: number; + + /** ListConnectivityTestsRequest pageToken. */ + public pageToken: string; + + /** ListConnectivityTestsRequest filter. */ + public filter: string; + + /** ListConnectivityTestsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @param message ListConnectivityTestsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectivityTestsResponse. */ + interface IListConnectivityTestsResponse { + + /** ListConnectivityTestsResponse resources */ + resources?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null); + + /** ListConnectivityTestsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListConnectivityTestsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListConnectivityTestsResponse. */ + class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { + + /** + * Constructs a new ListConnectivityTestsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse); + + /** ListConnectivityTestsResponse resources. */ + public resources: google.cloud.networkmanagement.v1beta1.IConnectivityTest[]; + + /** ListConnectivityTestsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListConnectivityTestsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsResponse instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @param message ListConnectivityTestsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectivityTestRequest. */ + interface IGetConnectivityTestRequest { + + /** GetConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectivityTestRequest. */ + class GetConnectivityTestRequest implements IGetConnectivityTestRequest { + + /** + * Constructs a new GetConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest); + + /** GetConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Verifies a GetConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @param message GetConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectivityTestRequest. */ + interface ICreateConnectivityTestRequest { + + /** CreateConnectivityTestRequest parent */ + parent?: (string|null); + + /** CreateConnectivityTestRequest testId */ + testId?: (string|null); + + /** CreateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + } + + /** Represents a CreateConnectivityTestRequest. */ + class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { + + /** + * Constructs a new CreateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest); + + /** CreateConnectivityTestRequest parent. */ + public parent: string; + + /** CreateConnectivityTestRequest testId. */ + public testId: string; + + /** CreateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message CreateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectivityTestRequest. */ + interface IUpdateConnectivityTestRequest { + + /** UpdateConnectivityTestRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + } + + /** Represents an UpdateConnectivityTestRequest. */ + class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest); + + /** UpdateConnectivityTestRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message UpdateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectivityTestRequest. */ + interface IDeleteConnectivityTestRequest { + + /** DeleteConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConnectivityTestRequest. */ + class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest); + + /** DeleteConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @param message DeleteConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RerunConnectivityTestRequest. */ + interface IRerunConnectivityTestRequest { + + /** RerunConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a RerunConnectivityTestRequest. */ + class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { + + /** + * Constructs a new RerunConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest); + + /** RerunConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RerunConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RerunConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @param message RerunConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RerunConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @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 statusDetail */ + statusDetail?: (string|null); + + /** OperationMetadata cancelRequested */ + cancelRequested?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.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 statusDetail. */ + public statusDetail: string; + + /** OperationMetadata cancelRequested. */ + public cancelRequested: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IOperationMetadata): google.cloud.networkmanagement.v1beta1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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; + } + + /** Represents a VpcFlowLogsService */ + class VpcFlowLogsService extends $protobuf.rpc.Service { + + /** + * Constructs a new VpcFlowLogsService 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 VpcFlowLogsService 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): VpcFlowLogsService; + + /** + * Calls ListVpcFlowLogsConfigs. + * @param request ListVpcFlowLogsConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse + */ + public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback): void; + + /** + * Calls ListVpcFlowLogsConfigs. + * @param request ListVpcFlowLogsConfigsRequest message or plain object + * @returns Promise + */ + public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): Promise; + + /** + * Calls GetVpcFlowLogsConfig. + * @param request GetVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VpcFlowLogsConfig + */ + public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback): void; + + /** + * Calls GetVpcFlowLogsConfig. + * @param request GetVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): Promise; + + /** + * Calls CreateVpcFlowLogsConfig. + * @param request CreateVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback): void; + + /** + * Calls CreateVpcFlowLogsConfig. + * @param request CreateVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): Promise; + + /** + * Calls UpdateVpcFlowLogsConfig. + * @param request UpdateVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback): void; + + /** + * Calls UpdateVpcFlowLogsConfig. + * @param request UpdateVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): Promise; + + /** + * Calls DeleteVpcFlowLogsConfig. + * @param request DeleteVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback): void; + + /** + * Calls DeleteVpcFlowLogsConfig. + * @param request DeleteVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): Promise; + } + + namespace VpcFlowLogsService { + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. + * @param error Error, if any + * @param [response] ListVpcFlowLogsConfigsResponse + */ + type ListVpcFlowLogsConfigsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] VpcFlowLogsConfig + */ + type GetVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListVpcFlowLogsConfigsRequest. */ + interface IListVpcFlowLogsConfigsRequest { + + /** ListVpcFlowLogsConfigsRequest parent */ + parent?: (string|null); + + /** ListVpcFlowLogsConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListVpcFlowLogsConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListVpcFlowLogsConfigsRequest filter */ + filter?: (string|null); + + /** ListVpcFlowLogsConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListVpcFlowLogsConfigsRequest. */ + class ListVpcFlowLogsConfigsRequest implements IListVpcFlowLogsConfigsRequest { + + /** + * Constructs a new ListVpcFlowLogsConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest); + + /** ListVpcFlowLogsConfigsRequest parent. */ + public parent: string; + + /** ListVpcFlowLogsConfigsRequest pageSize. */ + public pageSize: number; + + /** ListVpcFlowLogsConfigsRequest pageToken. */ + public pageToken: string; + + /** ListVpcFlowLogsConfigsRequest filter. */ + public filter: string; + + /** ListVpcFlowLogsConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVpcFlowLogsConfigsRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Verifies a ListVpcFlowLogsConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVpcFlowLogsConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Creates a plain object from a ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. + * @param message ListVpcFlowLogsConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVpcFlowLogsConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVpcFlowLogsConfigsResponse. */ + interface IListVpcFlowLogsConfigsResponse { + + /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs */ + vpcFlowLogsConfigs?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null); + + /** ListVpcFlowLogsConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListVpcFlowLogsConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListVpcFlowLogsConfigsResponse. */ + class ListVpcFlowLogsConfigsResponse implements IListVpcFlowLogsConfigsResponse { + + /** + * Constructs a new ListVpcFlowLogsConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse); + + /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. */ + public vpcFlowLogsConfigs: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]; + + /** ListVpcFlowLogsConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListVpcFlowLogsConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVpcFlowLogsConfigsResponse instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Verifies a ListVpcFlowLogsConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVpcFlowLogsConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Creates a plain object from a ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. + * @param message ListVpcFlowLogsConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVpcFlowLogsConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVpcFlowLogsConfigRequest. */ + interface IGetVpcFlowLogsConfigRequest { + + /** GetVpcFlowLogsConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetVpcFlowLogsConfigRequest. */ + class GetVpcFlowLogsConfigRequest implements IGetVpcFlowLogsConfigRequest { + + /** + * Constructs a new GetVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest); + + /** GetVpcFlowLogsConfigRequest name. */ + public name: string; + + /** + * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Verifies a GetVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message GetVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVpcFlowLogsConfigRequest. */ + interface ICreateVpcFlowLogsConfigRequest { + + /** CreateVpcFlowLogsConfigRequest parent */ + parent?: (string|null); + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId */ + vpcFlowLogsConfigId?: (string|null); + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ + vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + } + + /** Represents a CreateVpcFlowLogsConfigRequest. */ + class CreateVpcFlowLogsConfigRequest implements ICreateVpcFlowLogsConfigRequest { + + /** + * Constructs a new CreateVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest); + + /** CreateVpcFlowLogsConfigRequest parent. */ + public parent: string; + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. */ + public vpcFlowLogsConfigId: string; + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ + public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + + /** + * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Verifies a CreateVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message CreateVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateVpcFlowLogsConfigRequest. */ + interface IUpdateVpcFlowLogsConfigRequest { + + /** UpdateVpcFlowLogsConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ + vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + } + + /** Represents an UpdateVpcFlowLogsConfigRequest. */ + class UpdateVpcFlowLogsConfigRequest implements IUpdateVpcFlowLogsConfigRequest { + + /** + * Constructs a new UpdateVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest); + + /** UpdateVpcFlowLogsConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ + public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + + /** + * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Verifies an UpdateVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message UpdateVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVpcFlowLogsConfigRequest. */ + interface IDeleteVpcFlowLogsConfigRequest { + + /** DeleteVpcFlowLogsConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteVpcFlowLogsConfigRequest. */ + class DeleteVpcFlowLogsConfigRequest implements IDeleteVpcFlowLogsConfigRequest { + + /** + * Constructs a new DeleteVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest); + + /** DeleteVpcFlowLogsConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Verifies a DeleteVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message DeleteVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcFlowLogsConfig. */ + interface IVpcFlowLogsConfig { + + /** VpcFlowLogsConfig name */ + name?: (string|null); + + /** VpcFlowLogsConfig description */ + description?: (string|null); + + /** VpcFlowLogsConfig state */ + state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); + + /** VpcFlowLogsConfig aggregationInterval */ + aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); + + /** VpcFlowLogsConfig flowSampling */ + flowSampling?: (number|null); + + /** VpcFlowLogsConfig metadata */ + metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); + + /** VpcFlowLogsConfig metadataFields */ + metadataFields?: (string[]|null); + + /** VpcFlowLogsConfig filterExpr */ + filterExpr?: (string|null); + + /** VpcFlowLogsConfig interconnectAttachment */ + interconnectAttachment?: (string|null); + + /** VpcFlowLogsConfig vpnTunnel */ + vpnTunnel?: (string|null); + + /** VpcFlowLogsConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** VpcFlowLogsConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** VpcFlowLogsConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VpcFlowLogsConfig. */ + class VpcFlowLogsConfig implements IVpcFlowLogsConfig { + + /** + * Constructs a new VpcFlowLogsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig); + + /** VpcFlowLogsConfig name. */ + public name: string; + + /** VpcFlowLogsConfig description. */ + public description?: (string|null); + + /** VpcFlowLogsConfig state. */ + public state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); + + /** VpcFlowLogsConfig aggregationInterval. */ + public aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); + + /** VpcFlowLogsConfig flowSampling. */ + public flowSampling?: (number|null); + + /** VpcFlowLogsConfig metadata. */ + public metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); + + /** VpcFlowLogsConfig metadataFields. */ + public metadataFields: string[]; + + /** VpcFlowLogsConfig filterExpr. */ + public filterExpr?: (string|null); + + /** VpcFlowLogsConfig interconnectAttachment. */ + public interconnectAttachment?: (string|null); + + /** VpcFlowLogsConfig vpnTunnel. */ + public vpnTunnel?: (string|null); + + /** VpcFlowLogsConfig labels. */ + public labels: { [k: string]: string }; + + /** VpcFlowLogsConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** VpcFlowLogsConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** VpcFlowLogsConfig _description. */ + public _description?: "description"; + + /** VpcFlowLogsConfig _state. */ + public _state?: "state"; + + /** VpcFlowLogsConfig _aggregationInterval. */ + public _aggregationInterval?: "aggregationInterval"; + + /** VpcFlowLogsConfig _flowSampling. */ + public _flowSampling?: "flowSampling"; + + /** VpcFlowLogsConfig _metadata. */ + public _metadata?: "metadata"; + + /** VpcFlowLogsConfig _filterExpr. */ + public _filterExpr?: "filterExpr"; + + /** VpcFlowLogsConfig targetResource. */ + public targetResource?: ("interconnectAttachment"|"vpnTunnel"); + + /** + * Creates a new VpcFlowLogsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcFlowLogsConfig instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @param message VpcFlowLogsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @param message VpcFlowLogsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Verifies a VpcFlowLogsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcFlowLogsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. + * @param message VpcFlowLogsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcFlowLogsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcFlowLogsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VpcFlowLogsConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + + /** AggregationInterval enum. */ + enum AggregationInterval { + AGGREGATION_INTERVAL_UNSPECIFIED = 0, + INTERVAL_5_SEC = 1, + INTERVAL_30_SEC = 2, + INTERVAL_1_MIN = 3, + INTERVAL_5_MIN = 4, + INTERVAL_10_MIN = 5, + INTERVAL_15_MIN = 6 + } + + /** Metadata enum. */ + enum Metadata { + METADATA_UNSPECIFIED = 0, + INCLUDE_ALL_METADATA = 1, + EXCLUDE_ALL_METADATA = 2, + CUSTOM_METADATA = 3 + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a 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 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 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of 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-networkmanagement/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js new file mode 100644 index 00000000000..2438db4bb8a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js @@ -0,0 +1,42968 @@ +// 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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.networkmanagement = (function() { + + /** + * Namespace networkmanagement. + * @memberof google.cloud + * @namespace + */ + var networkmanagement = {}; + + networkmanagement.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.networkmanagement + * @namespace + */ + var v1beta1 = {}; + + v1beta1.ConnectivityTest = (function() { + + /** + * Properties of a ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IConnectivityTest + * @property {string|null} [name] ConnectivityTest name + * @property {string|null} [description] ConnectivityTest description + * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [source] ConnectivityTest source + * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [destination] ConnectivityTest destination + * @property {string|null} [protocol] ConnectivityTest protocol + * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects + * @property {string|null} [displayName] ConnectivityTest displayName + * @property {Object.|null} [labels] ConnectivityTest labels + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime + * @property {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails + * @property {google.cloud.networkmanagement.v1beta1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails + * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks + */ + + /** + * Constructs a new ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ConnectivityTest. + * @implements IConnectivityTest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set + */ + function ConnectivityTest(properties) { + this.relatedProjects = []; + 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]]; + } + + /** + * ConnectivityTest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.name = ""; + + /** + * ConnectivityTest description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.description = ""; + + /** + * ConnectivityTest source. + * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} source + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.source = null; + + /** + * ConnectivityTest destination. + * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} destination + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.destination = null; + + /** + * ConnectivityTest protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.protocol = ""; + + /** + * ConnectivityTest relatedProjects. + * @member {Array.} relatedProjects + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.relatedProjects = $util.emptyArray; + + /** + * ConnectivityTest displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.displayName = ""; + + /** + * ConnectivityTest labels. + * @member {Object.} labels + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.labels = $util.emptyObject; + + /** + * ConnectivityTest createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.createTime = null; + + /** + * ConnectivityTest updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.updateTime = null; + + /** + * ConnectivityTest reachabilityDetails. + * @member {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null|undefined} reachabilityDetails + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.reachabilityDetails = null; + + /** + * ConnectivityTest probingDetails. + * @member {google.cloud.networkmanagement.v1beta1.IProbingDetails|null|undefined} probingDetails + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.probingDetails = null; + + /** + * ConnectivityTest bypassFirewallChecks. + * @member {boolean} bypassFirewallChecks + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.bypassFirewallChecks = false; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest instance + */ + ConnectivityTest.create = function create(properties) { + return new ConnectivityTest(properties); + }; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encode = function encode(message, writer) { + if (!writer) + 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.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); + if (message.relatedProjects != null && message.relatedProjects.length) + for (var i = 0; i < message.relatedProjects.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) + $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) + $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); + return writer; + }; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 5: { + message.protocol = reader.string(); + break; + } + case 6: { + if (!(message.relatedProjects && message.relatedProjects.length)) + message.relatedProjects = []; + message.relatedProjects.push(reader.string()); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 8: { + 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 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.decode(reader, reader.uint32()); + break; + } + case 17: { + message.bypassFirewallChecks = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectivityTest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectivityTest.verify = function verify(message) { + if (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.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.source); + if (error) + return "source." + error; + } + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.destination); + if (error) + return "destination." + error; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { + if (!Array.isArray(message.relatedProjects)) + return "relatedProjects: array expected"; + for (var i = 0; i < message.relatedProjects.length; ++i) + if (!$util.isString(message.relatedProjects[i])) + return "relatedProjects: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify(message.reachabilityDetails); + if (error) + return "reachabilityDetails." + error; + } + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.verify(message.probingDetails); + if (error) + return "probingDetails." + error; + } + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + if (typeof message.bypassFirewallChecks !== "boolean") + return "bypassFirewallChecks: boolean expected"; + return null; + }; + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest + */ + ConnectivityTest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.source: object expected"); + message.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.source); + } + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.destination: object expected"); + message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.destination); + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.relatedProjects) { + if (!Array.isArray(object.relatedProjects)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.relatedProjects: array expected"); + message.relatedProjects = []; + for (var i = 0; i < object.relatedProjects.length; ++i) + message.relatedProjects[i] = String(object.relatedProjects[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.reachabilityDetails != null) { + if (typeof object.reachabilityDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.reachabilityDetails: object expected"); + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.fromObject(object.reachabilityDetails); + } + if (object.probingDetails != null) { + if (typeof object.probingDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.probingDetails: object expected"); + message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.fromObject(object.probingDetails); + } + if (object.bypassFirewallChecks != null) + message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); + return message; + }; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} message ConnectivityTest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectivityTest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedProjects = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.source = null; + object.destination = null; + object.protocol = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.reachabilityDetails = null; + object.probingDetails = null; + object.bypassFirewallChecks = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.source, options); + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.destination, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.relatedProjects && message.relatedProjects.length) { + object.relatedProjects = []; + for (var j = 0; j < message.relatedProjects.length; ++j) + object.relatedProjects[j] = message.relatedProjects[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) + object.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.toObject(message.reachabilityDetails, options); + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) + object.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.toObject(message.probingDetails, options); + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + object.bypassFirewallChecks = message.bypassFirewallChecks; + return object; + }; + + /** + * Converts this ConnectivityTest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + * @returns {Object.} JSON object + */ + ConnectivityTest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectivityTest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ConnectivityTest"; + }; + + return ConnectivityTest; + })(); + + v1beta1.Endpoint = (function() { + + /** + * Properties of an Endpoint. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IEndpoint + * @property {string|null} [ipAddress] Endpoint ipAddress + * @property {number|null} [port] Endpoint port + * @property {string|null} [instance] Endpoint instance + * @property {string|null} [forwardingRule] Endpoint forwardingRule + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget + * @property {string|null} [loadBalancerId] Endpoint loadBalancerId + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType + * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster + * @property {string|null} [fqdn] Endpoint fqdn + * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance + * @property {string|null} [redisInstance] Endpoint redisInstance + * @property {string|null} [redisCluster] Endpoint redisCluster + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision + * @property {string|null} [network] Endpoint network + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null} [networkType] Endpoint networkType + * @property {string|null} [projectId] Endpoint projectId + */ + + /** + * Constructs a new Endpoint. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an Endpoint. + * @implements IEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set + */ + function Endpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Endpoint ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.ipAddress = ""; + + /** + * Endpoint port. + * @member {number} port + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.port = 0; + + /** + * Endpoint instance. + * @member {string} instance + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.instance = ""; + + /** + * Endpoint forwardingRule. + * @member {string} forwardingRule + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRule = ""; + + /** + * Endpoint forwardingRuleTarget. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRuleTarget = null; + + /** + * Endpoint loadBalancerId. + * @member {string|null|undefined} loadBalancerId + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerId = null; + + /** + * Endpoint loadBalancerType. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null|undefined} loadBalancerType + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerType = null; + + /** + * Endpoint gkeMasterCluster. + * @member {string} gkeMasterCluster + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.gkeMasterCluster = ""; + + /** + * Endpoint fqdn. + * @member {string} fqdn + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.fqdn = ""; + + /** + * Endpoint cloudSqlInstance. + * @member {string} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.cloudSqlInstance = ""; + + /** + * Endpoint redisInstance. + * @member {string} redisInstance + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.redisInstance = ""; + + /** + * Endpoint redisCluster. + * @member {string} redisCluster + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.redisCluster = ""; + + /** + * Endpoint cloudFunction. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.cloudFunction = null; + + /** + * Endpoint appEngineVersion. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.appEngineVersion = null; + + /** + * Endpoint cloudRunRevision. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.cloudRunRevision = null; + + /** + * Endpoint network. + * @member {string} network + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.network = ""; + + /** + * Endpoint networkType. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType} networkType + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.networkType = 0; + + /** + * Endpoint projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.projectId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Endpoint _forwardingRuleTarget. + * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { + get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerId. + * @member {"loadBalancerId"|undefined} _loadBalancerId + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerType. + * @member {"loadBalancerType"|undefined} _loadBalancerType + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Endpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint instance + */ + Endpoint.create = function create(properties) { + return new Endpoint(properties); + }; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); + if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); + if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); + if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); + if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); + return writer; + }; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipAddress = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.instance = reader.string(); + break; + } + case 13: { + message.forwardingRule = reader.string(); + break; + } + case 14: { + message.forwardingRuleTarget = reader.int32(); + break; + } + case 15: { + message.loadBalancerId = reader.string(); + break; + } + case 16: { + message.loadBalancerType = reader.int32(); + break; + } + case 7: { + message.gkeMasterCluster = reader.string(); + break; + } + case 19: { + message.fqdn = reader.string(); + break; + } + case 8: { + message.cloudSqlInstance = reader.string(); + break; + } + case 17: { + message.redisInstance = reader.string(); + break; + } + case 18: { + message.redisCluster = reader.string(); + break; + } + case 10: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); + break; + } + case 11: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.network = reader.string(); + break; + } + case 5: { + message.networkType = reader.int32(); + break; + } + case 6: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + if (!$util.isString(message.forwardingRule)) + return "forwardingRule: string expected"; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + properties._forwardingRuleTarget = 1; + switch (message.forwardingRuleTarget) { + default: + return "forwardingRuleTarget: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + properties._loadBalancerId = 1; + if (!$util.isString(message.loadBalancerId)) + return "loadBalancerId: string expected"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + properties._loadBalancerType = 1; + switch (message.loadBalancerType) { + default: + return "loadBalancerType: 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: + break; + } + } + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + if (!$util.isString(message.gkeMasterCluster)) + return "gkeMasterCluster: string expected"; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + if (!$util.isString(message.fqdn)) + return "fqdn: string expected"; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + if (!$util.isString(message.cloudSqlInstance)) + return "cloudSqlInstance: string expected"; + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + if (!$util.isString(message.redisInstance)) + return "redisInstance: string expected"; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + if (!$util.isString(message.redisCluster)) + return "redisCluster: string expected"; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.networkType != null && message.hasOwnProperty("networkType")) + switch (message.networkType) { + default: + return "networkType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint + */ + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.port != null) + message.port = object.port | 0; + if (object.instance != null) + message.instance = String(object.instance); + if (object.forwardingRule != null) + message.forwardingRule = String(object.forwardingRule); + switch (object.forwardingRuleTarget) { + default: + if (typeof object.forwardingRuleTarget === "number") { + message.forwardingRuleTarget = object.forwardingRuleTarget; + break; + } + break; + case "FORWARDING_RULE_TARGET_UNSPECIFIED": + case 0: + message.forwardingRuleTarget = 0; + break; + case "INSTANCE": + case 1: + message.forwardingRuleTarget = 1; + break; + case "LOAD_BALANCER": + case 2: + message.forwardingRuleTarget = 2; + break; + case "VPN_GATEWAY": + case 3: + message.forwardingRuleTarget = 3; + break; + case "PSC": + case 4: + message.forwardingRuleTarget = 4; + break; + } + if (object.loadBalancerId != null) + message.loadBalancerId = String(object.loadBalancerId); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "HTTPS_ADVANCED_LOAD_BALANCER": + case 1: + message.loadBalancerType = 1; + break; + case "HTTPS_LOAD_BALANCER": + case 2: + message.loadBalancerType = 2; + break; + case "REGIONAL_HTTPS_LOAD_BALANCER": + case 3: + message.loadBalancerType = 3; + break; + case "INTERNAL_HTTPS_LOAD_BALANCER": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY_LOAD_BALANCER": + case 5: + message.loadBalancerType = 5; + break; + case "TCP_PROXY_LOAD_BALANCER": + case 6: + message.loadBalancerType = 6; + break; + case "INTERNAL_TCP_PROXY_LOAD_BALANCER": + case 7: + message.loadBalancerType = 7; + break; + case "NETWORK_LOAD_BALANCER": + case 8: + message.loadBalancerType = 8; + break; + case "LEGACY_NETWORK_LOAD_BALANCER": + case 9: + message.loadBalancerType = 9; + break; + case "TCP_UDP_INTERNAL_LOAD_BALANCER": + case 10: + message.loadBalancerType = 10; + break; + } + if (object.gkeMasterCluster != null) + message.gkeMasterCluster = String(object.gkeMasterCluster); + if (object.fqdn != null) + message.fqdn = String(object.fqdn); + if (object.cloudSqlInstance != null) + message.cloudSqlInstance = String(object.cloudSqlInstance); + if (object.redisInstance != null) + message.redisInstance = String(object.redisInstance); + if (object.redisCluster != null) + message.redisCluster = String(object.redisCluster); + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); + } + if (object.network != null) + message.network = String(object.network); + switch (object.networkType) { + default: + if (typeof object.networkType === "number") { + message.networkType = object.networkType; + break; + } + break; + case "NETWORK_TYPE_UNSPECIFIED": + case 0: + message.networkType = 0; + break; + case "GCP_NETWORK": + case 1: + message.networkType = 1; + break; + case "NON_GCP_NETWORK": + case 2: + message.networkType = 2; + break; + } + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint} message Endpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ipAddress = ""; + object.port = 0; + object.instance = ""; + object.network = ""; + object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; + object.projectId = ""; + object.gkeMasterCluster = ""; + object.cloudSqlInstance = ""; + object.cloudFunction = null; + object.appEngineVersion = null; + object.cloudRunRevision = null; + object.forwardingRule = ""; + object.redisInstance = ""; + object.redisCluster = ""; + object.fqdn = ""; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.networkType != null && message.hasOwnProperty("networkType")) + object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] : message.networkType; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + object.gkeMasterCluster = message.gkeMasterCluster; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + object.cloudSqlInstance = message.cloudSqlInstance; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) + object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) + object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + object.forwardingRule = message.forwardingRule; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; + if (options.oneofs) + object._forwardingRuleTarget = "forwardingRuleTarget"; + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + object.loadBalancerId = message.loadBalancerId; + if (options.oneofs) + object._loadBalancerId = "loadBalancerId"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (options.oneofs) + object._loadBalancerType = "loadBalancerType"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + object.redisInstance = message.redisInstance; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + object.redisCluster = message.redisCluster; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + object.fqdn = message.fqdn; + return object; + }; + + /** + * Converts this Endpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + * @returns {Object.} JSON object + */ + Endpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Endpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint"; + }; + + /** + * NetworkType enum. + * @name google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType + * @enum {number} + * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value + * @property {number} GCP_NETWORK=1 GCP_NETWORK value + * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value + */ + Endpoint.NetworkType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCP_NETWORK"] = 1; + values[valuesById[2] = "NON_GCP_NETWORK"] = 2; + return values; + })(); + + /** + * ForwardingRuleTarget enum. + * @name google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget + * @enum {number} + * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value + * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value + * @property {number} PSC=4 PSC value + */ + Endpoint.ForwardingRuleTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "LOAD_BALANCER"] = 2; + values[valuesById[3] = "VPN_GATEWAY"] = 3; + values[valuesById[4] = "PSC"] = 4; + return values; + })(); + + Endpoint.CloudFunctionEndpoint = (function() { + + /** + * Properties of a CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @interface ICloudFunctionEndpoint + * @property {string|null} [uri] CloudFunctionEndpoint uri + */ + + /** + * Constructs a new CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @classdesc Represents a CloudFunctionEndpoint. + * @implements ICloudFunctionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + */ + function CloudFunctionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @instance + */ + CloudFunctionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance + */ + CloudFunctionEndpoint.create = function create(properties) { + return new CloudFunctionEndpoint(properties); + }; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + */ + CloudFunctionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint"; + }; + + return CloudFunctionEndpoint; + })(); + + Endpoint.AppEngineVersionEndpoint = (function() { + + /** + * Properties of an AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @interface IAppEngineVersionEndpoint + * @property {string|null} [uri] AppEngineVersionEndpoint uri + */ + + /** + * Constructs a new AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @classdesc Represents an AppEngineVersionEndpoint. + * @implements IAppEngineVersionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + */ + function AppEngineVersionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @instance + */ + AppEngineVersionEndpoint.prototype.uri = ""; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance + */ + AppEngineVersionEndpoint.create = function create(properties) { + return new AppEngineVersionEndpoint(properties); + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + */ + AppEngineVersionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint"; + }; + + return AppEngineVersionEndpoint; + })(); + + Endpoint.CloudRunRevisionEndpoint = (function() { + + /** + * Properties of a CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @interface ICloudRunRevisionEndpoint + * @property {string|null} [uri] CloudRunRevisionEndpoint uri + */ + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @classdesc Represents a CloudRunRevisionEndpoint. + * @implements ICloudRunRevisionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + */ + function CloudRunRevisionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @instance + */ + CloudRunRevisionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance + */ + CloudRunRevisionEndpoint.create = function create(properties) { + return new CloudRunRevisionEndpoint(properties); + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + */ + CloudRunRevisionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint"; + }; + + return CloudRunRevisionEndpoint; + })(); + + return Endpoint; + })(); + + v1beta1.ReachabilityDetails = (function() { + + /** + * Properties of a ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IReachabilityDetails + * @property {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error + * @property {Array.|null} [traces] ReachabilityDetails traces + */ + + /** + * Constructs a new ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ReachabilityDetails. + * @implements IReachabilityDetails + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set + */ + function ReachabilityDetails(properties) { + this.traces = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReachabilityDetails result. + * @member {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result} result + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.result = 0; + + /** + * ReachabilityDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.verifyTime = null; + + /** + * ReachabilityDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.error = null; + + /** + * ReachabilityDetails traces. + * @member {Array.} traces + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.traces = $util.emptyArray; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails instance + */ + ReachabilityDetails.create = function create(properties) { + return new ReachabilityDetails(properties); + }; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.traces != null && message.traces.length) + for (var i = 0; i < message.traces.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.traces && message.traces.length)) + message.traces = []; + message.traces.push($root.google.cloud.networkmanagement.v1beta1.Trace.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReachabilityDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReachabilityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.traces != null && message.hasOwnProperty("traces")) { + if (!Array.isArray(message.traces)) + return "traces: array expected"; + for (var i = 0; i < message.traces.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.Trace.verify(message.traces[i]); + if (error) + return "traces." + error; + } + } + return null; + }; + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails + */ + ReachabilityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "AMBIGUOUS": + case 4: + message.result = 4; + break; + case "UNDETERMINED": + case 5: + message.result = 5; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.traces) { + if (!Array.isArray(object.traces)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: array expected"); + message.traces = []; + for (var i = 0; i < object.traces.length; ++i) { + if (typeof object.traces[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: object expected"); + message.traces[i] = $root.google.cloud.networkmanagement.v1beta1.Trace.fromObject(object.traces[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} message ReachabilityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReachabilityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.traces = []; + if (options.defaults) { + object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.traces && message.traces.length) { + object.traces = []; + for (var j = 0; j < message.traces.length; ++j) + object.traces[j] = $root.google.cloud.networkmanagement.v1beta1.Trace.toObject(message.traces[j], options); + } + return object; + }; + + /** + * Converts this ReachabilityDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + * @returns {Object.} JSON object + */ + ReachabilityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReachabilityDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ReachabilityDetails"; + }; + + /** + * Result enum. + * @name google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result + * @enum {number} + * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} AMBIGUOUS=4 AMBIGUOUS value + * @property {number} UNDETERMINED=5 UNDETERMINED value + */ + ReachabilityDetails.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[4] = "AMBIGUOUS"] = 4; + values[valuesById[5] = "UNDETERMINED"] = 5; + return values; + })(); + + return ReachabilityDetails; + })(); + + v1beta1.LatencyPercentile = (function() { + + /** + * Properties of a LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILatencyPercentile + * @property {number|null} [percent] LatencyPercentile percent + * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros + */ + + /** + * Constructs a new LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LatencyPercentile. + * @implements ILatencyPercentile + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set + */ + function LatencyPercentile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyPercentile percent. + * @member {number} percent + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.percent = 0; + + /** + * LatencyPercentile latencyMicros. + * @member {number|Long} latencyMicros + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile instance + */ + LatencyPercentile.create = function create(properties) { + return new LatencyPercentile(properties); + }; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); + if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); + return writer; + }; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.percent = reader.int32(); + break; + } + case 2: { + message.latencyMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyPercentile message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyPercentile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.percent != null && message.hasOwnProperty("percent")) + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) + return "latencyMicros: integer|Long expected"; + return null; + }; + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile + */ + LatencyPercentile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); + if (object.percent != null) + message.percent = object.percent | 0; + if (object.latencyMicros != null) + if ($util.Long) + (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; + else if (typeof object.latencyMicros === "string") + message.latencyMicros = parseInt(object.latencyMicros, 10); + else if (typeof object.latencyMicros === "number") + message.latencyMicros = object.latencyMicros; + else if (typeof object.latencyMicros === "object") + message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.LatencyPercentile} message LatencyPercentile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyPercentile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.percent = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.latencyMicros = options.longs === String ? "0" : 0; + } + if (message.percent != null && message.hasOwnProperty("percent")) + object.percent = message.percent; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (typeof message.latencyMicros === "number") + object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; + else + object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; + return object; + }; + + /** + * Converts this LatencyPercentile to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @instance + * @returns {Object.} JSON object + */ + LatencyPercentile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyPercentile + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyPercentile"; + }; + + return LatencyPercentile; + })(); + + v1beta1.LatencyDistribution = (function() { + + /** + * Properties of a LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILatencyDistribution + * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles + */ + + /** + * Constructs a new LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LatencyDistribution. + * @implements ILatencyDistribution + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set + */ + function LatencyDistribution(properties) { + this.latencyPercentiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyDistribution latencyPercentiles. + * @member {Array.} latencyPercentiles + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @instance + */ + LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution instance + */ + LatencyDistribution.create = function create(properties) { + return new LatencyDistribution(properties); + }; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latencyPercentiles != null && message.latencyPercentiles.length) + for (var i = 0; i < message.latencyPercentiles.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.latencyPercentiles && message.latencyPercentiles.length)) + message.latencyPercentiles = []; + message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyDistribution message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyDistribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { + if (!Array.isArray(message.latencyPercentiles)) + return "latencyPercentiles: array expected"; + for (var i = 0; i < message.latencyPercentiles.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify(message.latencyPercentiles[i]); + if (error) + return "latencyPercentiles." + error; + } + } + return null; + }; + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution + */ + LatencyDistribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); + if (object.latencyPercentiles) { + if (!Array.isArray(object.latencyPercentiles)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: array expected"); + message.latencyPercentiles = []; + for (var i = 0; i < object.latencyPercentiles.length; ++i) { + if (typeof object.latencyPercentiles[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: object expected"); + message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.LatencyDistribution} message LatencyDistribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyDistribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.latencyPercentiles = []; + if (message.latencyPercentiles && message.latencyPercentiles.length) { + object.latencyPercentiles = []; + for (var j = 0; j < message.latencyPercentiles.length; ++j) + object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); + } + return object; + }; + + /** + * Converts this LatencyDistribution to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @instance + * @returns {Object.} JSON object + */ + LatencyDistribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyDistribution + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyDistribution"; + }; + + return LatencyDistribution; + })(); + + v1beta1.ProbingDetails = (function() { + + /** + * Properties of a ProbingDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IProbingDetails + * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ProbingDetails error + * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause + * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount + * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount + * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo + * @property {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency + * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation + */ + + /** + * Constructs a new ProbingDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ProbingDetails. + * @implements IProbingDetails + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set + */ + function ProbingDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProbingDetails result. + * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult} result + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.result = 0; + + /** + * ProbingDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.verifyTime = null; + + /** + * ProbingDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.error = null; + + /** + * ProbingDetails abortCause. + * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause} abortCause + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.abortCause = 0; + + /** + * ProbingDetails sentProbeCount. + * @member {number} sentProbeCount + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.sentProbeCount = 0; + + /** + * ProbingDetails successfulProbeCount. + * @member {number} successfulProbeCount + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.successfulProbeCount = 0; + + /** + * ProbingDetails endpointInfo. + * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.endpointInfo = null; + + /** + * ProbingDetails probingLatency. + * @member {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null|undefined} probingLatency + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.probingLatency = null; + + /** + * ProbingDetails destinationEgressLocation. + * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.destinationEgressLocation = null; + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails instance + */ + ProbingDetails.create = function create(properties) { + return new ProbingDetails(properties); + }; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); + if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); + if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) + $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) + $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.abortCause = reader.int32(); + break; + } + case 5: { + message.sentProbeCount = reader.int32(); + break; + } + case 6: { + message.successfulProbeCount = reader.int32(); + break; + } + case 7: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.decode(reader, reader.uint32()); + break; + } + case 9: { + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProbingDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProbingDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + switch (message.abortCause) { + default: + return "abortCause: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + if (!$util.isInteger(message.sentProbeCount)) + return "sentProbeCount: integer expected"; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + if (!$util.isInteger(message.successfulProbeCount)) + return "successfulProbeCount: integer expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { + var error = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify(message.probingLatency); + if (error) + return "probingLatency." + error; + } + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); + if (error) + return "destinationEgressLocation." + error; + } + return null; + }; + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails + */ + ProbingDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "PROBING_RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "REACHABILITY_INCONSISTENT": + case 3: + message.result = 3; + break; + case "UNDETERMINED": + case 4: + message.result = 4; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + switch (object.abortCause) { + default: + if (typeof object.abortCause === "number") { + message.abortCause = object.abortCause; + break; + } + break; + case "PROBING_ABORT_CAUSE_UNSPECIFIED": + case 0: + message.abortCause = 0; + break; + case "PERMISSION_DENIED": + case 1: + message.abortCause = 1; + break; + case "NO_SOURCE_LOCATION": + case 2: + message.abortCause = 2; + break; + } + if (object.sentProbeCount != null) + message.sentProbeCount = object.sentProbeCount | 0; + if (object.successfulProbeCount != null) + message.successfulProbeCount = object.successfulProbeCount | 0; + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.probingLatency != null) { + if (typeof object.probingLatency !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.probingLatency: object expected"); + message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.fromObject(object.probingLatency); + } + if (object.destinationEgressLocation != null) { + if (typeof object.destinationEgressLocation !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.destinationEgressLocation: object expected"); + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); + } + return message; + }; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails} message ProbingDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProbingDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; + object.sentProbeCount = 0; + object.successfulProbeCount = 0; + object.endpointInfo = null; + object.probingLatency = null; + object.destinationEgressLocation = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + object.sentProbeCount = message.sentProbeCount; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + object.successfulProbeCount = message.successfulProbeCount; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) + object.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.toObject(message.probingLatency, options); + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) + object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); + return object; + }; + + /** + * Converts this ProbingDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + * @returns {Object.} JSON object + */ + ProbingDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProbingDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails"; + }; + + /** + * ProbingResult enum. + * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult + * @enum {number} + * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value + * @property {number} UNDETERMINED=4 UNDETERMINED value + */ + ProbingDetails.ProbingResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; + values[valuesById[4] = "UNDETERMINED"] = 4; + return values; + })(); + + /** + * ProbingAbortCause enum. + * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause + * @enum {number} + * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value + * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value + * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value + */ + ProbingDetails.ProbingAbortCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PERMISSION_DENIED"] = 1; + values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; + return values; + })(); + + ProbingDetails.EdgeLocation = (function() { + + /** + * Properties of an EdgeLocation. + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @interface IEdgeLocation + * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea + */ + + /** + * Constructs a new EdgeLocation. + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @classdesc Represents an EdgeLocation. + * @implements IEdgeLocation + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + */ + function EdgeLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EdgeLocation metropolitanArea. + * @member {string} metropolitanArea + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @instance + */ + EdgeLocation.prototype.metropolitanArea = ""; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation instance + */ + EdgeLocation.create = function create(properties) { + return new EdgeLocation(properties); + }; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); + return writer; + }; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metropolitanArea = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EdgeLocation message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EdgeLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + if (!$util.isString(message.metropolitanArea)) + return "metropolitanArea: string expected"; + return null; + }; + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation + */ + EdgeLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); + if (object.metropolitanArea != null) + message.metropolitanArea = String(object.metropolitanArea); + return message; + }; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} message EdgeLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EdgeLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metropolitanArea = ""; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + object.metropolitanArea = message.metropolitanArea; + return object; + }; + + /** + * Converts this EdgeLocation to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @instance + * @returns {Object.} JSON object + */ + EdgeLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EdgeLocation + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation"; + }; + + return EdgeLocation; + })(); + + return ProbingDetails; + })(); + + v1beta1.Trace = (function() { + + /** + * Properties of a Trace. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ITrace + * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo + * @property {Array.|null} [steps] Trace steps + * @property {number|null} [forwardTraceId] Trace forwardTraceId + */ + + /** + * Constructs a new Trace. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a Trace. + * @implements ITrace + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set + */ + function Trace(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trace endpointInfo. + * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + */ + Trace.prototype.endpointInfo = null; + + /** + * Trace steps. + * @member {Array.} steps + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + */ + Trace.prototype.steps = $util.emptyArray; + + /** + * Trace forwardTraceId. + * @member {number} forwardTraceId + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + */ + Trace.prototype.forwardTraceId = 0; + + /** + * Creates a new Trace instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace instance + */ + Trace.create = function create(properties) { + return new Trace(properties); + }; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); + return writer; + }; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.cloud.networkmanagement.v1beta1.Step.decode(reader, reader.uint32())); + break; + } + case 4: { + message.forwardTraceId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trace message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + if (!$util.isInteger(message.forwardTraceId)) + return "forwardTraceId: integer expected"; + return null; + }; + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace + */ + Trace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Trace) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: object expected"); + message.steps[i] = $root.google.cloud.networkmanagement.v1beta1.Step.fromObject(object.steps[i]); + } + } + if (object.forwardTraceId != null) + message.forwardTraceId = object.forwardTraceId | 0; + return message; + }; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.Trace} message Trace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) { + object.endpointInfo = null; + object.forwardTraceId = 0; + } + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.cloud.networkmanagement.v1beta1.Step.toObject(message.steps[j], options); + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + object.forwardTraceId = message.forwardTraceId; + return object; + }; + + /** + * Converts this Trace to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + * @returns {Object.} JSON object + */ + Trace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trace + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Trace"; + }; + + return Trace; + })(); + + v1beta1.Step = (function() { + + /** + * Properties of a Step. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IStep + * @property {string|null} [description] Step description + * @property {google.cloud.networkmanagement.v1beta1.Step.State|null} [state] Step state + * @property {boolean|null} [causesDrop] Step causesDrop + * @property {string|null} [projectId] Step projectId + * @property {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null} [instance] Step instance + * @property {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null} [firewall] Step firewall + * @property {google.cloud.networkmanagement.v1beta1.IRouteInfo|null} [route] Step route + * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpoint] Step endpoint + * @property {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null} [googleService] Step googleService + * @property {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule + * @property {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway + * @property {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel + * @property {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector + * @property {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null} [deliver] Step deliver + * @property {google.cloud.networkmanagement.v1beta1.IForwardInfo|null} [forward] Step forward + * @property {google.cloud.networkmanagement.v1beta1.IAbortInfo|null} [abort] Step abort + * @property {google.cloud.networkmanagement.v1beta1.IDropInfo|null} [drop] Step drop + * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer + * @property {google.cloud.networkmanagement.v1beta1.INetworkInfo|null} [network] Step network + * @property {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster + * @property {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance + * @property {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance + * @property {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null} [redisCluster] Step redisCluster + * @property {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction + * @property {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion + * @property {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision + * @property {google.cloud.networkmanagement.v1beta1.INatInfo|null} [nat] Step nat + * @property {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection + * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo + * @property {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null} [storageBucket] Step storageBucket + * @property {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg + */ + + /** + * Constructs a new Step. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set + */ + function Step(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Step description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.description = ""; + + /** + * Step state. + * @member {google.cloud.networkmanagement.v1beta1.Step.State} state + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.state = 0; + + /** + * Step causesDrop. + * @member {boolean} causesDrop + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.causesDrop = false; + + /** + * Step projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.projectId = ""; + + /** + * Step instance. + * @member {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null|undefined} instance + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.instance = null; + + /** + * Step firewall. + * @member {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null|undefined} firewall + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.firewall = null; + + /** + * Step route. + * @member {google.cloud.networkmanagement.v1beta1.IRouteInfo|null|undefined} route + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.route = null; + + /** + * Step endpoint. + * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpoint + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.endpoint = null; + + /** + * Step googleService. + * @member {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null|undefined} googleService + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.googleService = null; + + /** + * Step forwardingRule. + * @member {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null|undefined} forwardingRule + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.forwardingRule = null; + + /** + * Step vpnGateway. + * @member {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null|undefined} vpnGateway + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.vpnGateway = null; + + /** + * Step vpnTunnel. + * @member {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null|undefined} vpnTunnel + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.vpnTunnel = null; + + /** + * Step vpcConnector. + * @member {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null|undefined} vpcConnector + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.vpcConnector = null; + + /** + * Step deliver. + * @member {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null|undefined} deliver + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.deliver = null; + + /** + * Step forward. + * @member {google.cloud.networkmanagement.v1beta1.IForwardInfo|null|undefined} forward + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.forward = null; + + /** + * Step abort. + * @member {google.cloud.networkmanagement.v1beta1.IAbortInfo|null|undefined} abort + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.abort = null; + + /** + * Step drop. + * @member {google.cloud.networkmanagement.v1beta1.IDropInfo|null|undefined} drop + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.drop = null; + + /** + * Step loadBalancer. + * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null|undefined} loadBalancer + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.loadBalancer = null; + + /** + * Step network. + * @member {google.cloud.networkmanagement.v1beta1.INetworkInfo|null|undefined} network + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.network = null; + + /** + * Step gkeMaster. + * @member {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null|undefined} gkeMaster + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.gkeMaster = null; + + /** + * Step cloudSqlInstance. + * @member {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.cloudSqlInstance = null; + + /** + * Step redisInstance. + * @member {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null|undefined} redisInstance + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.redisInstance = null; + + /** + * Step redisCluster. + * @member {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null|undefined} redisCluster + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.redisCluster = null; + + /** + * Step cloudFunction. + * @member {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.cloudFunction = null; + + /** + * Step appEngineVersion. + * @member {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.appEngineVersion = null; + + /** + * Step cloudRunRevision. + * @member {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.cloudRunRevision = null; + + /** + * Step nat. + * @member {google.cloud.networkmanagement.v1beta1.INatInfo|null|undefined} nat + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.nat = null; + + /** + * Step proxyConnection. + * @member {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null|undefined} proxyConnection + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.proxyConnection = null; + + /** + * Step loadBalancerBackendInfo. + * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.loadBalancerBackendInfo = null; + + /** + * Step storageBucket. + * @member {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null|undefined} storageBucket + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.storageBucket = null; + + /** + * Step serverlessNeg. + * @member {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null|undefined} serverlessNeg + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.serverlessNeg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Step stepInfo. + * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Object.defineProperty(Step.prototype, "stepInfo", { + get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) + $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.route != null && Object.hasOwnProperty.call(message, "route")) + $root.google.cloud.networkmanagement.v1beta1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) + $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) + $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) + $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) + $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) + $root.google.cloud.networkmanagement.v1beta1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) + $root.google.cloud.networkmanagement.v1beta1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) + $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) + $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) + $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) + $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) + $root.google.cloud.networkmanagement.v1beta1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) + $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) + $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) + $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.causesDrop = reader.bool(); + break; + } + case 4: { + message.projectId = reader.string(); + break; + } + case 5: { + message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 24: { + message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.decode(reader, reader.uint32()); + break; + } + case 9: { + message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.decode(reader, reader.uint32()); + break; + } + case 10: { + message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.decode(reader, reader.uint32()); + break; + } + case 11: { + message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.decode(reader, reader.uint32()); + break; + } + case 21: { + message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.decode(reader, reader.uint32()); + break; + } + case 16: { + message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.decode(reader, reader.uint32()); + break; + } + case 17: { + message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.decode(reader, reader.uint32()); + break; + } + case 18: { + message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.decode(reader, reader.uint32()); + break; + } + case 19: { + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 30: { + message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 31: { + message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.decode(reader, reader.uint32()); + break; + } + case 20: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.decode(reader, reader.uint32()); + break; + } + case 22: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.decode(reader, reader.uint32()); + break; + } + case 27: { + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); + break; + } + case 28: { + message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.decode(reader, reader.uint32()); + break; + } + case 29: { + message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 27: + case 3: + case 21: + case 22: + case 32: + case 33: + case 23: + case 25: + case 26: + case 29: + case 30: + case 31: + case 4: + case 5: + case 6: + case 7: + case 28: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 24: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + break; + } + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + if (typeof message.causesDrop !== "boolean") + return "causesDrop: boolean expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.verify(message.instance); + if (error) + return "instance." + error; + } + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.verify(message.firewall); + if (error) + return "firewall." + error; + } + } + if (message.route != null && message.hasOwnProperty("route")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.verify(message.route); + if (error) + return "route." + error; + } + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpoint); + if (error) + return "endpoint." + error; + } + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify(message.googleService); + if (error) + return "googleService." + error; + } + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify(message.forwardingRule); + if (error) + return "forwardingRule." + error; + } + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify(message.vpnGateway); + if (error) + return "vpnGateway." + error; + } + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify(message.vpnTunnel); + if (error) + return "vpnTunnel." + error; + } + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify(message.vpcConnector); + if (error) + return "vpcConnector." + error; + } + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.verify(message.deliver); + if (error) + return "deliver." + error; + } + } + if (message.forward != null && message.hasOwnProperty("forward")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.verify(message.forward); + if (error) + return "forward." + error; + } + } + if (message.abort != null && message.hasOwnProperty("abort")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.verify(message.abort); + if (error) + return "abort." + error; + } + } + if (message.drop != null && message.hasOwnProperty("drop")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.DropInfo.verify(message.drop); + if (error) + return "drop." + error; + } + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify(message.loadBalancer); + if (error) + return "loadBalancer." + error; + } + } + if (message.network != null && message.hasOwnProperty("network")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.verify(message.network); + if (error) + return "network." + error; + } + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify(message.gkeMaster); + if (error) + return "gkeMaster." + error; + } + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); + if (error) + return "cloudSqlInstance." + error; + } + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify(message.redisInstance); + if (error) + return "redisInstance." + error; + } + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify(message.redisCluster); + if (error) + return "redisCluster." + error; + } + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + } + if (message.nat != null && message.hasOwnProperty("nat")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.NatInfo.verify(message.nat); + if (error) + return "nat." + error; + } + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify(message.proxyConnection); + if (error) + return "proxyConnection." + error; + } + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); + if (error) + return "loadBalancerBackendInfo." + error; + } + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify(message.storageBucket); + if (error) + return "storageBucket." + error; + } + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify(message.serverlessNeg); + if (error) + return "serverlessNeg." + error; + } + } + return null; + }; + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Step) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Step(); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "START_FROM_INSTANCE": + case 1: + message.state = 1; + break; + case "START_FROM_INTERNET": + case 2: + message.state = 2; + break; + case "START_FROM_GOOGLE_SERVICE": + case 27: + message.state = 27; + break; + case "START_FROM_PRIVATE_NETWORK": + case 3: + message.state = 3; + break; + case "START_FROM_GKE_MASTER": + case 21: + message.state = 21; + break; + case "START_FROM_CLOUD_SQL_INSTANCE": + case 22: + message.state = 22; + break; + case "START_FROM_REDIS_INSTANCE": + case 32: + message.state = 32; + break; + case "START_FROM_REDIS_CLUSTER": + case 33: + message.state = 33; + break; + case "START_FROM_CLOUD_FUNCTION": + case 23: + message.state = 23; + break; + case "START_FROM_APP_ENGINE_VERSION": + case 25: + message.state = 25; + break; + case "START_FROM_CLOUD_RUN_REVISION": + case 26: + message.state = 26; + break; + case "START_FROM_STORAGE_BUCKET": + case 29: + message.state = 29; + break; + case "START_FROM_PSC_PUBLISHED_SERVICE": + case 30: + message.state = 30; + break; + case "START_FROM_SERVERLESS_NEG": + case 31: + message.state = 31; + break; + case "APPLY_INGRESS_FIREWALL_RULE": + case 4: + message.state = 4; + break; + case "APPLY_EGRESS_FIREWALL_RULE": + case 5: + message.state = 5; + break; + case "APPLY_ROUTE": + case 6: + message.state = 6; + break; + case "APPLY_FORWARDING_RULE": + case 7: + message.state = 7; + break; + case "ANALYZE_LOAD_BALANCER_BACKEND": + case 28: + message.state = 28; + break; + case "SPOOFING_APPROVED": + case 8: + message.state = 8; + break; + case "ARRIVE_AT_INSTANCE": + case 9: + message.state = 9; + break; + case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": + case 10: + message.state = 10; + break; + case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": + case 11: + message.state = 11; + break; + case "ARRIVE_AT_VPN_GATEWAY": + case 12: + message.state = 12; + break; + case "ARRIVE_AT_VPN_TUNNEL": + case 13: + message.state = 13; + break; + case "ARRIVE_AT_VPC_CONNECTOR": + case 24: + message.state = 24; + break; + case "NAT": + case 14: + message.state = 14; + break; + case "PROXY_CONNECTION": + case 15: + message.state = 15; + break; + case "DELIVER": + case 16: + message.state = 16; + break; + case "DROP": + case 17: + message.state = 17; + break; + case "FORWARD": + case 18: + message.state = 18; + break; + case "ABORT": + case 19: + message.state = 19; + break; + case "VIEWER_PERMISSION_MISSING": + case 20: + message.state = 20; + break; + } + if (object.causesDrop != null) + message.causesDrop = Boolean(object.causesDrop); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.instance: object expected"); + message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.fromObject(object.instance); + } + if (object.firewall != null) { + if (typeof object.firewall !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.firewall: object expected"); + message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.fromObject(object.firewall); + } + if (object.route != null) { + if (typeof object.route !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.route: object expected"); + message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.fromObject(object.route); + } + if (object.endpoint != null) { + if (typeof object.endpoint !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.endpoint: object expected"); + message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpoint); + } + if (object.googleService != null) { + if (typeof object.googleService !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.googleService: object expected"); + message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.fromObject(object.googleService); + } + if (object.forwardingRule != null) { + if (typeof object.forwardingRule !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forwardingRule: object expected"); + message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.fromObject(object.forwardingRule); + } + if (object.vpnGateway != null) { + if (typeof object.vpnGateway !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnGateway: object expected"); + message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.fromObject(object.vpnGateway); + } + if (object.vpnTunnel != null) { + if (typeof object.vpnTunnel !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnTunnel: object expected"); + message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.fromObject(object.vpnTunnel); + } + if (object.vpcConnector != null) { + if (typeof object.vpcConnector !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpcConnector: object expected"); + message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.fromObject(object.vpcConnector); + } + if (object.deliver != null) { + if (typeof object.deliver !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.deliver: object expected"); + message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.fromObject(object.deliver); + } + if (object.forward != null) { + if (typeof object.forward !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forward: object expected"); + message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.fromObject(object.forward); + } + if (object.abort != null) { + if (typeof object.abort !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.abort: object expected"); + message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.fromObject(object.abort); + } + if (object.drop != null) { + if (typeof object.drop !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.drop: object expected"); + message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.fromObject(object.drop); + } + if (object.loadBalancer != null) { + if (typeof object.loadBalancer !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancer: object expected"); + message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.fromObject(object.loadBalancer); + } + if (object.network != null) { + if (typeof object.network !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.network: object expected"); + message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.fromObject(object.network); + } + if (object.gkeMaster != null) { + if (typeof object.gkeMaster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.gkeMaster: object expected"); + message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.fromObject(object.gkeMaster); + } + if (object.cloudSqlInstance != null) { + if (typeof object.cloudSqlInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudSqlInstance: object expected"); + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); + } + if (object.redisInstance != null) { + if (typeof object.redisInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisInstance: object expected"); + message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.fromObject(object.redisInstance); + } + if (object.redisCluster != null) { + if (typeof object.redisCluster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisCluster: object expected"); + message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.fromObject(object.redisCluster); + } + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); + } + if (object.nat != null) { + if (typeof object.nat !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.nat: object expected"); + message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.fromObject(object.nat); + } + if (object.proxyConnection != null) { + if (typeof object.proxyConnection !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.proxyConnection: object expected"); + message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.fromObject(object.proxyConnection); + } + if (object.loadBalancerBackendInfo != null) { + if (typeof object.loadBalancerBackendInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancerBackendInfo: object expected"); + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); + } + if (object.storageBucket != null) { + if (typeof object.storageBucket !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.storageBucket: object expected"); + message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.fromObject(object.storageBucket); + } + if (object.serverlessNeg != null) { + if (typeof object.serverlessNeg !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.serverlessNeg: object expected"); + message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.fromObject(object.serverlessNeg); + } + return message; + }; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.causesDrop = false; + object.projectId = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] : message.state; + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + object.causesDrop = message.causesDrop; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instance != null && message.hasOwnProperty("instance")) { + object.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.toObject(message.instance, options); + if (options.oneofs) + object.stepInfo = "instance"; + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + object.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.toObject(message.firewall, options); + if (options.oneofs) + object.stepInfo = "firewall"; + } + if (message.route != null && message.hasOwnProperty("route")) { + object.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.toObject(message.route, options); + if (options.oneofs) + object.stepInfo = "route"; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + object.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpoint, options); + if (options.oneofs) + object.stepInfo = "endpoint"; + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + object.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.toObject(message.forwardingRule, options); + if (options.oneofs) + object.stepInfo = "forwardingRule"; + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + object.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.toObject(message.vpnGateway, options); + if (options.oneofs) + object.stepInfo = "vpnGateway"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + object.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.toObject(message.vpnTunnel, options); + if (options.oneofs) + object.stepInfo = "vpnTunnel"; + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + object.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.toObject(message.deliver, options); + if (options.oneofs) + object.stepInfo = "deliver"; + } + if (message.forward != null && message.hasOwnProperty("forward")) { + object.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.toObject(message.forward, options); + if (options.oneofs) + object.stepInfo = "forward"; + } + if (message.abort != null && message.hasOwnProperty("abort")) { + object.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.toObject(message.abort, options); + if (options.oneofs) + object.stepInfo = "abort"; + } + if (message.drop != null && message.hasOwnProperty("drop")) { + object.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.toObject(message.drop, options); + if (options.oneofs) + object.stepInfo = "drop"; + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + object.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.toObject(message.loadBalancer, options); + if (options.oneofs) + object.stepInfo = "loadBalancer"; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.toObject(message.network, options); + if (options.oneofs) + object.stepInfo = "network"; + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + object.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.toObject(message.gkeMaster, options); + if (options.oneofs) + object.stepInfo = "gkeMaster"; + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); + if (options.oneofs) + object.stepInfo = "cloudSqlInstance"; + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.toObject(message.cloudFunction, options); + if (options.oneofs) + object.stepInfo = "cloudFunction"; + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + object.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.toObject(message.vpcConnector, options); + if (options.oneofs) + object.stepInfo = "vpcConnector"; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); + if (options.oneofs) + object.stepInfo = "appEngineVersion"; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); + if (options.oneofs) + object.stepInfo = "cloudRunRevision"; + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + object.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.toObject(message.googleService, options); + if (options.oneofs) + object.stepInfo = "googleService"; + } + if (message.nat != null && message.hasOwnProperty("nat")) { + object.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.toObject(message.nat, options); + if (options.oneofs) + object.stepInfo = "nat"; + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + object.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.toObject(message.proxyConnection, options); + if (options.oneofs) + object.stepInfo = "proxyConnection"; + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); + if (options.oneofs) + object.stepInfo = "loadBalancerBackendInfo"; + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + object.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.toObject(message.storageBucket, options); + if (options.oneofs) + object.stepInfo = "storageBucket"; + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + object.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.toObject(message.serverlessNeg, options); + if (options.oneofs) + object.stepInfo = "serverlessNeg"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + object.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.toObject(message.redisInstance, options); + if (options.oneofs) + object.stepInfo = "redisInstance"; + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + object.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.toObject(message.redisCluster, options); + if (options.oneofs) + object.stepInfo = "redisCluster"; + } + return object; + }; + + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Step + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Step"; + }; + + /** + * State enum. + * @name google.cloud.networkmanagement.v1beta1.Step.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value + * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value + * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value + * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value + * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value + * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value + * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value + * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value + * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value + * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value + * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value + * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value + * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value + * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value + * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value + * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value + * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value + * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value + * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value + * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value + * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value + * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value + * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value + * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value + * @property {number} NAT=14 NAT value + * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value + * @property {number} DELIVER=16 DELIVER value + * @property {number} DROP=17 DROP value + * @property {number} FORWARD=18 FORWARD value + * @property {number} ABORT=19 ABORT value + * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value + */ + Step.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START_FROM_INSTANCE"] = 1; + values[valuesById[2] = "START_FROM_INTERNET"] = 2; + values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; + values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; + values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; + values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; + values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; + values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; + values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; + values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; + values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; + values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; + values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; + values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; + values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; + values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; + values[valuesById[6] = "APPLY_ROUTE"] = 6; + values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; + values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; + values[valuesById[8] = "SPOOFING_APPROVED"] = 8; + values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; + values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; + values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; + values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; + values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; + values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; + values[valuesById[14] = "NAT"] = 14; + values[valuesById[15] = "PROXY_CONNECTION"] = 15; + values[valuesById[16] = "DELIVER"] = 16; + values[valuesById[17] = "DROP"] = 17; + values[valuesById[18] = "FORWARD"] = 18; + values[valuesById[19] = "ABORT"] = 19; + values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; + return values; + })(); + + return Step; + })(); + + v1beta1.InstanceInfo = (function() { + + /** + * Properties of an InstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IInstanceInfo + * @property {string|null} [displayName] InstanceInfo displayName + * @property {string|null} [uri] InstanceInfo uri + * @property {string|null} ["interface"] InstanceInfo interface + * @property {string|null} [networkUri] InstanceInfo networkUri + * @property {string|null} [internalIp] InstanceInfo internalIp + * @property {string|null} [externalIp] InstanceInfo externalIp + * @property {Array.|null} [networkTags] InstanceInfo networkTags + * @property {string|null} [serviceAccount] InstanceInfo serviceAccount + * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri + */ + + /** + * Constructs a new InstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an InstanceInfo. + * @implements IInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set + */ + function InstanceInfo(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.displayName = ""; + + /** + * InstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.uri = ""; + + /** + * InstanceInfo interface. + * @member {string} interface + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype["interface"] = ""; + + /** + * InstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkUri = ""; + + /** + * InstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.internalIp = ""; + + /** + * InstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.externalIp = ""; + + /** + * InstanceInfo networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkTags = $util.emptyArray; + + /** + * InstanceInfo serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.serviceAccount = ""; + + /** + * InstanceInfo pscNetworkAttachmentUri. + * @member {string} pscNetworkAttachmentUri + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.pscNetworkAttachmentUri = ""; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo instance + */ + InstanceInfo.create = function create(properties) { + return new InstanceInfo(properties); + }; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); + if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); + return writer; + }; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message["interface"] = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + case 8: { + message.serviceAccount = reader.string(); + break; + } + case 9: { + message.pscNetworkAttachmentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message["interface"] != null && message.hasOwnProperty("interface")) + if (!$util.isString(message["interface"])) + return "interface: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + if (!$util.isString(message.pscNetworkAttachmentUri)) + return "pscNetworkAttachmentUri: string expected"; + return null; + }; + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo + */ + InstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.InstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object["interface"] != null) + message["interface"] = String(object["interface"]); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.InstanceInfo.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.pscNetworkAttachmentUri != null) + message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); + return message; + }; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.InstanceInfo} message InstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object["interface"] = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.serviceAccount = ""; + object.pscNetworkAttachmentUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message["interface"] != null && message.hasOwnProperty("interface")) + object["interface"] = message["interface"]; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; + return object; + }; + + /** + * Converts this InstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + * @returns {Object.} JSON object + */ + InstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.InstanceInfo"; + }; + + return InstanceInfo; + })(); + + v1beta1.NetworkInfo = (function() { + + /** + * Properties of a NetworkInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface INetworkInfo + * @property {string|null} [displayName] NetworkInfo displayName + * @property {string|null} [uri] NetworkInfo uri + * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri + * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange + * @property {string|null} [region] NetworkInfo region + */ + + /** + * Constructs a new NetworkInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a NetworkInfo. + * @implements INetworkInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set + */ + function NetworkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.displayName = ""; + + /** + * NetworkInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.uri = ""; + + /** + * NetworkInfo matchedSubnetUri. + * @member {string} matchedSubnetUri + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedSubnetUri = ""; + + /** + * NetworkInfo matchedIpRange. + * @member {string} matchedIpRange + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedIpRange = ""; + + /** + * NetworkInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.region = ""; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo instance + */ + NetworkInfo.create = function create(properties) { + return new NetworkInfo(properties); + }; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); + if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 5: { + message.matchedSubnetUri = reader.string(); + break; + } + case 4: { + message.matchedIpRange = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + if (!$util.isString(message.matchedSubnetUri)) + return "matchedSubnetUri: string expected"; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + if (!$util.isString(message.matchedIpRange)) + return "matchedIpRange: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo + */ + NetworkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NetworkInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedSubnetUri != null) + message.matchedSubnetUri = String(object.matchedSubnetUri); + if (object.matchedIpRange != null) + message.matchedIpRange = String(object.matchedIpRange); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.NetworkInfo} message NetworkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedIpRange = ""; + object.matchedSubnetUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + object.matchedIpRange = message.matchedIpRange; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + object.matchedSubnetUri = message.matchedSubnetUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this NetworkInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + * @returns {Object.} JSON object + */ + NetworkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NetworkInfo"; + }; + + return NetworkInfo; + })(); + + v1beta1.FirewallInfo = (function() { + + /** + * Properties of a FirewallInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IFirewallInfo + * @property {string|null} [displayName] FirewallInfo displayName + * @property {string|null} [uri] FirewallInfo uri + * @property {string|null} [direction] FirewallInfo direction + * @property {string|null} [action] FirewallInfo action + * @property {number|null} [priority] FirewallInfo priority + * @property {string|null} [networkUri] FirewallInfo networkUri + * @property {Array.|null} [targetTags] FirewallInfo targetTags + * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts + * @property {string|null} [policy] FirewallInfo policy + * @property {string|null} [policyUri] FirewallInfo policyUri + * @property {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType + */ + + /** + * Constructs a new FirewallInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a FirewallInfo. + * @implements IFirewallInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set + */ + function FirewallInfo(properties) { + this.targetTags = []; + this.targetServiceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirewallInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.displayName = ""; + + /** + * FirewallInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.uri = ""; + + /** + * FirewallInfo direction. + * @member {string} direction + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.direction = ""; + + /** + * FirewallInfo action. + * @member {string} action + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.action = ""; + + /** + * FirewallInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.priority = 0; + + /** + * FirewallInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.networkUri = ""; + + /** + * FirewallInfo targetTags. + * @member {Array.} targetTags + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetTags = $util.emptyArray; + + /** + * FirewallInfo targetServiceAccounts. + * @member {Array.} targetServiceAccounts + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; + + /** + * FirewallInfo policy. + * @member {string} policy + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policy = ""; + + /** + * FirewallInfo policyUri. + * @member {string} policyUri + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policyUri = ""; + + /** + * FirewallInfo firewallRuleType. + * @member {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType} firewallRuleType + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.firewallRuleType = 0; + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo instance + */ + FirewallInfo.create = function create(properties) { + return new FirewallInfo(properties); + }; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); + if (message.targetTags != null && message.targetTags.length) + for (var i = 0; i < message.targetTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); + if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); + if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); + if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); + return writer; + }; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.direction = reader.string(); + break; + } + case 4: { + message.action = reader.string(); + break; + } + case 5: { + message.priority = reader.int32(); + break; + } + case 6: { + message.networkUri = reader.string(); + break; + } + case 7: { + if (!(message.targetTags && message.targetTags.length)) + message.targetTags = []; + message.targetTags.push(reader.string()); + break; + } + case 8: { + if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) + message.targetServiceAccounts = []; + message.targetServiceAccounts.push(reader.string()); + break; + } + case 9: { + message.policy = reader.string(); + break; + } + case 11: { + message.policyUri = reader.string(); + break; + } + case 10: { + message.firewallRuleType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirewallInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirewallInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + if (!$util.isString(message.direction)) + return "direction: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.targetTags != null && message.hasOwnProperty("targetTags")) { + if (!Array.isArray(message.targetTags)) + return "targetTags: array expected"; + for (var i = 0; i < message.targetTags.length; ++i) + if (!$util.isString(message.targetTags[i])) + return "targetTags: string[] expected"; + } + if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { + if (!Array.isArray(message.targetServiceAccounts)) + return "targetServiceAccounts: array expected"; + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + if (!$util.isString(message.targetServiceAccounts[i])) + return "targetServiceAccounts: string[] expected"; + } + if (message.policy != null && message.hasOwnProperty("policy")) + if (!$util.isString(message.policy)) + return "policy: string expected"; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + if (!$util.isString(message.policyUri)) + return "policyUri: string expected"; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + switch (message.firewallRuleType) { + default: + return "firewallRuleType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 100: + case 101: + break; + } + return null; + }; + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo + */ + FirewallInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.FirewallInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.direction != null) + message.direction = String(object.direction); + if (object.action != null) + message.action = String(object.action); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.targetTags) { + if (!Array.isArray(object.targetTags)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetTags: array expected"); + message.targetTags = []; + for (var i = 0; i < object.targetTags.length; ++i) + message.targetTags[i] = String(object.targetTags[i]); + } + if (object.targetServiceAccounts) { + if (!Array.isArray(object.targetServiceAccounts)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetServiceAccounts: array expected"); + message.targetServiceAccounts = []; + for (var i = 0; i < object.targetServiceAccounts.length; ++i) + message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); + } + if (object.policy != null) + message.policy = String(object.policy); + if (object.policyUri != null) + message.policyUri = String(object.policyUri); + switch (object.firewallRuleType) { + default: + if (typeof object.firewallRuleType === "number") { + message.firewallRuleType = object.firewallRuleType; + break; + } + break; + case "FIREWALL_RULE_TYPE_UNSPECIFIED": + case 0: + message.firewallRuleType = 0; + break; + case "HIERARCHICAL_FIREWALL_POLICY_RULE": + case 1: + message.firewallRuleType = 1; + break; + case "VPC_FIREWALL_RULE": + case 2: + message.firewallRuleType = 2; + break; + case "IMPLIED_VPC_FIREWALL_RULE": + case 3: + message.firewallRuleType = 3; + break; + case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": + case 4: + message.firewallRuleType = 4; + break; + case "NETWORK_FIREWALL_POLICY_RULE": + case 5: + message.firewallRuleType = 5; + break; + case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": + case 6: + message.firewallRuleType = 6; + break; + case "UNSUPPORTED_FIREWALL_POLICY_RULE": + case 100: + message.firewallRuleType = 100; + break; + case "TRACKING_STATE": + case 101: + message.firewallRuleType = 101; + break; + } + return message; + }; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.FirewallInfo} message FirewallInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirewallInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetTags = []; + object.targetServiceAccounts = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.direction = ""; + object.action = ""; + object.priority = 0; + object.networkUri = ""; + object.policy = ""; + object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; + object.policyUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = message.direction; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.targetTags && message.targetTags.length) { + object.targetTags = []; + for (var j = 0; j < message.targetTags.length; ++j) + object.targetTags[j] = message.targetTags[j]; + } + if (message.targetServiceAccounts && message.targetServiceAccounts.length) { + object.targetServiceAccounts = []; + for (var j = 0; j < message.targetServiceAccounts.length; ++j) + object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; + } + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = message.policy; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + object.policyUri = message.policyUri; + return object; + }; + + /** + * Converts this FirewallInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + * @returns {Object.} JSON object + */ + FirewallInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirewallInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.FirewallInfo"; + }; + + /** + * FirewallRuleType enum. + * @name google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType + * @enum {number} + * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value + * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value + * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value + * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value + * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value + * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value + * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value + * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value + * @property {number} TRACKING_STATE=101 TRACKING_STATE value + */ + FirewallInfo.FirewallRuleType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; + values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; + values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; + values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; + values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; + values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; + values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; + values[valuesById[101] = "TRACKING_STATE"] = 101; + return values; + })(); + + return FirewallInfo; + })(); + + v1beta1.RouteInfo = (function() { + + /** + * Properties of a RouteInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRouteInfo + * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType + * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType + * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope + * @property {string|null} [displayName] RouteInfo displayName + * @property {string|null} [uri] RouteInfo uri + * @property {string|null} [region] RouteInfo region + * @property {string|null} [destIpRange] RouteInfo destIpRange + * @property {string|null} [nextHop] RouteInfo nextHop + * @property {string|null} [networkUri] RouteInfo networkUri + * @property {number|null} [priority] RouteInfo priority + * @property {Array.|null} [instanceTags] RouteInfo instanceTags + * @property {string|null} [srcIpRange] RouteInfo srcIpRange + * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges + * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges + * @property {Array.|null} [protocols] RouteInfo protocols + * @property {string|null} [nccHubUri] RouteInfo nccHubUri + * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri + * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri + * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri + */ + + /** + * Constructs a new RouteInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RouteInfo. + * @implements IRouteInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set + */ + function RouteInfo(properties) { + this.instanceTags = []; + this.destPortRanges = []; + this.srcPortRanges = []; + this.protocols = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RouteInfo routeType. + * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType} routeType + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeType = 0; + + /** + * RouteInfo nextHopType. + * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType} nextHopType + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHopType = 0; + + /** + * RouteInfo routeScope. + * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope} routeScope + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeScope = 0; + + /** + * RouteInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.displayName = ""; + + /** + * RouteInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.uri = ""; + + /** + * RouteInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.region = ""; + + /** + * RouteInfo destIpRange. + * @member {string} destIpRange + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.destIpRange = ""; + + /** + * RouteInfo nextHop. + * @member {string} nextHop + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHop = ""; + + /** + * RouteInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.networkUri = ""; + + /** + * RouteInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.priority = 0; + + /** + * RouteInfo instanceTags. + * @member {Array.} instanceTags + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.instanceTags = $util.emptyArray; + + /** + * RouteInfo srcIpRange. + * @member {string} srcIpRange + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcIpRange = ""; + + /** + * RouteInfo destPortRanges. + * @member {Array.} destPortRanges + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.destPortRanges = $util.emptyArray; + + /** + * RouteInfo srcPortRanges. + * @member {Array.} srcPortRanges + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcPortRanges = $util.emptyArray; + + /** + * RouteInfo protocols. + * @member {Array.} protocols + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.protocols = $util.emptyArray; + + /** + * RouteInfo nccHubUri. + * @member {string|null|undefined} nccHubUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccHubUri = null; + + /** + * RouteInfo nccSpokeUri. + * @member {string|null|undefined} nccSpokeUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccSpokeUri = null; + + /** + * RouteInfo advertisedRouteSourceRouterUri. + * @member {string|null|undefined} advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteSourceRouterUri = null; + + /** + * RouteInfo advertisedRouteNextHopUri. + * @member {string|null|undefined} advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteNextHopUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RouteInfo _nccHubUri. + * @member {"nccHubUri"|undefined} _nccHubUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { + get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _nccSpokeUri. + * @member {"nccSpokeUri"|undefined} _nccSpokeUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { + get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteSourceRouterUri. + * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteNextHopUri. + * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RouteInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo instance + */ + RouteInfo.create = function create(properties) { + return new RouteInfo(properties); + }; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); + if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); + if (message.instanceTags != null && message.instanceTags.length) + for (var i = 0; i < message.instanceTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); + if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); + if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); + if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); + if (message.destPortRanges != null && message.destPortRanges.length) + for (var i = 0; i < message.destPortRanges.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); + if (message.srcPortRanges != null && message.srcPortRanges.length) + for (var i = 0; i < message.srcPortRanges.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); + if (message.protocols != null && message.protocols.length) + for (var i = 0; i < message.protocols.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); + if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); + if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); + if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); + if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); + if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); + return writer; + }; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: { + message.routeType = reader.int32(); + break; + } + case 9: { + message.nextHopType = reader.int32(); + break; + } + case 14: { + message.routeScope = reader.int32(); + break; + } + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 19: { + message.region = reader.string(); + break; + } + case 3: { + message.destIpRange = reader.string(); + break; + } + case 4: { + message.nextHop = reader.string(); + break; + } + case 5: { + message.networkUri = reader.string(); + break; + } + case 6: { + message.priority = reader.int32(); + break; + } + case 7: { + if (!(message.instanceTags && message.instanceTags.length)) + message.instanceTags = []; + message.instanceTags.push(reader.string()); + break; + } + case 10: { + message.srcIpRange = reader.string(); + break; + } + case 11: { + if (!(message.destPortRanges && message.destPortRanges.length)) + message.destPortRanges = []; + message.destPortRanges.push(reader.string()); + break; + } + case 12: { + if (!(message.srcPortRanges && message.srcPortRanges.length)) + message.srcPortRanges = []; + message.srcPortRanges.push(reader.string()); + break; + } + case 13: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + message.protocols.push(reader.string()); + break; + } + case 15: { + message.nccHubUri = reader.string(); + break; + } + case 16: { + message.nccSpokeUri = reader.string(); + break; + } + case 17: { + message.advertisedRouteSourceRouterUri = reader.string(); + break; + } + case 18: { + message.advertisedRouteNextHopUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RouteInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RouteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.routeType != null && message.hasOwnProperty("routeType")) + switch (message.routeType) { + default: + return "routeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 101: + break; + } + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + switch (message.nextHopType) { + default: + return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) + switch (message.routeScope) { + default: + return "routeScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + if (!$util.isString(message.destIpRange)) + return "destIpRange: string expected"; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + if (!$util.isString(message.nextHop)) + return "nextHop: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { + if (!Array.isArray(message.instanceTags)) + return "instanceTags: array expected"; + for (var i = 0; i < message.instanceTags.length; ++i) + if (!$util.isString(message.instanceTags[i])) + return "instanceTags: string[] expected"; + } + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + if (!$util.isString(message.srcIpRange)) + return "srcIpRange: string expected"; + if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { + if (!Array.isArray(message.destPortRanges)) + return "destPortRanges: array expected"; + for (var i = 0; i < message.destPortRanges.length; ++i) + if (!$util.isString(message.destPortRanges[i])) + return "destPortRanges: string[] expected"; + } + if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { + if (!Array.isArray(message.srcPortRanges)) + return "srcPortRanges: array expected"; + for (var i = 0; i < message.srcPortRanges.length; ++i) + if (!$util.isString(message.srcPortRanges[i])) + return "srcPortRanges: string[] expected"; + } + if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (!Array.isArray(message.protocols)) + return "protocols: array expected"; + for (var i = 0; i < message.protocols.length; ++i) + if (!$util.isString(message.protocols[i])) + return "protocols: string[] expected"; + } + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + properties._nccHubUri = 1; + if (!$util.isString(message.nccHubUri)) + return "nccHubUri: string expected"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + properties._nccSpokeUri = 1; + if (!$util.isString(message.nccSpokeUri)) + return "nccSpokeUri: string expected"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + properties._advertisedRouteSourceRouterUri = 1; + if (!$util.isString(message.advertisedRouteSourceRouterUri)) + return "advertisedRouteSourceRouterUri: string expected"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + properties._advertisedRouteNextHopUri = 1; + if (!$util.isString(message.advertisedRouteNextHopUri)) + return "advertisedRouteNextHopUri: string expected"; + } + return null; + }; + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo + */ + RouteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RouteInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); + switch (object.routeType) { + default: + if (typeof object.routeType === "number") { + message.routeType = object.routeType; + break; + } + break; + case "ROUTE_TYPE_UNSPECIFIED": + case 0: + message.routeType = 0; + break; + case "SUBNET": + case 1: + message.routeType = 1; + break; + case "STATIC": + case 2: + message.routeType = 2; + break; + case "DYNAMIC": + case 3: + message.routeType = 3; + break; + case "PEERING_SUBNET": + case 4: + message.routeType = 4; + break; + case "PEERING_STATIC": + case 5: + message.routeType = 5; + break; + case "PEERING_DYNAMIC": + case 6: + message.routeType = 6; + break; + case "POLICY_BASED": + case 7: + message.routeType = 7; + break; + case "ADVERTISED": + case 101: + message.routeType = 101; + break; + } + switch (object.nextHopType) { + default: + if (typeof object.nextHopType === "number") { + message.nextHopType = object.nextHopType; + break; + } + break; + case "NEXT_HOP_TYPE_UNSPECIFIED": + case 0: + message.nextHopType = 0; + break; + case "NEXT_HOP_IP": + case 1: + message.nextHopType = 1; + break; + case "NEXT_HOP_INSTANCE": + case 2: + message.nextHopType = 2; + break; + case "NEXT_HOP_NETWORK": + case 3: + message.nextHopType = 3; + break; + case "NEXT_HOP_PEERING": + case 4: + message.nextHopType = 4; + break; + case "NEXT_HOP_INTERCONNECT": + case 5: + message.nextHopType = 5; + break; + case "NEXT_HOP_VPN_TUNNEL": + case 6: + message.nextHopType = 6; + break; + case "NEXT_HOP_VPN_GATEWAY": + case 7: + message.nextHopType = 7; + break; + case "NEXT_HOP_INTERNET_GATEWAY": + case 8: + message.nextHopType = 8; + break; + case "NEXT_HOP_BLACKHOLE": + case 9: + message.nextHopType = 9; + break; + case "NEXT_HOP_ILB": + case 10: + message.nextHopType = 10; + break; + case "NEXT_HOP_ROUTER_APPLIANCE": + case 11: + message.nextHopType = 11; + break; + case "NEXT_HOP_NCC_HUB": + case 12: + message.nextHopType = 12; + break; + } + switch (object.routeScope) { + default: + if (typeof object.routeScope === "number") { + message.routeScope = object.routeScope; + break; + } + break; + case "ROUTE_SCOPE_UNSPECIFIED": + case 0: + message.routeScope = 0; + break; + case "NETWORK": + case 1: + message.routeScope = 1; + break; + case "NCC_HUB": + case 2: + message.routeScope = 2; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.region != null) + message.region = String(object.region); + if (object.destIpRange != null) + message.destIpRange = String(object.destIpRange); + if (object.nextHop != null) + message.nextHop = String(object.nextHop); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.instanceTags) { + if (!Array.isArray(object.instanceTags)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.instanceTags: array expected"); + message.instanceTags = []; + for (var i = 0; i < object.instanceTags.length; ++i) + message.instanceTags[i] = String(object.instanceTags[i]); + } + if (object.srcIpRange != null) + message.srcIpRange = String(object.srcIpRange); + if (object.destPortRanges) { + if (!Array.isArray(object.destPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.destPortRanges: array expected"); + message.destPortRanges = []; + for (var i = 0; i < object.destPortRanges.length; ++i) + message.destPortRanges[i] = String(object.destPortRanges[i]); + } + if (object.srcPortRanges) { + if (!Array.isArray(object.srcPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.srcPortRanges: array expected"); + message.srcPortRanges = []; + for (var i = 0; i < object.srcPortRanges.length; ++i) + message.srcPortRanges[i] = String(object.srcPortRanges[i]); + } + if (object.protocols) { + if (!Array.isArray(object.protocols)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.protocols: array expected"); + message.protocols = []; + for (var i = 0; i < object.protocols.length; ++i) + message.protocols[i] = String(object.protocols[i]); + } + if (object.nccHubUri != null) + message.nccHubUri = String(object.nccHubUri); + if (object.nccSpokeUri != null) + message.nccSpokeUri = String(object.nccSpokeUri); + if (object.advertisedRouteSourceRouterUri != null) + message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); + if (object.advertisedRouteNextHopUri != null) + message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); + return message; + }; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.RouteInfo} message RouteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RouteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.instanceTags = []; + object.destPortRanges = []; + object.srcPortRanges = []; + object.protocols = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.destIpRange = ""; + object.nextHop = ""; + object.networkUri = ""; + object.priority = 0; + object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; + object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; + object.srcIpRange = ""; + object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + object.destIpRange = message.destIpRange; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + object.nextHop = message.nextHop; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.instanceTags && message.instanceTags.length) { + object.instanceTags = []; + for (var j = 0; j < message.instanceTags.length; ++j) + object.instanceTags[j] = message.instanceTags[j]; + } + if (message.routeType != null && message.hasOwnProperty("routeType")) + object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] : message.routeType; + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + object.srcIpRange = message.srcIpRange; + if (message.destPortRanges && message.destPortRanges.length) { + object.destPortRanges = []; + for (var j = 0; j < message.destPortRanges.length; ++j) + object.destPortRanges[j] = message.destPortRanges[j]; + } + if (message.srcPortRanges && message.srcPortRanges.length) { + object.srcPortRanges = []; + for (var j = 0; j < message.srcPortRanges.length; ++j) + object.srcPortRanges[j] = message.srcPortRanges[j]; + } + if (message.protocols && message.protocols.length) { + object.protocols = []; + for (var j = 0; j < message.protocols.length; ++j) + object.protocols[j] = message.protocols[j]; + } + if (message.routeScope != null && message.hasOwnProperty("routeScope")) + object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + object.nccHubUri = message.nccHubUri; + if (options.oneofs) + object._nccHubUri = "nccHubUri"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + object.nccSpokeUri = message.nccSpokeUri; + if (options.oneofs) + object._nccSpokeUri = "nccSpokeUri"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; + if (options.oneofs) + object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; + if (options.oneofs) + object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; + } + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RouteInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + * @returns {Object.} JSON object + */ + RouteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RouteInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RouteInfo"; + }; + + /** + * RouteType enum. + * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType + * @enum {number} + * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value + * @property {number} SUBNET=1 SUBNET value + * @property {number} STATIC=2 STATIC value + * @property {number} DYNAMIC=3 DYNAMIC value + * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value + * @property {number} PEERING_STATIC=5 PEERING_STATIC value + * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value + * @property {number} POLICY_BASED=7 POLICY_BASED value + * @property {number} ADVERTISED=101 ADVERTISED value + */ + RouteInfo.RouteType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUBNET"] = 1; + values[valuesById[2] = "STATIC"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + values[valuesById[4] = "PEERING_SUBNET"] = 4; + values[valuesById[5] = "PEERING_STATIC"] = 5; + values[valuesById[6] = "PEERING_DYNAMIC"] = 6; + values[valuesById[7] = "POLICY_BASED"] = 7; + values[valuesById[101] = "ADVERTISED"] = 101; + return values; + })(); + + /** + * NextHopType enum. + * @name google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType + * @enum {number} + * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value + * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value + * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value + * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value + * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value + * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value + * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value + * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value + * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value + * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value + * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value + * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value + * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value + */ + RouteInfo.NextHopType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEXT_HOP_IP"] = 1; + values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; + values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; + values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; + values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; + values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; + values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; + values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; + values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; + values[valuesById[10] = "NEXT_HOP_ILB"] = 10; + values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; + values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; + return values; + })(); + + /** + * RouteScope enum. + * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope + * @enum {number} + * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value + * @property {number} NETWORK=1 NETWORK value + * @property {number} NCC_HUB=2 NCC_HUB value + */ + RouteInfo.RouteScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NETWORK"] = 1; + values[valuesById[2] = "NCC_HUB"] = 2; + return values; + })(); + + return RouteInfo; + })(); + + v1beta1.GoogleServiceInfo = (function() { + + /** + * Properties of a GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGoogleServiceInfo + * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp + * @property {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType + */ + + /** + * Constructs a new GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GoogleServiceInfo. + * @implements IGoogleServiceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set + */ + function GoogleServiceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleServiceInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.sourceIp = ""; + + /** + * GoogleServiceInfo googleServiceType. + * @member {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType} googleServiceType + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.googleServiceType = 0; + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo instance + */ + GoogleServiceInfo.create = function create(properties) { + return new GoogleServiceInfo(properties); + }; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); + return writer; + }; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.googleServiceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleServiceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleServiceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + switch (message.googleServiceType) { + default: + return "googleServiceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo + */ + GoogleServiceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + switch (object.googleServiceType) { + default: + if (typeof object.googleServiceType === "number") { + message.googleServiceType = object.googleServiceType; + break; + } + break; + case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": + case 0: + message.googleServiceType = 0; + break; + case "IAP": + case 1: + message.googleServiceType = 1; + break; + case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": + case 2: + message.googleServiceType = 2; + break; + case "CLOUD_DNS": + case 3: + message.googleServiceType = 3; + break; + case "GOOGLE_API": + case 4: + message.googleServiceType = 4; + break; + case "GOOGLE_API_PSC": + case 5: + message.googleServiceType = 5; + break; + case "GOOGLE_API_VPC_SC": + case 6: + message.googleServiceType = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} message GoogleServiceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleServiceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; + return object; + }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @instance + * @returns {Object.} JSON object + */ + GoogleServiceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleServiceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GoogleServiceInfo"; + }; + + /** + * GoogleServiceType enum. + * @name google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType + * @enum {number} + * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value + * @property {number} IAP=1 IAP value + * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value + * @property {number} CLOUD_DNS=3 CLOUD_DNS value + * @property {number} GOOGLE_API=4 GOOGLE_API value + * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value + * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value + */ + GoogleServiceInfo.GoogleServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IAP"] = 1; + values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; + values[valuesById[3] = "CLOUD_DNS"] = 3; + values[valuesById[4] = "GOOGLE_API"] = 4; + values[valuesById[5] = "GOOGLE_API_PSC"] = 5; + values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; + return values; + })(); + + return GoogleServiceInfo; + })(); + + v1beta1.ForwardingRuleInfo = (function() { + + /** + * Properties of a ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IForwardingRuleInfo + * @property {string|null} [displayName] ForwardingRuleInfo displayName + * @property {string|null} [uri] ForwardingRuleInfo uri + * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol + * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange + * @property {string|null} [vip] ForwardingRuleInfo vip + * @property {string|null} [target] ForwardingRuleInfo target + * @property {string|null} [networkUri] ForwardingRuleInfo networkUri + * @property {string|null} [region] ForwardingRuleInfo region + * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName + * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget + */ + + /** + * Constructs a new ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ForwardingRuleInfo. + * @implements IForwardingRuleInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set + */ + function ForwardingRuleInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardingRuleInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.displayName = ""; + + /** + * ForwardingRuleInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.uri = ""; + + /** + * ForwardingRuleInfo matchedProtocol. + * @member {string} matchedProtocol + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedProtocol = ""; + + /** + * ForwardingRuleInfo matchedPortRange. + * @member {string} matchedPortRange + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedPortRange = ""; + + /** + * ForwardingRuleInfo vip. + * @member {string} vip + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.vip = ""; + + /** + * ForwardingRuleInfo target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.target = ""; + + /** + * ForwardingRuleInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.networkUri = ""; + + /** + * ForwardingRuleInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.region = ""; + + /** + * ForwardingRuleInfo loadBalancerName. + * @member {string} loadBalancerName + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.loadBalancerName = ""; + + /** + * ForwardingRuleInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * ForwardingRuleInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo instance + */ + ForwardingRuleInfo.create = function create(properties) { + return new ForwardingRuleInfo(properties); + }; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); + if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); + if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.matchedProtocol = reader.string(); + break; + } + case 6: { + message.matchedPortRange = reader.string(); + break; + } + case 4: { + message.vip = reader.string(); + break; + } + case 5: { + message.target = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.loadBalancerName = reader.string(); + break; + } + case 10: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 11: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardingRuleInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardingRuleInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + if (!$util.isString(message.matchedProtocol)) + return "matchedProtocol: string expected"; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + if (!$util.isString(message.matchedPortRange)) + return "matchedPortRange: string expected"; + if (message.vip != null && message.hasOwnProperty("vip")) + if (!$util.isString(message.vip)) + return "vip: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + if (!$util.isString(message.loadBalancerName)) + return "loadBalancerName: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo + */ + ForwardingRuleInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedProtocol != null) + message.matchedProtocol = String(object.matchedProtocol); + if (object.matchedPortRange != null) + message.matchedPortRange = String(object.matchedPortRange); + if (object.vip != null) + message.vip = String(object.vip); + if (object.target != null) + message.target = String(object.target); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + if (object.loadBalancerName != null) + message.loadBalancerName = String(object.loadBalancerName); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} message ForwardingRuleInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardingRuleInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedProtocol = ""; + object.vip = ""; + object.target = ""; + object.matchedPortRange = ""; + object.networkUri = ""; + object.region = ""; + object.loadBalancerName = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + object.matchedProtocol = message.matchedProtocol; + if (message.vip != null && message.hasOwnProperty("vip")) + object.vip = message.vip; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + object.matchedPortRange = message.matchedPortRange; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + object.loadBalancerName = message.loadBalancerName; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardingRuleInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo"; + }; + + return ForwardingRuleInfo; + })(); + + v1beta1.LoadBalancerInfo = (function() { + + /** + * Properties of a LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILoadBalancerInfo + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType + * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri + * @property {Array.|null} [backends] LoadBalancerInfo backends + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType + * @property {string|null} [backendUri] LoadBalancerInfo backendUri + */ + + /** + * Constructs a new LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LoadBalancerInfo. + * @implements ILoadBalancerInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set + */ + function LoadBalancerInfo(properties) { + this.backends = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerInfo loadBalancerType. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType} loadBalancerType + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.loadBalancerType = 0; + + /** + * LoadBalancerInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerInfo backends. + * @member {Array.} backends + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backends = $util.emptyArray; + + /** + * LoadBalancerInfo backendType. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType} backendType + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendType = 0; + + /** + * LoadBalancerInfo backendUri. + * @member {string} backendUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendUri = ""; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo instance + */ + LoadBalancerInfo.create = function create(properties) { + return new LoadBalancerInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); + if (message.backends != null && message.backends.length) + for (var i = 0; i < message.backends.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); + if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); + return writer; + }; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.loadBalancerType = reader.int32(); + break; + } + case 2: { + message.healthCheckUri = reader.string(); + break; + } + case 3: { + if (!(message.backends && message.backends.length)) + message.backends = []; + message.backends.push($root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.decode(reader, reader.uint32())); + break; + } + case 4: { + message.backendType = reader.int32(); + break; + } + case 5: { + message.backendUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + switch (message.loadBalancerType) { + default: + return "loadBalancerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.backends != null && message.hasOwnProperty("backends")) { + if (!Array.isArray(message.backends)) + return "backends: array expected"; + for (var i = 0; i < message.backends.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify(message.backends[i]); + if (error) + return "backends." + error; + } + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + switch (message.backendType) { + default: + return "backendType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + if (!$util.isString(message.backendUri)) + return "backendUri: string expected"; + return null; + }; + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo + */ + LoadBalancerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "INTERNAL_TCP_UDP": + case 1: + message.loadBalancerType = 1; + break; + case "NETWORK_TCP_UDP": + case 2: + message.loadBalancerType = 2; + break; + case "HTTP_PROXY": + case 3: + message.loadBalancerType = 3; + break; + case "TCP_PROXY": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY": + case 5: + message.loadBalancerType = 5; + break; + } + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + if (object.backends) { + if (!Array.isArray(object.backends)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: array expected"); + message.backends = []; + for (var i = 0; i < object.backends.length; ++i) { + if (typeof object.backends[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: object expected"); + message.backends[i] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.fromObject(object.backends[i]); + } + } + switch (object.backendType) { + default: + if (typeof object.backendType === "number") { + message.backendType = object.backendType; + break; + } + break; + case "BACKEND_TYPE_UNSPECIFIED": + case 0: + message.backendType = 0; + break; + case "BACKEND_SERVICE": + case 1: + message.backendType = 1; + break; + case "TARGET_POOL": + case 2: + message.backendType = 2; + break; + case "TARGET_INSTANCE": + case 3: + message.backendType = 3; + break; + } + if (object.backendUri != null) + message.backendUri = String(object.backendUri); + return message; + }; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} message LoadBalancerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backends = []; + if (options.defaults) { + object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; + object.healthCheckUri = ""; + object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; + object.backendUri = ""; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.backends && message.backends.length) { + object.backends = []; + for (var j = 0; j < message.backends.length; ++j) + object.backends[j] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.toObject(message.backends[j], options); + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + object.backendUri = message.backendUri; + return object; + }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerInfo"; + }; + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value + * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value + * @property {number} HTTP_PROXY=3 HTTP_PROXY value + * @property {number} TCP_PROXY=4 TCP_PROXY value + * @property {number} SSL_PROXY=5 SSL_PROXY value + */ + LoadBalancerInfo.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; + values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; + values[valuesById[3] = "HTTP_PROXY"] = 3; + values[valuesById[4] = "TCP_PROXY"] = 4; + values[valuesById[5] = "SSL_PROXY"] = 5; + return values; + })(); + + /** + * BackendType enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType + * @enum {number} + * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value + * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value + * @property {number} TARGET_POOL=2 TARGET_POOL value + * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value + */ + LoadBalancerInfo.BackendType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKEND_SERVICE"] = 1; + values[valuesById[2] = "TARGET_POOL"] = 2; + values[valuesById[3] = "TARGET_INSTANCE"] = 3; + return values; + })(); + + return LoadBalancerInfo; + })(); + + v1beta1.LoadBalancerBackend = (function() { + + /** + * Properties of a LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILoadBalancerBackend + * @property {string|null} [displayName] LoadBalancerBackend displayName + * @property {string|null} [uri] LoadBalancerBackend uri + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState + * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules + * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules + */ + + /** + * Constructs a new LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LoadBalancerBackend. + * @implements ILoadBalancerBackend + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set + */ + function LoadBalancerBackend(properties) { + this.healthCheckAllowingFirewallRules = []; + this.healthCheckBlockingFirewallRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackend displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.displayName = ""; + + /** + * LoadBalancerBackend uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.uri = ""; + + /** + * LoadBalancerBackend healthCheckFirewallState. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckFirewallState = 0; + + /** + * LoadBalancerBackend healthCheckAllowingFirewallRules. + * @member {Array.} healthCheckAllowingFirewallRules + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; + + /** + * LoadBalancerBackend healthCheckBlockingFirewallRules. + * @member {Array.} healthCheckBlockingFirewallRules + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend instance + */ + LoadBalancerBackend.create = function create(properties) { + return new LoadBalancerBackend(properties); + }; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); + if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); + if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.healthCheckFirewallState = reader.int32(); + break; + } + case 4: { + if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) + message.healthCheckAllowingFirewallRules = []; + message.healthCheckAllowingFirewallRules.push(reader.string()); + break; + } + case 5: { + if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) + message.healthCheckBlockingFirewallRules = []; + message.healthCheckBlockingFirewallRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackend message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + switch (message.healthCheckFirewallState) { + default: + return "healthCheckFirewallState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { + if (!Array.isArray(message.healthCheckAllowingFirewallRules)) + return "healthCheckAllowingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) + return "healthCheckAllowingFirewallRules: string[] expected"; + } + if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { + if (!Array.isArray(message.healthCheckBlockingFirewallRules)) + return "healthCheckBlockingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) + return "healthCheckBlockingFirewallRules: string[] expected"; + } + return null; + }; + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend + */ + LoadBalancerBackend.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + switch (object.healthCheckFirewallState) { + default: + if (typeof object.healthCheckFirewallState === "number") { + message.healthCheckFirewallState = object.healthCheckFirewallState; + break; + } + break; + case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallState = 0; + break; + case "CONFIGURED": + case 1: + message.healthCheckFirewallState = 1; + break; + case "MISCONFIGURED": + case 2: + message.healthCheckFirewallState = 2; + break; + } + if (object.healthCheckAllowingFirewallRules) { + if (!Array.isArray(object.healthCheckAllowingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); + message.healthCheckAllowingFirewallRules = []; + for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) + message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); + } + if (object.healthCheckBlockingFirewallRules) { + if (!Array.isArray(object.healthCheckBlockingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); + message.healthCheckBlockingFirewallRules = []; + for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) + message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} message LoadBalancerBackend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.healthCheckAllowingFirewallRules = []; + object.healthCheckBlockingFirewallRules = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; + if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { + object.healthCheckAllowingFirewallRules = []; + for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) + object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; + } + if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { + object.healthCheckBlockingFirewallRules = []; + for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) + object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; + } + return object; + }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackend + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackend"; + }; + + /** + * HealthCheckFirewallState enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value + * @property {number} CONFIGURED=1 CONFIGURED value + * @property {number} MISCONFIGURED=2 MISCONFIGURED value + */ + LoadBalancerBackend.HealthCheckFirewallState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIGURED"] = 1; + values[valuesById[2] = "MISCONFIGURED"] = 2; + return values; + })(); + + return LoadBalancerBackend; + })(); + + v1beta1.VpnGatewayInfo = (function() { + + /** + * Properties of a VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpnGatewayInfo + * @property {string|null} [displayName] VpnGatewayInfo displayName + * @property {string|null} [uri] VpnGatewayInfo uri + * @property {string|null} [networkUri] VpnGatewayInfo networkUri + * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress + * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri + * @property {string|null} [region] VpnGatewayInfo region + */ + + /** + * Constructs a new VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpnGatewayInfo. + * @implements IVpnGatewayInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set + */ + function VpnGatewayInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnGatewayInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.displayName = ""; + + /** + * VpnGatewayInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.uri = ""; + + /** + * VpnGatewayInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.networkUri = ""; + + /** + * VpnGatewayInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.ipAddress = ""; + + /** + * VpnGatewayInfo vpnTunnelUri. + * @member {string} vpnTunnelUri + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.vpnTunnelUri = ""; + + /** + * VpnGatewayInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.region = ""; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo instance + */ + VpnGatewayInfo.create = function create(properties) { + return new VpnGatewayInfo(properties); + }; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 5: { + message.vpnTunnelUri = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnGatewayInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnGatewayInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + if (!$util.isString(message.vpnTunnelUri)) + return "vpnTunnelUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo + */ + VpnGatewayInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.vpnTunnelUri != null) + message.vpnTunnelUri = String(object.vpnTunnelUri); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} message VpnGatewayInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnGatewayInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.ipAddress = ""; + object.vpnTunnelUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + object.vpnTunnelUri = message.vpnTunnelUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + * @returns {Object.} JSON object + */ + VpnGatewayInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnGatewayInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnGatewayInfo"; + }; + + return VpnGatewayInfo; + })(); + + v1beta1.VpnTunnelInfo = (function() { + + /** + * Properties of a VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpnTunnelInfo + * @property {string|null} [displayName] VpnTunnelInfo displayName + * @property {string|null} [uri] VpnTunnelInfo uri + * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway + * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway + * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp + * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp + * @property {string|null} [networkUri] VpnTunnelInfo networkUri + * @property {string|null} [region] VpnTunnelInfo region + * @property {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType + */ + + /** + * Constructs a new VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpnTunnelInfo. + * @implements IVpnTunnelInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set + */ + function VpnTunnelInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnTunnelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.displayName = ""; + + /** + * VpnTunnelInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.uri = ""; + + /** + * VpnTunnelInfo sourceGateway. + * @member {string} sourceGateway + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGateway = ""; + + /** + * VpnTunnelInfo remoteGateway. + * @member {string} remoteGateway + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGateway = ""; + + /** + * VpnTunnelInfo remoteGatewayIp. + * @member {string} remoteGatewayIp + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGatewayIp = ""; + + /** + * VpnTunnelInfo sourceGatewayIp. + * @member {string} sourceGatewayIp + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGatewayIp = ""; + + /** + * VpnTunnelInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.networkUri = ""; + + /** + * VpnTunnelInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.region = ""; + + /** + * VpnTunnelInfo routingType. + * @member {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType} routingType + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.routingType = 0; + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo instance + */ + VpnTunnelInfo.create = function create(properties) { + return new VpnTunnelInfo(properties); + }; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); + if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); + if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); + if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); + return writer; + }; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.sourceGateway = reader.string(); + break; + } + case 4: { + message.remoteGateway = reader.string(); + break; + } + case 5: { + message.remoteGatewayIp = reader.string(); + break; + } + case 6: { + message.sourceGatewayIp = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.routingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnTunnelInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnTunnelInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + if (!$util.isString(message.sourceGateway)) + return "sourceGateway: string expected"; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + if (!$util.isString(message.remoteGateway)) + return "remoteGateway: string expected"; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + if (!$util.isString(message.remoteGatewayIp)) + return "remoteGatewayIp: string expected"; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + if (!$util.isString(message.sourceGatewayIp)) + return "sourceGatewayIp: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.routingType != null && message.hasOwnProperty("routingType")) + switch (message.routingType) { + default: + return "routingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo + */ + VpnTunnelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sourceGateway != null) + message.sourceGateway = String(object.sourceGateway); + if (object.remoteGateway != null) + message.remoteGateway = String(object.remoteGateway); + if (object.remoteGatewayIp != null) + message.remoteGatewayIp = String(object.remoteGatewayIp); + if (object.sourceGatewayIp != null) + message.sourceGatewayIp = String(object.sourceGatewayIp); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + switch (object.routingType) { + default: + if (typeof object.routingType === "number") { + message.routingType = object.routingType; + break; + } + break; + case "ROUTING_TYPE_UNSPECIFIED": + case 0: + message.routingType = 0; + break; + case "ROUTE_BASED": + case 1: + message.routingType = 1; + break; + case "POLICY_BASED": + case 2: + message.routingType = 2; + break; + case "DYNAMIC": + case 3: + message.routingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} message VpnTunnelInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnTunnelInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.sourceGateway = ""; + object.remoteGateway = ""; + object.remoteGatewayIp = ""; + object.sourceGatewayIp = ""; + object.networkUri = ""; + object.region = ""; + object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + object.sourceGateway = message.sourceGateway; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + object.remoteGateway = message.remoteGateway; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + object.remoteGatewayIp = message.remoteGatewayIp; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + object.sourceGatewayIp = message.sourceGatewayIp; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.routingType != null && message.hasOwnProperty("routingType")) + object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; + return object; + }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + * @returns {Object.} JSON object + */ + VpnTunnelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnTunnelInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnTunnelInfo"; + }; + + /** + * RoutingType enum. + * @name google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType + * @enum {number} + * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value + * @property {number} ROUTE_BASED=1 ROUTE_BASED value + * @property {number} POLICY_BASED=2 POLICY_BASED value + * @property {number} DYNAMIC=3 DYNAMIC value + */ + VpnTunnelInfo.RoutingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROUTE_BASED"] = 1; + values[valuesById[2] = "POLICY_BASED"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + return values; + })(); + + return VpnTunnelInfo; + })(); + + v1beta1.EndpointInfo = (function() { + + /** + * Properties of an EndpointInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IEndpointInfo + * @property {string|null} [sourceIp] EndpointInfo sourceIp + * @property {string|null} [destinationIp] EndpointInfo destinationIp + * @property {string|null} [protocol] EndpointInfo protocol + * @property {number|null} [sourcePort] EndpointInfo sourcePort + * @property {number|null} [destinationPort] EndpointInfo destinationPort + * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri + * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri + * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri + */ + + /** + * Constructs a new EndpointInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an EndpointInfo. + * @implements IEndpointInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set + */ + function EndpointInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EndpointInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceIp = ""; + + /** + * EndpointInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationIp = ""; + + /** + * EndpointInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.protocol = ""; + + /** + * EndpointInfo sourcePort. + * @member {number} sourcePort + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourcePort = 0; + + /** + * EndpointInfo destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationPort = 0; + + /** + * EndpointInfo sourceNetworkUri. + * @member {string} sourceNetworkUri + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceNetworkUri = ""; + + /** + * EndpointInfo destinationNetworkUri. + * @member {string} destinationNetworkUri + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationNetworkUri = ""; + + /** + * EndpointInfo sourceAgentUri. + * @member {string} sourceAgentUri + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceAgentUri = ""; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo instance + */ + EndpointInfo.create = function create(properties) { + return new EndpointInfo(properties); + }; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); + if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); + if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); + if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); + return writer; + }; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.destinationIp = reader.string(); + break; + } + case 3: { + message.protocol = reader.string(); + break; + } + case 4: { + message.sourcePort = reader.int32(); + break; + } + case 5: { + message.destinationPort = reader.int32(); + break; + } + case 6: { + message.sourceNetworkUri = reader.string(); + break; + } + case 7: { + message.destinationNetworkUri = reader.string(); + break; + } + case 8: { + message.sourceAgentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndpointInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndpointInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isInteger(message.sourcePort)) + return "sourcePort: integer expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + if (!$util.isString(message.sourceNetworkUri)) + return "sourceNetworkUri: string expected"; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + if (!$util.isString(message.destinationNetworkUri)) + return "destinationNetworkUri: string expected"; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + if (!$util.isString(message.sourceAgentUri)) + return "sourceAgentUri: string expected"; + return null; + }; + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo + */ + EndpointInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.EndpointInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.sourcePort != null) + message.sourcePort = object.sourcePort | 0; + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; + if (object.sourceNetworkUri != null) + message.sourceNetworkUri = String(object.sourceNetworkUri); + if (object.destinationNetworkUri != null) + message.destinationNetworkUri = String(object.destinationNetworkUri); + if (object.sourceAgentUri != null) + message.sourceAgentUri = String(object.sourceAgentUri); + return message; + }; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.EndpointInfo} message EndpointInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndpointInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.destinationIp = ""; + object.protocol = ""; + object.sourcePort = 0; + object.destinationPort = 0; + object.sourceNetworkUri = ""; + object.destinationNetworkUri = ""; + object.sourceAgentUri = ""; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + object.sourceNetworkUri = message.sourceNetworkUri; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + object.destinationNetworkUri = message.destinationNetworkUri; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + object.sourceAgentUri = message.sourceAgentUri; + return object; + }; + + /** + * Converts this EndpointInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + * @returns {Object.} JSON object + */ + EndpointInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndpointInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.EndpointInfo"; + }; + + return EndpointInfo; + })(); + + v1beta1.DeliverInfo = (function() { + + /** + * Properties of a DeliverInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDeliverInfo + * @property {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null} [target] DeliverInfo target + * @property {string|null} [resourceUri] DeliverInfo resourceUri + * @property {string|null} [ipAddress] DeliverInfo ipAddress + * @property {string|null} [storageBucket] DeliverInfo storageBucket + * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget + */ + + /** + * Constructs a new DeliverInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DeliverInfo. + * @implements IDeliverInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set + */ + function DeliverInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliverInfo target. + * @member {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target} target + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.target = 0; + + /** + * DeliverInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.resourceUri = ""; + + /** + * DeliverInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.ipAddress = ""; + + /** + * DeliverInfo storageBucket. + * @member {string} storageBucket + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.storageBucket = ""; + + /** + * DeliverInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo instance + */ + DeliverInfo.create = function create(properties) { + return new DeliverInfo(properties); + }; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.storageBucket = reader.string(); + break; + } + case 5: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeliverInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeliverInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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: + case 15: + case 16: + case 17: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + if (!$util.isString(message.storageBucket)) + return "storageBucket: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo + */ + DeliverInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeliverInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "INSTANCE": + case 1: + message.target = 1; + break; + case "INTERNET": + case 2: + message.target = 2; + break; + case "GOOGLE_API": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "CLOUD_SQL_INSTANCE": + case 5: + message.target = 5; + break; + case "PSC_PUBLISHED_SERVICE": + case 6: + message.target = 6; + break; + case "PSC_GOOGLE_API": + case 7: + message.target = 7; + break; + case "PSC_VPC_SC": + case 8: + message.target = 8; + break; + case "SERVERLESS_NEG": + case 9: + message.target = 9; + break; + case "STORAGE_BUCKET": + case 10: + message.target = 10; + break; + case "PRIVATE_NETWORK": + case 11: + message.target = 11; + break; + case "CLOUD_FUNCTION": + case 12: + message.target = 12; + break; + case "APP_ENGINE_VERSION": + case 13: + message.target = 13; + break; + case "CLOUD_RUN_REVISION": + case 14: + message.target = 14; + break; + case "GOOGLE_MANAGED_SERVICE": + case 15: + message.target = 15; + break; + case "REDIS_INSTANCE": + case 16: + message.target = 16; + break; + case "REDIS_CLUSTER": + case 17: + message.target = 17; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.storageBucket != null) + message.storageBucket = String(object.storageBucket); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.DeliverInfo} message DeliverInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeliverInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + object.storageBucket = ""; + object.pscGoogleApiTarget = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + object.storageBucket = message.storageBucket; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this DeliverInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + * @returns {Object.} JSON object + */ + DeliverInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeliverInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeliverInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1beta1.DeliverInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} INTERNET=2 INTERNET value + * @property {number} GOOGLE_API=3 GOOGLE_API value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value + * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value + * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value + * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value + * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value + * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value + * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value + * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value + * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value + * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value + * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value + * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value + * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value + */ + DeliverInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "INTERNET"] = 2; + values[valuesById[3] = "GOOGLE_API"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; + values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; + values[valuesById[7] = "PSC_GOOGLE_API"] = 7; + values[valuesById[8] = "PSC_VPC_SC"] = 8; + values[valuesById[9] = "SERVERLESS_NEG"] = 9; + values[valuesById[10] = "STORAGE_BUCKET"] = 10; + values[valuesById[11] = "PRIVATE_NETWORK"] = 11; + values[valuesById[12] = "CLOUD_FUNCTION"] = 12; + values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; + values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; + values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; + values[valuesById[16] = "REDIS_INSTANCE"] = 16; + values[valuesById[17] = "REDIS_CLUSTER"] = 17; + return values; + })(); + + return DeliverInfo; + })(); + + v1beta1.ForwardInfo = (function() { + + /** + * Properties of a ForwardInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IForwardInfo + * @property {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null} [target] ForwardInfo target + * @property {string|null} [resourceUri] ForwardInfo resourceUri + * @property {string|null} [ipAddress] ForwardInfo ipAddress + */ + + /** + * Constructs a new ForwardInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ForwardInfo. + * @implements IForwardInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set + */ + function ForwardInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardInfo target. + * @member {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target} target + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.target = 0; + + /** + * ForwardInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.resourceUri = ""; + + /** + * ForwardInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.ipAddress = ""; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo instance + */ + ForwardInfo.create = function create(properties) { + return new ForwardInfo(properties); + }; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo + */ + ForwardInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "PEERING_VPC": + case 1: + message.target = 1; + break; + case "VPN_GATEWAY": + case 2: + message.target = 2; + break; + case "INTERCONNECT": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": + case 5: + message.target = 5; + break; + case "CLOUD_SQL_INSTANCE": + case 6: + message.target = 6; + break; + case "ANOTHER_PROJECT": + case 7: + message.target = 7; + break; + case "NCC_HUB": + case 8: + message.target = 8; + break; + case "ROUTER_APPLIANCE": + case 9: + message.target = 9; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ForwardInfo} message ForwardInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this ForwardInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1beta1.ForwardInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} PEERING_VPC=1 PEERING_VPC value + * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value + * @property {number} INTERCONNECT=3 INTERCONNECT value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value + * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value + * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value + * @property {number} NCC_HUB=8 NCC_HUB value + * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value + */ + ForwardInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "PEERING_VPC"] = 1; + values[valuesById[2] = "VPN_GATEWAY"] = 2; + values[valuesById[3] = "INTERCONNECT"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; + values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; + values[valuesById[7] = "ANOTHER_PROJECT"] = 7; + values[valuesById[8] = "NCC_HUB"] = 8; + values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; + return values; + })(); + + return ForwardInfo; + })(); + + v1beta1.AbortInfo = (function() { + + /** + * Properties of an AbortInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IAbortInfo + * @property {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null} [cause] AbortInfo cause + * @property {string|null} [resourceUri] AbortInfo resourceUri + * @property {string|null} [ipAddress] AbortInfo ipAddress + * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission + */ + + /** + * Constructs a new AbortInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an AbortInfo. + * @implements IAbortInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set + */ + function AbortInfo(properties) { + this.projectsMissingPermission = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbortInfo cause. + * @member {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.cause = 0; + + /** + * AbortInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.resourceUri = ""; + + /** + * AbortInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.ipAddress = ""; + + /** + * AbortInfo projectsMissingPermission. + * @member {Array.} projectsMissingPermission + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo instance + */ + AbortInfo.create = function create(properties) { + return new AbortInfo(properties); + }; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 3: { + if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) + message.projectsMissingPermission = []; + message.projectsMissingPermission.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbortInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbortInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 3: + case 7: + case 8: + case 11: + case 12: + case 13: + case 14: + case 2: + case 32: + case 23: + case 4: + case 28: + case 29: + case 36: + case 5: + case 6: + case 9: + case 10: + case 15: + case 16: + case 17: + case 18: + case 24: + case 25: + case 26: + case 27: + case 19: + case 20: + case 34: + case 35: + case 21: + case 22: + case 30: + case 31: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { + if (!Array.isArray(message.projectsMissingPermission)) + return "projectsMissingPermission: array expected"; + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + if (!$util.isString(message.projectsMissingPermission[i])) + return "projectsMissingPermission: string[] expected"; + } + return null; + }; + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo + */ + AbortInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AbortInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_NETWORK": + case 1: + message.cause = 1; + break; + case "UNKNOWN_PROJECT": + case 3: + message.cause = 3; + break; + case "NO_EXTERNAL_IP": + case 7: + message.cause = 7; + break; + case "UNINTENDED_DESTINATION": + case 8: + message.cause = 8; + break; + case "SOURCE_ENDPOINT_NOT_FOUND": + case 11: + message.cause = 11; + break; + case "MISMATCHED_SOURCE_NETWORK": + case 12: + message.cause = 12; + break; + case "DESTINATION_ENDPOINT_NOT_FOUND": + case 13: + message.cause = 13; + break; + case "MISMATCHED_DESTINATION_NETWORK": + case 14: + message.cause = 14; + break; + case "UNKNOWN_IP": + case 2: + message.cause = 2; + break; + case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": + case 32: + message.cause = 32; + break; + case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": + case 23: + message.cause = 23; + break; + case "PERMISSION_DENIED": + case 4: + message.cause = 4; + break; + case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": + case 28: + message.cause = 28; + break; + case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": + case 29: + message.cause = 29; + break; + case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": + case 36: + message.cause = 36; + break; + case "NO_SOURCE_LOCATION": + case 5: + message.cause = 5; + break; + case "INVALID_ARGUMENT": + case 6: + message.cause = 6; + break; + case "TRACE_TOO_LONG": + case 9: + message.cause = 9; + break; + case "INTERNAL_ERROR": + case 10: + message.cause = 10; + break; + case "UNSUPPORTED": + case 15: + message.cause = 15; + break; + case "MISMATCHED_IP_VERSION": + case 16: + message.cause = 16; + break; + case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": + case 17: + message.cause = 17; + break; + case "RESOURCE_CONFIG_NOT_FOUND": + case 18: + message.cause = 18; + break; + case "VM_INSTANCE_CONFIG_NOT_FOUND": + case 24: + message.cause = 24; + break; + case "NETWORK_CONFIG_NOT_FOUND": + case 25: + message.cause = 25; + break; + case "FIREWALL_CONFIG_NOT_FOUND": + case 26: + message.cause = 26; + break; + case "ROUTE_CONFIG_NOT_FOUND": + case 27: + message.cause = 27; + break; + case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": + case 19: + message.cause = 19; + break; + case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": + case 20: + message.cause = 20; + break; + case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": + case 34: + message.cause = 34; + break; + case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": + case 35: + message.cause = 35; + break; + case "SOURCE_FORWARDING_RULE_UNSUPPORTED": + case 21: + message.cause = 21; + break; + case "NON_ROUTABLE_IP_ADDRESS": + case 22: + message.cause = 22; + break; + case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": + case 30: + message.cause = 30; + break; + case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": + case 31: + message.cause = 31; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.projectsMissingPermission) { + if (!Array.isArray(object.projectsMissingPermission)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.AbortInfo.projectsMissingPermission: array expected"); + message.projectsMissingPermission = []; + for (var i = 0; i < object.projectsMissingPermission.length; ++i) + message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); + } + return message; + }; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.AbortInfo} message AbortInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbortInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectsMissingPermission = []; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.projectsMissingPermission && message.projectsMissingPermission.length) { + object.projectsMissingPermission = []; + for (var j = 0; j < message.projectsMissingPermission.length; ++j) + object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this AbortInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + * @returns {Object.} JSON object + */ + AbortInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbortInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AbortInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1beta1.AbortInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value + * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value + * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value + * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value + * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value + * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value + * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value + * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value + * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value + * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value + * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value + * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value + * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value + * @property {number} UNSUPPORTED=15 UNSUPPORTED value + * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value + * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value + * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value + * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value + * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value + * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value + * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value + * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value + * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value + * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value + * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value + * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value + * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value + * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value + * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value + */ + AbortInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; + values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; + values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; + values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; + values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; + values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; + values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; + values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; + values[valuesById[2] = "UNKNOWN_IP"] = 2; + values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; + values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; + values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; + values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; + values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; + values[valuesById[6] = "INVALID_ARGUMENT"] = 6; + values[valuesById[9] = "TRACE_TOO_LONG"] = 9; + values[valuesById[10] = "INTERNAL_ERROR"] = 10; + values[valuesById[15] = "UNSUPPORTED"] = 15; + values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; + values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; + values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; + values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; + values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; + values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; + values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; + values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; + values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; + values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; + values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; + values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; + values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; + values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; + values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; + return values; + })(); + + return AbortInfo; + })(); + + v1beta1.DropInfo = (function() { + + /** + * Properties of a DropInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDropInfo + * @property {google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null} [cause] DropInfo cause + * @property {string|null} [resourceUri] DropInfo resourceUri + * @property {string|null} [sourceIp] DropInfo sourceIp + * @property {string|null} [destinationIp] DropInfo destinationIp + * @property {string|null} [region] DropInfo region + */ + + /** + * Constructs a new DropInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DropInfo. + * @implements IDropInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set + */ + function DropInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DropInfo cause. + * @member {google.cloud.networkmanagement.v1beta1.DropInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.cause = 0; + + /** + * DropInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.resourceUri = ""; + + /** + * DropInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.sourceIp = ""; + + /** + * DropInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.destinationIp = ""; + + /** + * DropInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.region = ""; + + /** + * Creates a new DropInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo instance + */ + DropInfo.create = function create(properties) { + return new DropInfo(properties); + }; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); + return writer; + }; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.sourceIp = reader.string(); + break; + } + case 4: { + message.destinationIp = reader.string(); + break; + } + case 5: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DropInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DropInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 42: + case 43: + case 49: + case 50: + case 51: + case 52: + case 53: + case 44: + case 45: + case 46: + case 7: + case 8: + case 47: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 27: + case 28: + case 68: + case 69: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 38: + case 36: + case 21: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 63: + case 22: + case 23: + case 24: + case 60: + case 61: + case 25: + case 26: + case 41: + case 48: + case 54: + case 58: + case 57: + case 64: + case 55: + case 56: + case 29: + case 37: + case 39: + case 40: + case 59: + case 62: + case 65: + case 66: + case 67: + case 70: + case 71: + case 72: + case 73: + case 74: + case 78: + case 75: + case 76: + case 77: + case 79: + case 80: + case 81: + case 82: + case 83: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo + */ + DropInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DropInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_EXTERNAL_ADDRESS": + case 1: + message.cause = 1; + break; + case "FOREIGN_IP_DISALLOWED": + case 2: + message.cause = 2; + break; + case "FIREWALL_RULE": + case 3: + message.cause = 3; + break; + case "NO_ROUTE": + case 4: + message.cause = 4; + break; + case "ROUTE_BLACKHOLE": + case 5: + message.cause = 5; + break; + case "ROUTE_WRONG_NETWORK": + case 6: + message.cause = 6; + break; + case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": + case 42: + message.cause = 42; + break; + case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": + case 43: + message.cause = 43; + break; + case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": + case 49: + message.cause = 49; + break; + case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": + case 50: + message.cause = 50; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": + case 51: + message.cause = 51; + break; + case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": + case 52: + message.cause = 52; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": + case 53: + message.cause = 53; + break; + case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": + case 44: + message.cause = 44; + break; + case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": + case 45: + message.cause = 45; + break; + case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": + case 46: + message.cause = 46; + break; + case "PRIVATE_TRAFFIC_TO_INTERNET": + case 7: + message.cause = 7; + break; + case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": + case 8: + message.cause = 8; + break; + case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": + case 47: + message.cause = 47; + break; + case "NO_EXTERNAL_ADDRESS": + case 9: + message.cause = 9; + break; + case "UNKNOWN_INTERNAL_ADDRESS": + case 10: + message.cause = 10; + break; + case "FORWARDING_RULE_MISMATCH": + case 11: + message.cause = 11; + break; + case "FORWARDING_RULE_NO_INSTANCES": + case 12: + message.cause = 12; + break; + case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": + case 13: + message.cause = 13; + break; + case "INSTANCE_NOT_RUNNING": + case 14: + message.cause = 14; + break; + case "GKE_CLUSTER_NOT_RUNNING": + case 27: + message.cause = 27; + break; + case "CLOUD_SQL_INSTANCE_NOT_RUNNING": + case 28: + message.cause = 28; + break; + case "REDIS_INSTANCE_NOT_RUNNING": + case 68: + message.cause = 68; + break; + case "REDIS_CLUSTER_NOT_RUNNING": + case 69: + message.cause = 69; + break; + case "TRAFFIC_TYPE_BLOCKED": + case 15: + message.cause = 15; + break; + case "GKE_MASTER_UNAUTHORIZED_ACCESS": + case 16: + message.cause = 16; + break; + case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": + case 17: + message.cause = 17; + break; + case "DROPPED_INSIDE_GKE_SERVICE": + case 18: + message.cause = 18; + break; + case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": + case 19: + message.cause = 19; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PEERING": + case 20: + message.cause = 20; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": + case 38: + message.cause = 38; + break; + case "GKE_PSC_ENDPOINT_MISSING": + case 36: + message.cause = 36; + break; + case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": + case 21: + message.cause = 21; + break; + case "GKE_CONTROL_PLANE_REGION_MISMATCH": + case 30: + message.cause = 30; + break; + case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": + case 31: + message.cause = 31; + break; + case "GKE_CONTROL_PLANE_NO_ROUTE": + case 32: + message.cause = 32; + break; + case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": + case 33: + message.cause = 33; + break; + case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": + case 34: + message.cause = 34; + break; + case "CLOUD_SQL_INSTANCE_NO_ROUTE": + case 35: + message.cause = 35; + break; + case "CLOUD_SQL_CONNECTOR_REQUIRED": + case 63: + message.cause = 63; + break; + case "CLOUD_FUNCTION_NOT_ACTIVE": + case 22: + message.cause = 22; + break; + case "VPC_CONNECTOR_NOT_SET": + case 23: + message.cause = 23; + break; + case "VPC_CONNECTOR_NOT_RUNNING": + case 24: + message.cause = 24; + break; + case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": + case 60: + message.cause = 60; + break; + case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": + case 61: + message.cause = 61; + break; + case "FORWARDING_RULE_REGION_MISMATCH": + case 25: + message.cause = 25; + break; + case "PSC_CONNECTION_NOT_ACCEPTED": + case 26: + message.cause = 26; + break; + case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": + case 41: + message.cause = 41; + break; + case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": + case 48: + message.cause = 48; + break; + case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": + case 54: + message.cause = 54; + break; + case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": + case 58: + message.cause = 58; + break; + case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": + case 57: + message.cause = 57; + break; + case "PSC_TRANSITIVITY_NOT_PROPAGATED": + case 64: + message.cause = 64; + break; + case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": + case 55: + message.cause = 55; + break; + case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": + case 56: + message.cause = 56; + break; + case "CLOUD_RUN_REVISION_NOT_READY": + case 29: + message.cause = 29; + break; + case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": + case 37: + message.cause = 37; + break; + case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": + case 39: + message.cause = 39; + break; + case "CLOUD_NAT_NO_ADDRESSES": + case 40: + message.cause = 40; + break; + case "ROUTING_LOOP": + case 59: + message.cause = 59; + break; + case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": + case 62: + message.cause = 62; + break; + case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": + case 65: + message.cause = 65; + break; + case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": + case 66: + message.cause = 66; + break; + case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": + case 67: + message.cause = 67; + break; + case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": + case 70: + message.cause = 70; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PORT": + case 71: + message.cause = 71; + break; + case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": + case 72: + message.cause = 72; + break; + case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": + case 73: + message.cause = 73; + break; + case "REDIS_INSTANCE_NO_EXTERNAL_IP": + case 74: + message.cause = 74; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": + case 78: + message.cause = 78; + break; + case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": + case 75: + message.cause = 75; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PORT": + case 76: + message.cause = 76; + break; + case "REDIS_CLUSTER_NO_EXTERNAL_IP": + case 77: + message.cause = 77; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": + case 79: + message.cause = 79; + break; + case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": + case 80: + message.cause = 80; + break; + case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": + case 81: + message.cause = 81; + break; + case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": + case 82: + message.cause = 82; + break; + case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": + case 83: + message.cause = 83; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.DropInfo} message DropInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DropInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.sourceIp = ""; + object.destinationIp = ""; + object.region = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this DropInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + * @returns {Object.} JSON object + */ + DropInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DropInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DropInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1beta1.DropInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value + * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value + * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value + * @property {number} NO_ROUTE=4 NO_ROUTE value + * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value + * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value + * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value + * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value + * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value + * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value + * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value + * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value + * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value + * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value + * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value + * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value + * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value + * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value + * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value + * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value + * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value + * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value + * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value + * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value + * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value + * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value + * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value + * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value + * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value + * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value + * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value + * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value + * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value + * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value + * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value + * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value + * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value + * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value + * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value + * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value + * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value + * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value + * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value + * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value + * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value + * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value + * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value + * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value + * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value + * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value + * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value + * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value + * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value + * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value + * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value + * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value + * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value + * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value + * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value + * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value + * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value + * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value + * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value + * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value + * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value + * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value + * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value + * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value + * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value + * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value + */ + DropInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; + values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; + values[valuesById[3] = "FIREWALL_RULE"] = 3; + values[valuesById[4] = "NO_ROUTE"] = 4; + values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; + values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; + values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; + values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; + values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; + values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; + values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; + values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; + values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; + values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; + values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; + values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; + values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; + values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; + values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; + values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; + values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; + values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; + values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; + values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; + values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; + values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; + values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; + values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; + values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; + values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; + values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; + values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; + values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; + values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; + values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; + values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; + values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; + values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; + values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; + values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; + values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; + values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; + values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; + values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; + values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; + values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; + values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; + values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; + values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; + values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; + values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; + values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; + values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; + values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; + values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; + values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; + values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; + values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; + values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; + values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; + values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; + values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; + values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; + values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; + values[valuesById[59] = "ROUTING_LOOP"] = 59; + values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; + values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; + values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; + values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; + values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; + values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; + values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; + values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; + values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; + values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; + values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; + values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; + values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; + values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; + values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; + values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; + values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; + values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; + return values; + })(); + + return DropInfo; + })(); + + v1beta1.GKEMasterInfo = (function() { + + /** + * Properties of a GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGKEMasterInfo + * @property {string|null} [clusterUri] GKEMasterInfo clusterUri + * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri + * @property {string|null} [internalIp] GKEMasterInfo internalIp + * @property {string|null} [externalIp] GKEMasterInfo externalIp + * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint + */ + + /** + * Constructs a new GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GKEMasterInfo. + * @implements IGKEMasterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set + */ + function GKEMasterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GKEMasterInfo clusterUri. + * @member {string} clusterUri + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterUri = ""; + + /** + * GKEMasterInfo clusterNetworkUri. + * @member {string} clusterNetworkUri + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterNetworkUri = ""; + + /** + * GKEMasterInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.internalIp = ""; + + /** + * GKEMasterInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.externalIp = ""; + + /** + * GKEMasterInfo dnsEndpoint. + * @member {string} dnsEndpoint + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.dnsEndpoint = ""; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo instance + */ + GKEMasterInfo.create = function create(properties) { + return new GKEMasterInfo(properties); + }; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); + if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); + return writer; + }; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.clusterUri = reader.string(); + break; + } + case 4: { + message.clusterNetworkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.dnsEndpoint = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GKEMasterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GKEMasterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + if (!$util.isString(message.clusterUri)) + return "clusterUri: string expected"; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + if (!$util.isString(message.clusterNetworkUri)) + return "clusterNetworkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + if (!$util.isString(message.dnsEndpoint)) + return "dnsEndpoint: string expected"; + return null; + }; + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo + */ + GKEMasterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); + if (object.clusterUri != null) + message.clusterUri = String(object.clusterUri); + if (object.clusterNetworkUri != null) + message.clusterNetworkUri = String(object.clusterNetworkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.dnsEndpoint != null) + message.dnsEndpoint = String(object.dnsEndpoint); + return message; + }; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} message GKEMasterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GKEMasterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterUri = ""; + object.clusterNetworkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.dnsEndpoint = ""; + } + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + object.clusterUri = message.clusterUri; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + object.clusterNetworkUri = message.clusterNetworkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + object.dnsEndpoint = message.dnsEndpoint; + return object; + }; + + /** + * Converts this GKEMasterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + * @returns {Object.} JSON object + */ + GKEMasterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GKEMasterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GKEMasterInfo"; + }; + + return GKEMasterInfo; + })(); + + v1beta1.CloudSQLInstanceInfo = (function() { + + /** + * Properties of a CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICloudSQLInstanceInfo + * @property {string|null} [displayName] CloudSQLInstanceInfo displayName + * @property {string|null} [uri] CloudSQLInstanceInfo uri + * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri + * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp + * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp + * @property {string|null} [region] CloudSQLInstanceInfo region + */ + + /** + * Constructs a new CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CloudSQLInstanceInfo. + * @implements ICloudSQLInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set + */ + function CloudSQLInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudSQLInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.displayName = ""; + + /** + * CloudSQLInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.uri = ""; + + /** + * CloudSQLInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.networkUri = ""; + + /** + * CloudSQLInstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.internalIp = ""; + + /** + * CloudSQLInstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.externalIp = ""; + + /** + * CloudSQLInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.region = ""; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance + */ + CloudSQLInstanceInfo.create = function create(properties) { + return new CloudSQLInstanceInfo(properties); + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); + return writer; + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSQLInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + */ + CloudSQLInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSQLInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo"; + }; + + return CloudSQLInstanceInfo; + })(); + + v1beta1.RedisInstanceInfo = (function() { + + /** + * Properties of a RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRedisInstanceInfo + * @property {string|null} [displayName] RedisInstanceInfo displayName + * @property {string|null} [uri] RedisInstanceInfo uri + * @property {string|null} [networkUri] RedisInstanceInfo networkUri + * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp + * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp + * @property {string|null} [region] RedisInstanceInfo region + */ + + /** + * Constructs a new RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RedisInstanceInfo. + * @implements IRedisInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set + */ + function RedisInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.displayName = ""; + + /** + * RedisInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.uri = ""; + + /** + * RedisInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.networkUri = ""; + + /** + * RedisInstanceInfo primaryEndpointIp. + * @member {string} primaryEndpointIp + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.primaryEndpointIp = ""; + + /** + * RedisInstanceInfo readEndpointIp. + * @member {string} readEndpointIp + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.readEndpointIp = ""; + + /** + * RedisInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.region = ""; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo instance + */ + RedisInstanceInfo.create = function create(properties) { + return new RedisInstanceInfo(properties); + }; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); + if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.primaryEndpointIp = reader.string(); + break; + } + case 5: { + message.readEndpointIp = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + if (!$util.isString(message.primaryEndpointIp)) + return "primaryEndpointIp: string expected"; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + if (!$util.isString(message.readEndpointIp)) + return "readEndpointIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo + */ + RedisInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.primaryEndpointIp != null) + message.primaryEndpointIp = String(object.primaryEndpointIp); + if (object.readEndpointIp != null) + message.readEndpointIp = String(object.readEndpointIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} message RedisInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.primaryEndpointIp = ""; + object.readEndpointIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + object.primaryEndpointIp = message.primaryEndpointIp; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + object.readEndpointIp = message.readEndpointIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + RedisInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisInstanceInfo"; + }; + + return RedisInstanceInfo; + })(); + + v1beta1.RedisClusterInfo = (function() { + + /** + * Properties of a RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRedisClusterInfo + * @property {string|null} [displayName] RedisClusterInfo displayName + * @property {string|null} [uri] RedisClusterInfo uri + * @property {string|null} [networkUri] RedisClusterInfo networkUri + * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress + * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress + * @property {string|null} [location] RedisClusterInfo location + */ + + /** + * Constructs a new RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RedisClusterInfo. + * @implements IRedisClusterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set + */ + function RedisClusterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisClusterInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.displayName = ""; + + /** + * RedisClusterInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.uri = ""; + + /** + * RedisClusterInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.networkUri = ""; + + /** + * RedisClusterInfo discoveryEndpointIpAddress. + * @member {string} discoveryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; + + /** + * RedisClusterInfo secondaryEndpointIpAddress. + * @member {string} secondaryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; + + /** + * RedisClusterInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.location = ""; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo instance + */ + RedisClusterInfo.create = function create(properties) { + return new RedisClusterInfo(properties); + }; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); + if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); + return writer; + }; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.discoveryEndpointIpAddress = reader.string(); + break; + } + case 5: { + message.secondaryEndpointIpAddress = reader.string(); + break; + } + case 6: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisClusterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisClusterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + if (!$util.isString(message.discoveryEndpointIpAddress)) + return "discoveryEndpointIpAddress: string expected"; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + if (!$util.isString(message.secondaryEndpointIpAddress)) + return "secondaryEndpointIpAddress: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo + */ + RedisClusterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.discoveryEndpointIpAddress != null) + message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); + if (object.secondaryEndpointIpAddress != null) + message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} message RedisClusterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisClusterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.discoveryEndpointIpAddress = ""; + object.secondaryEndpointIpAddress = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this RedisClusterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + * @returns {Object.} JSON object + */ + RedisClusterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisClusterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisClusterInfo"; + }; + + return RedisClusterInfo; + })(); + + v1beta1.CloudFunctionInfo = (function() { + + /** + * Properties of a CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICloudFunctionInfo + * @property {string|null} [displayName] CloudFunctionInfo displayName + * @property {string|null} [uri] CloudFunctionInfo uri + * @property {string|null} [location] CloudFunctionInfo location + * @property {number|Long|null} [versionId] CloudFunctionInfo versionId + */ + + /** + * Constructs a new CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CloudFunctionInfo. + * @implements ICloudFunctionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set + */ + function CloudFunctionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.displayName = ""; + + /** + * CloudFunctionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.uri = ""; + + /** + * CloudFunctionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.location = ""; + + /** + * CloudFunctionInfo versionId. + * @member {number|Long} versionId + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo instance + */ + CloudFunctionInfo.create = function create(properties) { + return new CloudFunctionInfo(properties); + }; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); + return writer; + }; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + case 4: { + message.versionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) + return "versionId: integer|Long expected"; + return null; + }; + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo + */ + CloudFunctionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.versionId != null) + if ($util.Long) + (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; + else if (typeof object.versionId === "string") + message.versionId = parseInt(object.versionId, 10); + else if (typeof object.versionId === "number") + message.versionId = object.versionId; + else if (typeof object.versionId === "object") + message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} message CloudFunctionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionId = options.longs === String ? "0" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (typeof message.versionId === "number") + object.versionId = options.longs === String ? String(message.versionId) : message.versionId; + else + object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; + return object; + }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudFunctionInfo"; + }; + + return CloudFunctionInfo; + })(); + + v1beta1.CloudRunRevisionInfo = (function() { + + /** + * Properties of a CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICloudRunRevisionInfo + * @property {string|null} [displayName] CloudRunRevisionInfo displayName + * @property {string|null} [uri] CloudRunRevisionInfo uri + * @property {string|null} [location] CloudRunRevisionInfo location + * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri + */ + + /** + * Constructs a new CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CloudRunRevisionInfo. + * @implements ICloudRunRevisionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set + */ + function CloudRunRevisionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.displayName = ""; + + /** + * CloudRunRevisionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.uri = ""; + + /** + * CloudRunRevisionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.location = ""; + + /** + * CloudRunRevisionInfo serviceUri. + * @member {string} serviceUri + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.serviceUri = ""; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo instance + */ + CloudRunRevisionInfo.create = function create(properties) { + return new CloudRunRevisionInfo(properties); + }; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + case 5: { + message.serviceUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + if (!$util.isString(message.serviceUri)) + return "serviceUri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo + */ + CloudRunRevisionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.serviceUri != null) + message.serviceUri = String(object.serviceUri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} message CloudRunRevisionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + object.serviceUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + object.serviceUri = message.serviceUri; + return object; + }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo"; + }; + + return CloudRunRevisionInfo; + })(); + + v1beta1.AppEngineVersionInfo = (function() { + + /** + * Properties of an AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IAppEngineVersionInfo + * @property {string|null} [displayName] AppEngineVersionInfo displayName + * @property {string|null} [uri] AppEngineVersionInfo uri + * @property {string|null} [runtime] AppEngineVersionInfo runtime + * @property {string|null} [environment] AppEngineVersionInfo environment + */ + + /** + * Constructs a new AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an AppEngineVersionInfo. + * @implements IAppEngineVersionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set + */ + function AppEngineVersionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.displayName = ""; + + /** + * AppEngineVersionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.uri = ""; + + /** + * AppEngineVersionInfo runtime. + * @member {string} runtime + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.runtime = ""; + + /** + * AppEngineVersionInfo environment. + * @member {string} environment + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.environment = ""; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo instance + */ + AppEngineVersionInfo.create = function create(properties) { + return new AppEngineVersionInfo(properties); + }; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.runtime = reader.string(); + break; + } + case 4: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.runtime != null && message.hasOwnProperty("runtime")) + if (!$util.isString(message.runtime)) + return "runtime: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo + */ + AppEngineVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.runtime != null) + message.runtime = String(object.runtime); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} message AppEngineVersionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.runtime = ""; + object.environment = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.runtime != null && message.hasOwnProperty("runtime")) + object.runtime = message.runtime; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo"; + }; + + return AppEngineVersionInfo; + })(); + + v1beta1.VpcConnectorInfo = (function() { + + /** + * Properties of a VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpcConnectorInfo + * @property {string|null} [displayName] VpcConnectorInfo displayName + * @property {string|null} [uri] VpcConnectorInfo uri + * @property {string|null} [location] VpcConnectorInfo location + */ + + /** + * Constructs a new VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpcConnectorInfo. + * @implements IVpcConnectorInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set + */ + function VpcConnectorInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcConnectorInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.displayName = ""; + + /** + * VpcConnectorInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.uri = ""; + + /** + * VpcConnectorInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.location = ""; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo instance + */ + VpcConnectorInfo.create = function create(properties) { + return new VpcConnectorInfo(properties); + }; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + return writer; + }; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcConnectorInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcConnectorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo + */ + VpcConnectorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} message VpcConnectorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcConnectorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + * @returns {Object.} JSON object + */ + VpcConnectorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcConnectorInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcConnectorInfo"; + }; + + return VpcConnectorInfo; + })(); + + v1beta1.NatInfo = (function() { + + /** + * Properties of a NatInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface INatInfo + * @property {google.cloud.networkmanagement.v1beta1.NatInfo.Type|null} [type] NatInfo type + * @property {string|null} [protocol] NatInfo protocol + * @property {string|null} [networkUri] NatInfo networkUri + * @property {string|null} [oldSourceIp] NatInfo oldSourceIp + * @property {string|null} [newSourceIp] NatInfo newSourceIp + * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp + * @property {string|null} [newDestinationIp] NatInfo newDestinationIp + * @property {number|null} [oldSourcePort] NatInfo oldSourcePort + * @property {number|null} [newSourcePort] NatInfo newSourcePort + * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort + * @property {number|null} [newDestinationPort] NatInfo newDestinationPort + * @property {string|null} [routerUri] NatInfo routerUri + * @property {string|null} [natGatewayName] NatInfo natGatewayName + */ + + /** + * Constructs a new NatInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a NatInfo. + * @implements INatInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set + */ + function NatInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NatInfo type. + * @member {google.cloud.networkmanagement.v1beta1.NatInfo.Type} type + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.type = 0; + + /** + * NatInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.protocol = ""; + + /** + * NatInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.networkUri = ""; + + /** + * NatInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourceIp = ""; + + /** + * NatInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newSourceIp = ""; + + /** + * NatInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationIp = ""; + + /** + * NatInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationIp = ""; + + /** + * NatInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourcePort = 0; + + /** + * NatInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newSourcePort = 0; + + /** + * NatInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationPort = 0; + + /** + * NatInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationPort = 0; + + /** + * NatInfo routerUri. + * @member {string} routerUri + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.routerUri = ""; + + /** + * NatInfo natGatewayName. + * @member {string} natGatewayName + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.natGatewayName = ""; + + /** + * Creates a new NatInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo instance + */ + NatInfo.create = function create(properties) { + return new NatInfo(properties); + }; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); + if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); + if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); + return writer; + }; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.protocol = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.oldSourceIp = reader.string(); + break; + } + case 5: { + message.newSourceIp = reader.string(); + break; + } + case 6: { + message.oldDestinationIp = reader.string(); + break; + } + case 7: { + message.newDestinationIp = reader.string(); + break; + } + case 8: { + message.oldSourcePort = reader.int32(); + break; + } + case 9: { + message.newSourcePort = reader.int32(); + break; + } + case 10: { + message.oldDestinationPort = reader.int32(); + break; + } + case 11: { + message.newDestinationPort = reader.int32(); + break; + } + case 12: { + message.routerUri = reader.string(); + break; + } + case 13: { + message.natGatewayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NatInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NatInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + if (!$util.isString(message.routerUri)) + return "routerUri: string expected"; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + if (!$util.isString(message.natGatewayName)) + return "natGatewayName: string expected"; + return null; + }; + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo + */ + NatInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NatInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INTERNAL_TO_EXTERNAL": + case 1: + message.type = 1; + break; + case "EXTERNAL_TO_INTERNAL": + case 2: + message.type = 2; + break; + case "CLOUD_NAT": + case 3: + message.type = 3; + break; + case "PRIVATE_SERVICE_CONNECT": + case 4: + message.type = 4; + break; + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.routerUri != null) + message.routerUri = String(object.routerUri); + if (object.natGatewayName != null) + message.natGatewayName = String(object.natGatewayName); + return message; + }; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.NatInfo} message NatInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NatInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.protocol = ""; + object.networkUri = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.routerUri = ""; + object.natGatewayName = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] : message.type; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + object.routerUri = message.routerUri; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + object.natGatewayName = message.natGatewayName; + return object; + }; + + /** + * Converts this NatInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + * @returns {Object.} JSON object + */ + NatInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NatInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NatInfo"; + }; + + /** + * Type enum. + * @name google.cloud.networkmanagement.v1beta1.NatInfo.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value + * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value + * @property {number} CLOUD_NAT=3 CLOUD_NAT value + * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value + */ + NatInfo.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; + values[valuesById[3] = "CLOUD_NAT"] = 3; + values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; + return values; + })(); + + return NatInfo; + })(); + + v1beta1.ProxyConnectionInfo = (function() { + + /** + * Properties of a ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IProxyConnectionInfo + * @property {string|null} [protocol] ProxyConnectionInfo protocol + * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp + * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp + * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp + * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp + * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort + * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort + * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort + * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort + * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri + * @property {string|null} [networkUri] ProxyConnectionInfo networkUri + */ + + /** + * Constructs a new ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ProxyConnectionInfo. + * @implements IProxyConnectionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set + */ + function ProxyConnectionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProxyConnectionInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.protocol = ""; + + /** + * ProxyConnectionInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourceIp = ""; + + /** + * ProxyConnectionInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourceIp = ""; + + /** + * ProxyConnectionInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationIp = ""; + + /** + * ProxyConnectionInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationIp = ""; + + /** + * ProxyConnectionInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourcePort = 0; + + /** + * ProxyConnectionInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourcePort = 0; + + /** + * ProxyConnectionInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationPort = 0; + + /** + * ProxyConnectionInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationPort = 0; + + /** + * ProxyConnectionInfo subnetUri. + * @member {string} subnetUri + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.subnetUri = ""; + + /** + * ProxyConnectionInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.networkUri = ""; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo instance + */ + ProxyConnectionInfo.create = function create(properties) { + return new ProxyConnectionInfo(properties); + }; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); + if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); + return writer; + }; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protocol = reader.string(); + break; + } + case 2: { + message.oldSourceIp = reader.string(); + break; + } + case 3: { + message.newSourceIp = reader.string(); + break; + } + case 4: { + message.oldDestinationIp = reader.string(); + break; + } + case 5: { + message.newDestinationIp = reader.string(); + break; + } + case 6: { + message.oldSourcePort = reader.int32(); + break; + } + case 7: { + message.newSourcePort = reader.int32(); + break; + } + case 8: { + message.oldDestinationPort = reader.int32(); + break; + } + case 9: { + message.newDestinationPort = reader.int32(); + break; + } + case 10: { + message.subnetUri = reader.string(); + break; + } + case 11: { + message.networkUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProxyConnectionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProxyConnectionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + if (!$util.isString(message.subnetUri)) + return "subnetUri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + return null; + }; + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo + */ + ProxyConnectionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.subnetUri != null) + message.subnetUri = String(object.subnetUri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + return message; + }; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} message ProxyConnectionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProxyConnectionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protocol = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.subnetUri = ""; + object.networkUri = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + object.subnetUri = message.subnetUri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + return object; + }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + * @returns {Object.} JSON object + */ + ProxyConnectionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo"; + }; + + return ProxyConnectionInfo; + })(); + + v1beta1.LoadBalancerBackendInfo = (function() { + + /** + * Properties of a LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILoadBalancerBackendInfo + * @property {string|null} [name] LoadBalancerBackendInfo name + * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri + * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri + * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri + * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri + * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri + * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget + * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState + */ + + /** + * Constructs a new LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LoadBalancerBackendInfo. + * @implements ILoadBalancerBackendInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set + */ + function LoadBalancerBackendInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackendInfo name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.name = ""; + + /** + * LoadBalancerBackendInfo instanceUri. + * @member {string} instanceUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceUri = ""; + + /** + * LoadBalancerBackendInfo backendServiceUri. + * @member {string} backendServiceUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendServiceUri = ""; + + /** + * LoadBalancerBackendInfo instanceGroupUri. + * @member {string} instanceGroupUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; + + /** + * LoadBalancerBackendInfo networkEndpointGroupUri. + * @member {string} networkEndpointGroupUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; + + /** + * LoadBalancerBackendInfo backendBucketUri. + * @member {string} backendBucketUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendBucketUri = ""; + + /** + * LoadBalancerBackendInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * LoadBalancerBackendInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; + + /** + * LoadBalancerBackendInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerBackendInfo healthCheckFirewallsConfigState. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance + */ + LoadBalancerBackendInfo.create = function create(properties) { + return new LoadBalancerBackendInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); + if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); + if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); + if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); + if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); + if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instanceUri = reader.string(); + break; + } + case 3: { + message.backendServiceUri = reader.string(); + break; + } + case 4: { + message.instanceGroupUri = reader.string(); + break; + } + case 5: { + message.networkEndpointGroupUri = reader.string(); + break; + } + case 8: { + message.backendBucketUri = reader.string(); + break; + } + case 9: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 10: { + message.pscGoogleApiTarget = reader.string(); + break; + } + case 6: { + message.healthCheckUri = reader.string(); + break; + } + case 7: { + message.healthCheckFirewallsConfigState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackendInfo.verify = function verify(message) { + if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) + if (!$util.isString(message.instanceUri)) + return "instanceUri: string expected"; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + if (!$util.isString(message.backendServiceUri)) + return "backendServiceUri: string expected"; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + if (!$util.isString(message.instanceGroupUri)) + return "instanceGroupUri: string expected"; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + if (!$util.isString(message.networkEndpointGroupUri)) + return "networkEndpointGroupUri: string expected"; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + if (!$util.isString(message.backendBucketUri)) + return "backendBucketUri: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + switch (message.healthCheckFirewallsConfigState) { + default: + return "healthCheckFirewallsConfigState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + */ + LoadBalancerBackendInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceUri != null) + message.instanceUri = String(object.instanceUri); + if (object.backendServiceUri != null) + message.backendServiceUri = String(object.backendServiceUri); + if (object.instanceGroupUri != null) + message.instanceGroupUri = String(object.instanceGroupUri); + if (object.networkEndpointGroupUri != null) + message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); + if (object.backendBucketUri != null) + message.backendBucketUri = String(object.backendBucketUri); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + switch (object.healthCheckFirewallsConfigState) { + default: + if (typeof object.healthCheckFirewallsConfigState === "number") { + message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; + break; + } + break; + case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallsConfigState = 0; + break; + case "FIREWALLS_CONFIGURED": + case 1: + message.healthCheckFirewallsConfigState = 1; + break; + case "FIREWALLS_PARTIALLY_CONFIGURED": + case 2: + message.healthCheckFirewallsConfigState = 2; + break; + case "FIREWALLS_NOT_CONFIGURED": + case 3: + message.healthCheckFirewallsConfigState = 3; + break; + case "FIREWALLS_UNSUPPORTED": + case 4: + message.healthCheckFirewallsConfigState = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackendInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceUri = ""; + object.backendServiceUri = ""; + object.instanceGroupUri = ""; + object.networkEndpointGroupUri = ""; + object.healthCheckUri = ""; + object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; + object.backendBucketUri = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) + object.instanceUri = message.instanceUri; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + object.backendServiceUri = message.backendServiceUri; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + object.instanceGroupUri = message.instanceGroupUri; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + object.networkEndpointGroupUri = message.networkEndpointGroupUri; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + object.backendBucketUri = message.backendBucketUri; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo"; + }; + + /** + * HealthCheckFirewallsConfigState enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value + * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value + * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value + * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value + * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value + */ + LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; + values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; + values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; + values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; + return values; + })(); + + return LoadBalancerBackendInfo; + })(); + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value + * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value + * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value + * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value + * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value + * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value + * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value + * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value + * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value + * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value + */ + v1beta1.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; + values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; + values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; + values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; + values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; + values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; + values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; + values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; + values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; + values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; + return values; + })(); + + v1beta1.StorageBucketInfo = (function() { + + /** + * Properties of a StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IStorageBucketInfo + * @property {string|null} [bucket] StorageBucketInfo bucket + */ + + /** + * Constructs a new StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a StorageBucketInfo. + * @implements IStorageBucketInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set + */ + function StorageBucketInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageBucketInfo bucket. + * @member {string} bucket + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @instance + */ + StorageBucketInfo.prototype.bucket = ""; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo instance + */ + StorageBucketInfo.create = function create(properties) { + return new StorageBucketInfo(properties); + }; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageBucketInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageBucketInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo + */ + StorageBucketInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} message StorageBucketInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageBucketInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this StorageBucketInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @instance + * @returns {Object.} JSON object + */ + StorageBucketInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageBucketInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.StorageBucketInfo"; + }; + + return StorageBucketInfo; + })(); + + v1beta1.ServerlessNegInfo = (function() { + + /** + * Properties of a ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IServerlessNegInfo + * @property {string|null} [negUri] ServerlessNegInfo negUri + */ + + /** + * Constructs a new ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ServerlessNegInfo. + * @implements IServerlessNegInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set + */ + function ServerlessNegInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerlessNegInfo negUri. + * @member {string} negUri + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @instance + */ + ServerlessNegInfo.prototype.negUri = ""; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo instance + */ + ServerlessNegInfo.create = function create(properties) { + return new ServerlessNegInfo(properties); + }; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); + return writer; + }; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.negUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerlessNegInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerlessNegInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.negUri != null && message.hasOwnProperty("negUri")) + if (!$util.isString(message.negUri)) + return "negUri: string expected"; + return null; + }; + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo + */ + ServerlessNegInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); + if (object.negUri != null) + message.negUri = String(object.negUri); + return message; + }; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} message ServerlessNegInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerlessNegInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.negUri = ""; + if (message.negUri != null && message.hasOwnProperty("negUri")) + object.negUri = message.negUri; + return object; + }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @instance + * @returns {Object.} JSON object + */ + ServerlessNegInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerlessNegInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ServerlessNegInfo"; + }; + + return ServerlessNegInfo; + })(); + + v1beta1.ReachabilityService = (function() { + + /** + * Constructs a new ReachabilityService service. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ReachabilityService + * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; + + /** + * Creates new ReachabilityService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. + */ + ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef ListConnectivityTestsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse + */ + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { + return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, request, callback); + }, "name", { value: "ListConnectivityTests" }); + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef GetConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} [response] ConnectivityTest + */ + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { + return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest, request, callback); + }, "name", { value: "GetConnectivityTest" }); + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef CreateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { + return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConnectivityTest" }); + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef UpdateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { + return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConnectivityTest" }); + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef RerunConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { + return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RerunConnectivityTest" }); + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef DeleteConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { + return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConnectivityTest" }); + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReachabilityService; + })(); + + v1beta1.ListConnectivityTestsRequest = (function() { + + /** + * Properties of a ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListConnectivityTestsRequest + * @property {string|null} [parent] ListConnectivityTestsRequest parent + * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize + * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken + * @property {string|null} [filter] ListConnectivityTestsRequest filter + * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy + */ + + /** + * Constructs a new ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListConnectivityTestsRequest. + * @implements IListConnectivityTestsRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set + */ + function ListConnectivityTestsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectivityTestsRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.parent = ""; + + /** + * ListConnectivityTestsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageSize = 0; + + /** + * ListConnectivityTestsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageToken = ""; + + /** + * ListConnectivityTestsRequest filter. + * @member {string} filter + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.filter = ""; + + /** + * ListConnectivityTestsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance + */ + ListConnectivityTestsRequest.create = function create(properties) { + return new ListConnectivityTestsRequest(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + */ + ListConnectivityTestsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest"; + }; + + return ListConnectivityTestsRequest; + })(); + + v1beta1.ListConnectivityTestsResponse = (function() { + + /** + * Properties of a ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListConnectivityTestsResponse + * @property {Array.|null} [resources] ListConnectivityTestsResponse resources + * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken + * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable + */ + + /** + * Constructs a new ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListConnectivityTestsResponse. + * @implements IListConnectivityTestsResponse + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set + */ + function ListConnectivityTestsResponse(properties) { + this.resources = []; + 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]]; + } + + /** + * ListConnectivityTestsResponse resources. + * @member {Array.} resources + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; + + /** + * ListConnectivityTestsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.nextPageToken = ""; + + /** + * ListConnectivityTestsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance + */ + ListConnectivityTestsResponse.create = function create(properties) { + return new ListConnectivityTestsResponse(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resources[i]); + if (error) + return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + */ + ListConnectivityTestsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse"; + }; + + return ListConnectivityTestsResponse; + })(); + + v1beta1.GetConnectivityTestRequest = (function() { + + /** + * Properties of a GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGetConnectivityTestRequest + * @property {string|null} [name] GetConnectivityTestRequest name + */ + + /** + * Constructs a new GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GetConnectivityTestRequest. + * @implements IGetConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set + */ + function GetConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @instance + */ + GetConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest instance + */ + GetConnectivityTestRequest.create = function create(properties) { + return new GetConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encode = function encode(message, writer) { + 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); + 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectivityTestRequest.verify = function verify(message) { + if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest + */ + GetConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} message GetConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest"; + }; + + return GetConnectivityTestRequest; + })(); + + v1beta1.CreateConnectivityTestRequest = (function() { + + /** + * Properties of a CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICreateConnectivityTestRequest + * @property {string|null} [parent] CreateConnectivityTestRequest parent + * @property {string|null} [testId] CreateConnectivityTestRequest testId + * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource + */ + + /** + * Constructs a new CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CreateConnectivityTestRequest. + * @implements ICreateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set + */ + function CreateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectivityTestRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.parent = ""; + + /** + * CreateConnectivityTestRequest testId. + * @member {string} testId + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.testId = ""; + + /** + * CreateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance + */ + CreateConnectivityTestRequest.create = function create(properties) { + return new CreateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.testId = reader.string(); + break; + } + case 3: { + message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) + if (!$util.isString(message.testId)) + return "testId: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + */ + CreateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.testId != null) + message.testId = String(object.testId); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.testId = ""; + object.resource = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.testId != null && message.hasOwnProperty("testId")) + object.testId = message.testId; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest"; + }; + + return CreateConnectivityTestRequest; + })(); + + v1beta1.UpdateConnectivityTestRequest = (function() { + + /** + * Properties of an UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IUpdateConnectivityTestRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask + * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource + */ + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an UpdateConnectivityTestRequest. + * @implements IUpdateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set + */ + function UpdateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectivityTestRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.updateMask = null; + + /** + * UpdateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance + */ + UpdateConnectivityTestRequest.create = function create(properties) { + return new UpdateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); + 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.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + */ + UpdateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.resource = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest"; + }; + + return UpdateConnectivityTestRequest; + })(); + + v1beta1.DeleteConnectivityTestRequest = (function() { + + /** + * Properties of a DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDeleteConnectivityTestRequest + * @property {string|null} [name] DeleteConnectivityTestRequest name + */ + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DeleteConnectivityTestRequest. + * @implements IDeleteConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set + */ + function DeleteConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @instance + */ + DeleteConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance + */ + DeleteConnectivityTestRequest.create = function create(properties) { + return new DeleteConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encode = function encode(message, writer) { + 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); + 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectivityTestRequest.verify = function verify(message) { + if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + */ + DeleteConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest"; + }; + + return DeleteConnectivityTestRequest; + })(); + + v1beta1.RerunConnectivityTestRequest = (function() { + + /** + * Properties of a RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRerunConnectivityTestRequest + * @property {string|null} [name] RerunConnectivityTestRequest name + */ + + /** + * Constructs a new RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RerunConnectivityTestRequest. + * @implements IRerunConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set + */ + function RerunConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RerunConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @instance + */ + RerunConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance + */ + RerunConnectivityTestRequest.create = function create(properties) { + return new RerunConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encode = function encode(message, writer) { + 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); + 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RerunConnectivityTestRequest.verify = function verify(message) { + if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + */ + RerunConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest"; + }; + + return RerunConnectivityTestRequest; + })(); + + v1beta1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.networkmanagement.v1beta1 + * @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} [statusDetail] OperationMetadata statusDetail + * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusDetail. + * @member {string} statusDetail + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusDetail = ""; + + /** + * OperationMetadata cancelRequested. + * @member {boolean} cancelRequested + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.cancelRequested = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); + if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusDetail = reader.string(); + break; + } + case 6: { + message.cancelRequested = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + 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.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + if (typeof message.cancelRequested !== "boolean") + return "cancelRequested: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: 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.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.OperationMetadata) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.cancelRequested != null) + message.cancelRequested = Boolean(object.cancelRequested); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusDetail = ""; + object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + object.cancelRequested = message.cancelRequested; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1beta1.VpcFlowLogsService = (function() { + + /** + * Constructs a new VpcFlowLogsService service. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpcFlowLogsService + * @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 VpcFlowLogsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (VpcFlowLogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VpcFlowLogsService; + + /** + * Creates new VpcFlowLogsService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @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 {VpcFlowLogsService} RPC service. Useful where requests and/or responses are streamed. + */ + VpcFlowLogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef ListVpcFlowLogsConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} [response] ListVpcFlowLogsConfigsResponse + */ + + /** + * Calls ListVpcFlowLogsConfigs. + * @function listVpcFlowLogsConfigs + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback} callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.listVpcFlowLogsConfigs = function listVpcFlowLogsConfigs(request, callback) { + return this.rpcCall(listVpcFlowLogsConfigs, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, request, callback); + }, "name", { value: "ListVpcFlowLogsConfigs" }); + + /** + * Calls ListVpcFlowLogsConfigs. + * @function listVpcFlowLogsConfigs + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef GetVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} [response] VpcFlowLogsConfig + */ + + /** + * Calls GetVpcFlowLogsConfig. + * @function getVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and VpcFlowLogsConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.getVpcFlowLogsConfig = function getVpcFlowLogsConfig(request, callback) { + return this.rpcCall(getVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, request, callback); + }, "name", { value: "GetVpcFlowLogsConfig" }); + + /** + * Calls GetVpcFlowLogsConfig. + * @function getVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef CreateVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateVpcFlowLogsConfig. + * @function createVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.createVpcFlowLogsConfig = function createVpcFlowLogsConfig(request, callback) { + return this.rpcCall(createVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateVpcFlowLogsConfig" }); + + /** + * Calls CreateVpcFlowLogsConfig. + * @function createVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef UpdateVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateVpcFlowLogsConfig. + * @function updateVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.updateVpcFlowLogsConfig = function updateVpcFlowLogsConfig(request, callback) { + return this.rpcCall(updateVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateVpcFlowLogsConfig" }); + + /** + * Calls UpdateVpcFlowLogsConfig. + * @function updateVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef DeleteVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteVpcFlowLogsConfig. + * @function deleteVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.deleteVpcFlowLogsConfig = function deleteVpcFlowLogsConfig(request, callback) { + return this.rpcCall(deleteVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVpcFlowLogsConfig" }); + + /** + * Calls DeleteVpcFlowLogsConfig. + * @function deleteVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return VpcFlowLogsService; + })(); + + v1beta1.ListVpcFlowLogsConfigsRequest = (function() { + + /** + * Properties of a ListVpcFlowLogsConfigsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListVpcFlowLogsConfigsRequest + * @property {string|null} [parent] ListVpcFlowLogsConfigsRequest parent + * @property {number|null} [pageSize] ListVpcFlowLogsConfigsRequest pageSize + * @property {string|null} [pageToken] ListVpcFlowLogsConfigsRequest pageToken + * @property {string|null} [filter] ListVpcFlowLogsConfigsRequest filter + * @property {string|null} [orderBy] ListVpcFlowLogsConfigsRequest orderBy + */ + + /** + * Constructs a new ListVpcFlowLogsConfigsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListVpcFlowLogsConfigsRequest. + * @implements IListVpcFlowLogsConfigsRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set + */ + function ListVpcFlowLogsConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVpcFlowLogsConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.parent = ""; + + /** + * ListVpcFlowLogsConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.pageSize = 0; + + /** + * ListVpcFlowLogsConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.pageToken = ""; + + /** + * ListVpcFlowLogsConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.filter = ""; + + /** + * ListVpcFlowLogsConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest instance + */ + ListVpcFlowLogsConfigsRequest.create = function create(properties) { + return new ListVpcFlowLogsConfigsRequest(properties); + }; + + /** + * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); + 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 ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVpcFlowLogsConfigsRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest + */ + ListVpcFlowLogsConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); + 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 ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVpcFlowLogsConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVpcFlowLogsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest"; + }; + + return ListVpcFlowLogsConfigsRequest; + })(); + + v1beta1.ListVpcFlowLogsConfigsResponse = (function() { + + /** + * Properties of a ListVpcFlowLogsConfigsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListVpcFlowLogsConfigsResponse + * @property {Array.|null} [vpcFlowLogsConfigs] ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs + * @property {string|null} [nextPageToken] ListVpcFlowLogsConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListVpcFlowLogsConfigsResponse unreachable + */ + + /** + * Constructs a new ListVpcFlowLogsConfigsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListVpcFlowLogsConfigsResponse. + * @implements IListVpcFlowLogsConfigsResponse + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set + */ + function ListVpcFlowLogsConfigsResponse(properties) { + this.vpcFlowLogsConfigs = []; + 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]]; + } + + /** + * ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. + * @member {Array.} vpcFlowLogsConfigs + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + */ + ListVpcFlowLogsConfigsResponse.prototype.vpcFlowLogsConfigs = $util.emptyArray; + + /** + * ListVpcFlowLogsConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + */ + ListVpcFlowLogsConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListVpcFlowLogsConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + */ + ListVpcFlowLogsConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse instance + */ + ListVpcFlowLogsConfigsResponse.create = function create(properties) { + return new ListVpcFlowLogsConfigsResponse(properties); + }; + + /** + * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vpcFlowLogsConfigs != null && message.vpcFlowLogsConfigs.length) + for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length)) + message.vpcFlowLogsConfigs = []; + message.vpcFlowLogsConfigs.push($root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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 ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVpcFlowLogsConfigsResponse message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVpcFlowLogsConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vpcFlowLogsConfigs != null && message.hasOwnProperty("vpcFlowLogsConfigs")) { + if (!Array.isArray(message.vpcFlowLogsConfigs)) + return "vpcFlowLogsConfigs: array expected"; + for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfigs[i]); + if (error) + return "vpcFlowLogsConfigs." + 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 ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse + */ + ListVpcFlowLogsConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); + if (object.vpcFlowLogsConfigs) { + if (!Array.isArray(object.vpcFlowLogsConfigs)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: array expected"); + message.vpcFlowLogsConfigs = []; + for (var i = 0; i < object.vpcFlowLogsConfigs.length; ++i) { + if (typeof object.vpcFlowLogsConfigs[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: object expected"); + message.vpcFlowLogsConfigs[i] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.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 ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVpcFlowLogsConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.vpcFlowLogsConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length) { + object.vpcFlowLogsConfigs = []; + for (var j = 0; j < message.vpcFlowLogsConfigs.length; ++j) + object.vpcFlowLogsConfigs[j] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVpcFlowLogsConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVpcFlowLogsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse"; + }; + + return ListVpcFlowLogsConfigsResponse; + })(); + + v1beta1.GetVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of a GetVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGetVpcFlowLogsConfigRequest + * @property {string|null} [name] GetVpcFlowLogsConfigRequest name + */ + + /** + * Constructs a new GetVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GetVpcFlowLogsConfigRequest. + * @implements IGetVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function GetVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVpcFlowLogsConfigRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @instance + */ + GetVpcFlowLogsConfigRequest.prototype.name = ""; + + /** + * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest instance + */ + GetVpcFlowLogsConfigRequest.create = function create(properties) { + return new GetVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVpcFlowLogsConfigRequest.encode = function encode(message, writer) { + 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 GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); + 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 GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVpcFlowLogsConfigRequest.verify = function verify(message) { + if (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 GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest + */ + GetVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVpcFlowLogsConfigRequest.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 GetVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest"; + }; + + return GetVpcFlowLogsConfigRequest; + })(); + + v1beta1.CreateVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of a CreateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICreateVpcFlowLogsConfigRequest + * @property {string|null} [parent] CreateVpcFlowLogsConfigRequest parent + * @property {string|null} [vpcFlowLogsConfigId] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId + * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig + */ + + /** + * Constructs a new CreateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CreateVpcFlowLogsConfigRequest. + * @implements ICreateVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function CreateVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVpcFlowLogsConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + */ + CreateVpcFlowLogsConfigRequest.prototype.parent = ""; + + /** + * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. + * @member {string} vpcFlowLogsConfigId + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + */ + CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfigId = ""; + + /** + * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. + * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + */ + CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; + + /** + * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest instance + */ + CreateVpcFlowLogsConfigRequest.create = function create(properties) { + return new CreateVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfigId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vpcFlowLogsConfigId); + if (message.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) + $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.vpcFlowLogsConfigId = reader.string(); + break; + } + case 3: { + message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) + if (!$util.isString(message.vpcFlowLogsConfigId)) + return "vpcFlowLogsConfigId: string expected"; + if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); + if (error) + return "vpcFlowLogsConfig." + error; + } + return null; + }; + + /** + * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest + */ + CreateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.vpcFlowLogsConfigId != null) + message.vpcFlowLogsConfigId = String(object.vpcFlowLogsConfigId); + if (object.vpcFlowLogsConfig != null) { + if (typeof object.vpcFlowLogsConfig !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); + message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.vpcFlowLogsConfigId = ""; + object.vpcFlowLogsConfig = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) + object.vpcFlowLogsConfigId = message.vpcFlowLogsConfigId; + if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) + object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); + return object; + }; + + /** + * Converts this CreateVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest"; + }; + + return CreateVpcFlowLogsConfigRequest; + })(); + + v1beta1.UpdateVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of an UpdateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IUpdateVpcFlowLogsConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVpcFlowLogsConfigRequest updateMask + * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig + */ + + /** + * Constructs a new UpdateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an UpdateVpcFlowLogsConfigRequest. + * @implements IUpdateVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function UpdateVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateVpcFlowLogsConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @instance + */ + UpdateVpcFlowLogsConfigRequest.prototype.updateMask = null; + + /** + * UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. + * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @instance + */ + UpdateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; + + /** + * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest instance + */ + UpdateVpcFlowLogsConfigRequest.create = function create(properties) { + return new UpdateVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) + $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); + 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.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); + if (error) + return "vpcFlowLogsConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest + */ + UpdateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.vpcFlowLogsConfig != null) { + if (typeof object.vpcFlowLogsConfig !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); + message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.vpcFlowLogsConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) + object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); + return object; + }; + + /** + * Converts this UpdateVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest"; + }; + + return UpdateVpcFlowLogsConfigRequest; + })(); + + v1beta1.DeleteVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of a DeleteVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDeleteVpcFlowLogsConfigRequest + * @property {string|null} [name] DeleteVpcFlowLogsConfigRequest name + */ + + /** + * Constructs a new DeleteVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DeleteVpcFlowLogsConfigRequest. + * @implements IDeleteVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function DeleteVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVpcFlowLogsConfigRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @instance + */ + DeleteVpcFlowLogsConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest instance + */ + DeleteVpcFlowLogsConfigRequest.create = function create(properties) { + return new DeleteVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVpcFlowLogsConfigRequest.encode = function encode(message, writer) { + 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 DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); + 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 DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVpcFlowLogsConfigRequest.verify = function verify(message) { + if (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 DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest + */ + DeleteVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVpcFlowLogsConfigRequest.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 DeleteVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest"; + }; + + return DeleteVpcFlowLogsConfigRequest; + })(); + + v1beta1.VpcFlowLogsConfig = (function() { + + /** + * Properties of a VpcFlowLogsConfig. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpcFlowLogsConfig + * @property {string|null} [name] VpcFlowLogsConfig name + * @property {string|null} [description] VpcFlowLogsConfig description + * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null} [state] VpcFlowLogsConfig state + * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null} [aggregationInterval] VpcFlowLogsConfig aggregationInterval + * @property {number|null} [flowSampling] VpcFlowLogsConfig flowSampling + * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null} [metadata] VpcFlowLogsConfig metadata + * @property {Array.|null} [metadataFields] VpcFlowLogsConfig metadataFields + * @property {string|null} [filterExpr] VpcFlowLogsConfig filterExpr + * @property {string|null} [interconnectAttachment] VpcFlowLogsConfig interconnectAttachment + * @property {string|null} [vpnTunnel] VpcFlowLogsConfig vpnTunnel + * @property {Object.|null} [labels] VpcFlowLogsConfig labels + * @property {google.protobuf.ITimestamp|null} [createTime] VpcFlowLogsConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] VpcFlowLogsConfig updateTime + */ + + /** + * Constructs a new VpcFlowLogsConfig. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpcFlowLogsConfig. + * @implements IVpcFlowLogsConfig + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set + */ + function VpcFlowLogsConfig(properties) { + this.metadataFields = []; + 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]]; + } + + /** + * VpcFlowLogsConfig name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.name = ""; + + /** + * VpcFlowLogsConfig description. + * @member {string|null|undefined} description + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.description = null; + + /** + * VpcFlowLogsConfig state. + * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null|undefined} state + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.state = null; + + /** + * VpcFlowLogsConfig aggregationInterval. + * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null|undefined} aggregationInterval + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.aggregationInterval = null; + + /** + * VpcFlowLogsConfig flowSampling. + * @member {number|null|undefined} flowSampling + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.flowSampling = null; + + /** + * VpcFlowLogsConfig metadata. + * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null|undefined} metadata + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.metadata = null; + + /** + * VpcFlowLogsConfig metadataFields. + * @member {Array.} metadataFields + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.metadataFields = $util.emptyArray; + + /** + * VpcFlowLogsConfig filterExpr. + * @member {string|null|undefined} filterExpr + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.filterExpr = null; + + /** + * VpcFlowLogsConfig interconnectAttachment. + * @member {string|null|undefined} interconnectAttachment + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.interconnectAttachment = null; + + /** + * VpcFlowLogsConfig vpnTunnel. + * @member {string|null|undefined} vpnTunnel + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.vpnTunnel = null; + + /** + * VpcFlowLogsConfig labels. + * @member {Object.} labels + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.labels = $util.emptyObject; + + /** + * VpcFlowLogsConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.createTime = null; + + /** + * VpcFlowLogsConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VpcFlowLogsConfig _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _state. + * @member {"state"|undefined} _state + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _aggregationInterval. + * @member {"aggregationInterval"|undefined} _aggregationInterval + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_aggregationInterval", { + get: $util.oneOfGetter($oneOfFields = ["aggregationInterval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _flowSampling. + * @member {"flowSampling"|undefined} _flowSampling + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_flowSampling", { + get: $util.oneOfGetter($oneOfFields = ["flowSampling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _filterExpr. + * @member {"filterExpr"|undefined} _filterExpr + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_filterExpr", { + get: $util.oneOfGetter($oneOfFields = ["filterExpr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig targetResource. + * @member {"interconnectAttachment"|"vpnTunnel"|undefined} targetResource + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "targetResource", { + get: $util.oneOfGetter($oneOfFields = ["interconnectAttachment", "vpnTunnel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VpcFlowLogsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig instance + */ + VpcFlowLogsConfig.create = function create(properties) { + return new VpcFlowLogsConfig(properties); + }; + + /** + * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcFlowLogsConfig.encode = function encode(message, writer) { + if (!writer) + 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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.aggregationInterval != null && Object.hasOwnProperty.call(message, "aggregationInterval")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aggregationInterval); + if (message.flowSampling != null && Object.hasOwnProperty.call(message, "flowSampling")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.flowSampling); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.metadata); + if (message.metadataFields != null && message.metadataFields.length) + for (var i = 0; i < message.metadataFields.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.metadataFields[i]); + if (message.filterExpr != null && Object.hasOwnProperty.call(message, "filterExpr")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.filterExpr); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).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 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.interconnectAttachment != null && Object.hasOwnProperty.call(message, "interconnectAttachment")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.interconnectAttachment); + if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.vpnTunnel); + return writer; + }; + + /** + * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcFlowLogsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcFlowLogsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(), 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.state = reader.int32(); + break; + } + case 4: { + message.aggregationInterval = reader.int32(); + break; + } + case 5: { + message.flowSampling = reader.float(); + break; + } + case 6: { + message.metadata = reader.int32(); + break; + } + case 7: { + if (!(message.metadataFields && message.metadataFields.length)) + message.metadataFields = []; + message.metadataFields.push(reader.string()); + break; + } + case 8: { + message.filterExpr = reader.string(); + break; + } + case 102: { + message.interconnectAttachment = reader.string(); + break; + } + case 103: { + message.vpnTunnel = reader.string(); + break; + } + case 11: { + 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 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcFlowLogsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcFlowLogsConfig message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcFlowLogsConfig.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.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { + properties._aggregationInterval = 1; + switch (message.aggregationInterval) { + default: + return "aggregationInterval: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { + properties._flowSampling = 1; + if (typeof message.flowSampling !== "number") + return "flowSampling: number expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + switch (message.metadata) { + default: + return "metadata: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.metadataFields != null && message.hasOwnProperty("metadataFields")) { + if (!Array.isArray(message.metadataFields)) + return "metadataFields: array expected"; + for (var i = 0; i < message.metadataFields.length; ++i) + if (!$util.isString(message.metadataFields[i])) + return "metadataFields: string[] expected"; + } + if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { + properties._filterExpr = 1; + if (!$util.isString(message.filterExpr)) + return "filterExpr: string expected"; + } + if (message.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { + properties.targetResource = 1; + if (!$util.isString(message.interconnectAttachment)) + return "interconnectAttachment: string expected"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + if (properties.targetResource === 1) + return "targetResource: multiple values"; + properties.targetResource = 1; + if (!$util.isString(message.vpnTunnel)) + return "vpnTunnel: 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; + } + return null; + }; + + /** + * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig + */ + VpcFlowLogsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ENABLED": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + } + switch (object.aggregationInterval) { + default: + if (typeof object.aggregationInterval === "number") { + message.aggregationInterval = object.aggregationInterval; + break; + } + break; + case "AGGREGATION_INTERVAL_UNSPECIFIED": + case 0: + message.aggregationInterval = 0; + break; + case "INTERVAL_5_SEC": + case 1: + message.aggregationInterval = 1; + break; + case "INTERVAL_30_SEC": + case 2: + message.aggregationInterval = 2; + break; + case "INTERVAL_1_MIN": + case 3: + message.aggregationInterval = 3; + break; + case "INTERVAL_5_MIN": + case 4: + message.aggregationInterval = 4; + break; + case "INTERVAL_10_MIN": + case 5: + message.aggregationInterval = 5; + break; + case "INTERVAL_15_MIN": + case 6: + message.aggregationInterval = 6; + break; + } + if (object.flowSampling != null) + message.flowSampling = Number(object.flowSampling); + switch (object.metadata) { + default: + if (typeof object.metadata === "number") { + message.metadata = object.metadata; + break; + } + break; + case "METADATA_UNSPECIFIED": + case 0: + message.metadata = 0; + break; + case "INCLUDE_ALL_METADATA": + case 1: + message.metadata = 1; + break; + case "EXCLUDE_ALL_METADATA": + case 2: + message.metadata = 2; + break; + case "CUSTOM_METADATA": + case 3: + message.metadata = 3; + break; + } + if (object.metadataFields) { + if (!Array.isArray(object.metadataFields)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.metadataFields: array expected"); + message.metadataFields = []; + for (var i = 0; i < object.metadataFields.length; ++i) + message.metadataFields[i] = String(object.metadataFields[i]); + } + if (object.filterExpr != null) + message.filterExpr = String(object.filterExpr); + if (object.interconnectAttachment != null) + message.interconnectAttachment = String(object.interconnectAttachment); + if (object.vpnTunnel != null) + message.vpnTunnel = String(object.vpnTunnel); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} message VpcFlowLogsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcFlowLogsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metadataFields = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + } + 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.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { + object.aggregationInterval = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] === undefined ? message.aggregationInterval : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] : message.aggregationInterval; + if (options.oneofs) + object._aggregationInterval = "aggregationInterval"; + } + if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { + object.flowSampling = options.json && !isFinite(message.flowSampling) ? String(message.flowSampling) : message.flowSampling; + if (options.oneofs) + object._flowSampling = "flowSampling"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] === undefined ? message.metadata : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] : message.metadata; + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.metadataFields && message.metadataFields.length) { + object.metadataFields = []; + for (var j = 0; j < message.metadataFields.length; ++j) + object.metadataFields[j] = message.metadataFields[j]; + } + if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { + object.filterExpr = message.filterExpr; + if (options.oneofs) + object._filterExpr = "filterExpr"; + } + 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.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { + object.interconnectAttachment = message.interconnectAttachment; + if (options.oneofs) + object.targetResource = "interconnectAttachment"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + object.vpnTunnel = message.vpnTunnel; + if (options.oneofs) + object.targetResource = "vpnTunnel"; + } + return object; + }; + + /** + * Converts this VpcFlowLogsConfig to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + * @returns {Object.} JSON object + */ + VpcFlowLogsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcFlowLogsConfig + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcFlowLogsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig"; + }; + + /** + * State enum. + * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + VpcFlowLogsConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + /** + * AggregationInterval enum. + * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval + * @enum {number} + * @property {number} AGGREGATION_INTERVAL_UNSPECIFIED=0 AGGREGATION_INTERVAL_UNSPECIFIED value + * @property {number} INTERVAL_5_SEC=1 INTERVAL_5_SEC value + * @property {number} INTERVAL_30_SEC=2 INTERVAL_30_SEC value + * @property {number} INTERVAL_1_MIN=3 INTERVAL_1_MIN value + * @property {number} INTERVAL_5_MIN=4 INTERVAL_5_MIN value + * @property {number} INTERVAL_10_MIN=5 INTERVAL_10_MIN value + * @property {number} INTERVAL_15_MIN=6 INTERVAL_15_MIN value + */ + VpcFlowLogsConfig.AggregationInterval = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGGREGATION_INTERVAL_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERVAL_5_SEC"] = 1; + values[valuesById[2] = "INTERVAL_30_SEC"] = 2; + values[valuesById[3] = "INTERVAL_1_MIN"] = 3; + values[valuesById[4] = "INTERVAL_5_MIN"] = 4; + values[valuesById[5] = "INTERVAL_10_MIN"] = 5; + values[valuesById[6] = "INTERVAL_15_MIN"] = 6; + return values; + })(); + + /** + * Metadata enum. + * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata + * @enum {number} + * @property {number} METADATA_UNSPECIFIED=0 METADATA_UNSPECIFIED value + * @property {number} INCLUDE_ALL_METADATA=1 INCLUDE_ALL_METADATA value + * @property {number} EXCLUDE_ALL_METADATA=2 EXCLUDE_ALL_METADATA value + * @property {number} CUSTOM_METADATA=3 CUSTOM_METADATA value + */ + VpcFlowLogsConfig.Metadata = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METADATA_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE_ALL_METADATA"] = 1; + values[valuesById[2] = "EXCLUDE_ALL_METADATA"] = 2; + values[valuesById[3] = "CUSTOM_METADATA"] = 3; + return values; + })(); + + return VpcFlowLogsConfig; + })(); + + return v1beta1; + })(); + + return networkmanagement; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + 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; + })(); + + 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.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; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + 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; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + 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"]); + } + 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.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.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.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.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-networkmanagement/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json new file mode 100644 index 00000000000..d0087788008 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json @@ -0,0 +1,4682 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "networkmanagement": { + "nested": { + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.NetworkManagement.V1Beta1", + "go_package": "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb", + "java_multiple_files": true, + "java_outer_classname": "VpcFlowLogsConfigProto", + "java_package": "com.google.cloud.networkmanagement.v1beta1", + "php_namespace": "Google\\Cloud\\NetworkManagement\\V1beta1", + "ruby_package": "Google::Cloud::NetworkManagement::V1beta1" + }, + "nested": { + "ConnectivityTest": { + "options": { + "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", + "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "source": { + "type": "Endpoint", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "destination": { + "type": "Endpoint", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protocol": { + "type": "string", + "id": 5 + }, + "relatedProjects": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reachabilityDetails": { + "type": "ReachabilityDetails", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "probingDetails": { + "type": "ProbingDetails", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bypassFirewallChecks": { + "type": "bool", + "id": 17 + } + } + }, + "Endpoint": { + "oneofs": { + "_forwardingRuleTarget": { + "oneof": [ + "forwardingRuleTarget" + ] + }, + "_loadBalancerId": { + "oneof": [ + "loadBalancerId" + ] + }, + "_loadBalancerType": { + "oneof": [ + "loadBalancerType" + ] + } + }, + "fields": { + "ipAddress": { + "type": "string", + "id": 1 + }, + "port": { + "type": "int32", + "id": 2 + }, + "instance": { + "type": "string", + "id": 3 + }, + "forwardingRule": { + "type": "string", + "id": 13 + }, + "forwardingRuleTarget": { + "type": "ForwardingRuleTarget", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "gkeMasterCluster": { + "type": "string", + "id": 7 + }, + "fqdn": { + "type": "string", + "id": 19 + }, + "cloudSqlInstance": { + "type": "string", + "id": 8 + }, + "redisInstance": { + "type": "string", + "id": 17 + }, + "redisCluster": { + "type": "string", + "id": 18 + }, + "cloudFunction": { + "type": "CloudFunctionEndpoint", + "id": 10 + }, + "appEngineVersion": { + "type": "AppEngineVersionEndpoint", + "id": 11 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionEndpoint", + "id": 12 + }, + "network": { + "type": "string", + "id": 4 + }, + "networkType": { + "type": "NetworkType", + "id": 5 + }, + "projectId": { + "type": "string", + "id": 6 + } + }, + "nested": { + "NetworkType": { + "values": { + "NETWORK_TYPE_UNSPECIFIED": 0, + "GCP_NETWORK": 1, + "NON_GCP_NETWORK": 2 + } + }, + "ForwardingRuleTarget": { + "values": { + "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "LOAD_BALANCER": 2, + "VPN_GATEWAY": 3, + "PSC": 4 + } + }, + "CloudFunctionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "AppEngineVersionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "CloudRunRevisionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ReachabilityDetails": { + "fields": { + "result": { + "type": "Result", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "traces": { + "rule": "repeated", + "type": "Trace", + "id": 5 + } + }, + "nested": { + "Result": { + "values": { + "RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "AMBIGUOUS": 4, + "UNDETERMINED": 5 + } + } + } + }, + "LatencyPercentile": { + "fields": { + "percent": { + "type": "int32", + "id": 1 + }, + "latencyMicros": { + "type": "int64", + "id": 2 + } + } + }, + "LatencyDistribution": { + "fields": { + "latencyPercentiles": { + "rule": "repeated", + "type": "LatencyPercentile", + "id": 1 + } + } + }, + "ProbingDetails": { + "fields": { + "result": { + "type": "ProbingResult", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "abortCause": { + "type": "ProbingAbortCause", + "id": 4 + }, + "sentProbeCount": { + "type": "int32", + "id": 5 + }, + "successfulProbeCount": { + "type": "int32", + "id": 6 + }, + "endpointInfo": { + "type": "EndpointInfo", + "id": 7 + }, + "probingLatency": { + "type": "LatencyDistribution", + "id": 8 + }, + "destinationEgressLocation": { + "type": "EdgeLocation", + "id": 9 + } + }, + "nested": { + "ProbingResult": { + "values": { + "PROBING_RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "REACHABILITY_INCONSISTENT": 3, + "UNDETERMINED": 4 + } + }, + "ProbingAbortCause": { + "values": { + "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, + "PERMISSION_DENIED": 1, + "NO_SOURCE_LOCATION": 2 + } + }, + "EdgeLocation": { + "fields": { + "metropolitanArea": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Trace": { + "fields": { + "endpointInfo": { + "type": "EndpointInfo", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + }, + "forwardTraceId": { + "type": "int32", + "id": 4 + } + } + }, + "Step": { + "oneofs": { + "stepInfo": { + "oneof": [ + "instance", + "firewall", + "route", + "endpoint", + "googleService", + "forwardingRule", + "vpnGateway", + "vpnTunnel", + "vpcConnector", + "deliver", + "forward", + "abort", + "drop", + "loadBalancer", + "network", + "gkeMaster", + "cloudSqlInstance", + "redisInstance", + "redisCluster", + "cloudFunction", + "appEngineVersion", + "cloudRunRevision", + "nat", + "proxyConnection", + "loadBalancerBackendInfo", + "storageBucket", + "serverlessNeg" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "causesDrop": { + "type": "bool", + "id": 3 + }, + "projectId": { + "type": "string", + "id": 4 + }, + "instance": { + "type": "InstanceInfo", + "id": 5 + }, + "firewall": { + "type": "FirewallInfo", + "id": 6 + }, + "route": { + "type": "RouteInfo", + "id": 7 + }, + "endpoint": { + "type": "EndpointInfo", + "id": 8 + }, + "googleService": { + "type": "GoogleServiceInfo", + "id": 24 + }, + "forwardingRule": { + "type": "ForwardingRuleInfo", + "id": 9 + }, + "vpnGateway": { + "type": "VpnGatewayInfo", + "id": 10 + }, + "vpnTunnel": { + "type": "VpnTunnelInfo", + "id": 11 + }, + "vpcConnector": { + "type": "VpcConnectorInfo", + "id": 21 + }, + "deliver": { + "type": "DeliverInfo", + "id": 12 + }, + "forward": { + "type": "ForwardInfo", + "id": 13 + }, + "abort": { + "type": "AbortInfo", + "id": 14 + }, + "drop": { + "type": "DropInfo", + "id": 15 + }, + "loadBalancer": { + "type": "LoadBalancerInfo", + "id": 16, + "options": { + "deprecated": true + } + }, + "network": { + "type": "NetworkInfo", + "id": 17 + }, + "gkeMaster": { + "type": "GKEMasterInfo", + "id": 18 + }, + "cloudSqlInstance": { + "type": "CloudSQLInstanceInfo", + "id": 19 + }, + "redisInstance": { + "type": "RedisInstanceInfo", + "id": 30 + }, + "redisCluster": { + "type": "RedisClusterInfo", + "id": 31 + }, + "cloudFunction": { + "type": "CloudFunctionInfo", + "id": 20 + }, + "appEngineVersion": { + "type": "AppEngineVersionInfo", + "id": 22 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionInfo", + "id": 23 + }, + "nat": { + "type": "NatInfo", + "id": 25 + }, + "proxyConnection": { + "type": "ProxyConnectionInfo", + "id": 26 + }, + "loadBalancerBackendInfo": { + "type": "LoadBalancerBackendInfo", + "id": 27 + }, + "storageBucket": { + "type": "StorageBucketInfo", + "id": 28 + }, + "serverlessNeg": { + "type": "ServerlessNegInfo", + "id": 29 + } + }, + "nested": { + "State": { + "valuesOptions": { + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { + "deprecated": true + }, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { + "deprecated": true + } + }, + "values": { + "STATE_UNSPECIFIED": 0, + "START_FROM_INSTANCE": 1, + "START_FROM_INTERNET": 2, + "START_FROM_GOOGLE_SERVICE": 27, + "START_FROM_PRIVATE_NETWORK": 3, + "START_FROM_GKE_MASTER": 21, + "START_FROM_CLOUD_SQL_INSTANCE": 22, + "START_FROM_REDIS_INSTANCE": 32, + "START_FROM_REDIS_CLUSTER": 33, + "START_FROM_CLOUD_FUNCTION": 23, + "START_FROM_APP_ENGINE_VERSION": 25, + "START_FROM_CLOUD_RUN_REVISION": 26, + "START_FROM_STORAGE_BUCKET": 29, + "START_FROM_PSC_PUBLISHED_SERVICE": 30, + "START_FROM_SERVERLESS_NEG": 31, + "APPLY_INGRESS_FIREWALL_RULE": 4, + "APPLY_EGRESS_FIREWALL_RULE": 5, + "APPLY_ROUTE": 6, + "APPLY_FORWARDING_RULE": 7, + "ANALYZE_LOAD_BALANCER_BACKEND": 28, + "SPOOFING_APPROVED": 8, + "ARRIVE_AT_INSTANCE": 9, + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, + "ARRIVE_AT_VPN_GATEWAY": 12, + "ARRIVE_AT_VPN_TUNNEL": 13, + "ARRIVE_AT_VPC_CONNECTOR": 24, + "NAT": 14, + "PROXY_CONNECTION": 15, + "DELIVER": 16, + "DROP": 17, + "FORWARD": 18, + "ABORT": 19, + "VIEWER_PERMISSION_MISSING": 20 + } + } + } + }, + "InstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "interface": { + "type": "string", + "id": 3 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "serviceAccount": { + "type": "string", + "id": 8, + "options": { + "deprecated": true + } + }, + "pscNetworkAttachmentUri": { + "type": "string", + "id": 9 + } + } + }, + "NetworkInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedSubnetUri": { + "type": "string", + "id": 5 + }, + "matchedIpRange": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "FirewallInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "direction": { + "type": "string", + "id": 3 + }, + "action": { + "type": "string", + "id": 4 + }, + "priority": { + "type": "int32", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 6 + }, + "targetTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "targetServiceAccounts": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "policy": { + "type": "string", + "id": 9 + }, + "policyUri": { + "type": "string", + "id": 11 + }, + "firewallRuleType": { + "type": "FirewallRuleType", + "id": 10 + } + }, + "nested": { + "FirewallRuleType": { + "values": { + "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, + "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, + "VPC_FIREWALL_RULE": 2, + "IMPLIED_VPC_FIREWALL_RULE": 3, + "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, + "NETWORK_FIREWALL_POLICY_RULE": 5, + "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, + "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, + "TRACKING_STATE": 101 + } + } + } + }, + "RouteInfo": { + "oneofs": { + "_nccHubUri": { + "oneof": [ + "nccHubUri" + ] + }, + "_nccSpokeUri": { + "oneof": [ + "nccSpokeUri" + ] + }, + "_advertisedRouteSourceRouterUri": { + "oneof": [ + "advertisedRouteSourceRouterUri" + ] + }, + "_advertisedRouteNextHopUri": { + "oneof": [ + "advertisedRouteNextHopUri" + ] + } + }, + "fields": { + "routeType": { + "type": "RouteType", + "id": 8 + }, + "nextHopType": { + "type": "NextHopType", + "id": 9 + }, + "routeScope": { + "type": "RouteScope", + "id": 14 + }, + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "region": { + "type": "string", + "id": 19 + }, + "destIpRange": { + "type": "string", + "id": 3 + }, + "nextHop": { + "type": "string", + "id": 4 + }, + "networkUri": { + "type": "string", + "id": 5 + }, + "priority": { + "type": "int32", + "id": 6 + }, + "instanceTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "srcIpRange": { + "type": "string", + "id": 10 + }, + "destPortRanges": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "srcPortRanges": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "protocols": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "nccHubUri": { + "type": "string", + "id": 15, + "options": { + "proto3_optional": true + } + }, + "nccSpokeUri": { + "type": "string", + "id": 16, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteSourceRouterUri": { + "type": "string", + "id": 17, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteNextHopUri": { + "type": "string", + "id": 18, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "RouteType": { + "values": { + "ROUTE_TYPE_UNSPECIFIED": 0, + "SUBNET": 1, + "STATIC": 2, + "DYNAMIC": 3, + "PEERING_SUBNET": 4, + "PEERING_STATIC": 5, + "PEERING_DYNAMIC": 6, + "POLICY_BASED": 7, + "ADVERTISED": 101 + } + }, + "NextHopType": { + "values": { + "NEXT_HOP_TYPE_UNSPECIFIED": 0, + "NEXT_HOP_IP": 1, + "NEXT_HOP_INSTANCE": 2, + "NEXT_HOP_NETWORK": 3, + "NEXT_HOP_PEERING": 4, + "NEXT_HOP_INTERCONNECT": 5, + "NEXT_HOP_VPN_TUNNEL": 6, + "NEXT_HOP_VPN_GATEWAY": 7, + "NEXT_HOP_INTERNET_GATEWAY": 8, + "NEXT_HOP_BLACKHOLE": 9, + "NEXT_HOP_ILB": 10, + "NEXT_HOP_ROUTER_APPLIANCE": 11, + "NEXT_HOP_NCC_HUB": 12 + } + }, + "RouteScope": { + "values": { + "ROUTE_SCOPE_UNSPECIFIED": 0, + "NETWORK": 1, + "NCC_HUB": 2 + } + } + } + }, + "GoogleServiceInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "googleServiceType": { + "type": "GoogleServiceType", + "id": 2 + } + }, + "nested": { + "GoogleServiceType": { + "values": { + "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, + "IAP": 1, + "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, + "CLOUD_DNS": 3, + "GOOGLE_API": 4, + "GOOGLE_API_PSC": 5, + "GOOGLE_API_VPC_SC": 6 + } + } + } + }, + "ForwardingRuleInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedProtocol": { + "type": "string", + "id": 3 + }, + "matchedPortRange": { + "type": "string", + "id": 6 + }, + "vip": { + "type": "string", + "id": 4 + }, + "target": { + "type": "string", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "loadBalancerName": { + "type": "string", + "id": 9 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 10 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerInfo": { + "fields": { + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 1 + }, + "healthCheckUri": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "backends": { + "rule": "repeated", + "type": "LoadBalancerBackend", + "id": 3 + }, + "backendType": { + "type": "BackendType", + "id": 4 + }, + "backendUri": { + "type": "string", + "id": 5 + } + }, + "nested": { + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "INTERNAL_TCP_UDP": 1, + "NETWORK_TCP_UDP": 2, + "HTTP_PROXY": 3, + "TCP_PROXY": 4, + "SSL_PROXY": 5 + } + }, + "BackendType": { + "values": { + "BACKEND_TYPE_UNSPECIFIED": 0, + "BACKEND_SERVICE": 1, + "TARGET_POOL": 2, + "TARGET_INSTANCE": 3 + } + } + } + }, + "LoadBalancerBackend": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "healthCheckFirewallState": { + "type": "HealthCheckFirewallState", + "id": 3 + }, + "healthCheckAllowingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "healthCheckBlockingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "HealthCheckFirewallState": { + "values": { + "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, + "CONFIGURED": 1, + "MISCONFIGURED": 2 + } + } + } + }, + "VpnGatewayInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "ipAddress": { + "type": "string", + "id": 4 + }, + "vpnTunnelUri": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "VpnTunnelInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "sourceGateway": { + "type": "string", + "id": 3 + }, + "remoteGateway": { + "type": "string", + "id": 4 + }, + "remoteGatewayIp": { + "type": "string", + "id": 5 + }, + "sourceGatewayIp": { + "type": "string", + "id": 6 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "routingType": { + "type": "RoutingType", + "id": 9 + } + }, + "nested": { + "RoutingType": { + "values": { + "ROUTING_TYPE_UNSPECIFIED": 0, + "ROUTE_BASED": 1, + "POLICY_BASED": 2, + "DYNAMIC": 3 + } + } + } + }, + "EndpointInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "destinationIp": { + "type": "string", + "id": 2 + }, + "protocol": { + "type": "string", + "id": 3 + }, + "sourcePort": { + "type": "int32", + "id": 4 + }, + "destinationPort": { + "type": "int32", + "id": 5 + }, + "sourceNetworkUri": { + "type": "string", + "id": 6 + }, + "destinationNetworkUri": { + "type": "string", + "id": 7 + }, + "sourceAgentUri": { + "type": "string", + "id": 8 + } + } + }, + "DeliverInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "storageBucket": { + "type": "string", + "id": 4 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Target": { + "values": { + "TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "INTERNET": 2, + "GOOGLE_API": 3, + "GKE_MASTER": 4, + "CLOUD_SQL_INSTANCE": 5, + "PSC_PUBLISHED_SERVICE": 6, + "PSC_GOOGLE_API": 7, + "PSC_VPC_SC": 8, + "SERVERLESS_NEG": 9, + "STORAGE_BUCKET": 10, + "PRIVATE_NETWORK": 11, + "CLOUD_FUNCTION": 12, + "APP_ENGINE_VERSION": 13, + "CLOUD_RUN_REVISION": 14, + "GOOGLE_MANAGED_SERVICE": 15, + "REDIS_INSTANCE": 16, + "REDIS_CLUSTER": 17 + } + } + } + }, + "ForwardInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + } + }, + "nested": { + "Target": { + "valuesOptions": { + "GKE_MASTER": { + "deprecated": true + }, + "CLOUD_SQL_INSTANCE": { + "deprecated": true + } + }, + "values": { + "TARGET_UNSPECIFIED": 0, + "PEERING_VPC": 1, + "VPN_GATEWAY": 2, + "INTERCONNECT": 3, + "GKE_MASTER": 4, + "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, + "CLOUD_SQL_INSTANCE": 6, + "ANOTHER_PROJECT": 7, + "NCC_HUB": 8, + "ROUTER_APPLIANCE": 9 + } + } + } + }, + "AbortInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "projectsMissingPermission": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Cause": { + "valuesOptions": { + "UNKNOWN_NETWORK": { + "deprecated": true + }, + "UNKNOWN_PROJECT": { + "deprecated": true + }, + "NO_EXTERNAL_IP": { + "deprecated": true + }, + "UNINTENDED_DESTINATION": { + "deprecated": true + }, + "SOURCE_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_SOURCE_NETWORK": { + "deprecated": true + }, + "DESTINATION_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_DESTINATION_NETWORK": { + "deprecated": true + } + }, + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_NETWORK": 1, + "UNKNOWN_PROJECT": 3, + "NO_EXTERNAL_IP": 7, + "UNINTENDED_DESTINATION": 8, + "SOURCE_ENDPOINT_NOT_FOUND": 11, + "MISMATCHED_SOURCE_NETWORK": 12, + "DESTINATION_ENDPOINT_NOT_FOUND": 13, + "MISMATCHED_DESTINATION_NETWORK": 14, + "UNKNOWN_IP": 2, + "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, + "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, + "PERMISSION_DENIED": 4, + "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, + "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, + "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, + "NO_SOURCE_LOCATION": 5, + "INVALID_ARGUMENT": 6, + "TRACE_TOO_LONG": 9, + "INTERNAL_ERROR": 10, + "UNSUPPORTED": 15, + "MISMATCHED_IP_VERSION": 16, + "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, + "RESOURCE_CONFIG_NOT_FOUND": 18, + "VM_INSTANCE_CONFIG_NOT_FOUND": 24, + "NETWORK_CONFIG_NOT_FOUND": 25, + "FIREWALL_CONFIG_NOT_FOUND": 26, + "ROUTE_CONFIG_NOT_FOUND": 27, + "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, + "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, + "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, + "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, + "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, + "NON_ROUTABLE_IP_ADDRESS": 22, + "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, + "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 + } + } + } + }, + "DropInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "sourceIp": { + "type": "string", + "id": 3 + }, + "destinationIp": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Cause": { + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_EXTERNAL_ADDRESS": 1, + "FOREIGN_IP_DISALLOWED": 2, + "FIREWALL_RULE": 3, + "NO_ROUTE": 4, + "ROUTE_BLACKHOLE": 5, + "ROUTE_WRONG_NETWORK": 6, + "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, + "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, + "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, + "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, + "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, + "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, + "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, + "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, + "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, + "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, + "PRIVATE_TRAFFIC_TO_INTERNET": 7, + "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, + "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, + "NO_EXTERNAL_ADDRESS": 9, + "UNKNOWN_INTERNAL_ADDRESS": 10, + "FORWARDING_RULE_MISMATCH": 11, + "FORWARDING_RULE_NO_INSTANCES": 12, + "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, + "INSTANCE_NOT_RUNNING": 14, + "GKE_CLUSTER_NOT_RUNNING": 27, + "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, + "REDIS_INSTANCE_NOT_RUNNING": 68, + "REDIS_CLUSTER_NOT_RUNNING": 69, + "TRAFFIC_TYPE_BLOCKED": 15, + "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, + "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, + "DROPPED_INSIDE_GKE_SERVICE": 18, + "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, + "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, + "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, + "GKE_PSC_ENDPOINT_MISSING": 36, + "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, + "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, + "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, + "GKE_CONTROL_PLANE_NO_ROUTE": 32, + "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, + "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, + "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, + "CLOUD_SQL_CONNECTOR_REQUIRED": 63, + "CLOUD_FUNCTION_NOT_ACTIVE": 22, + "VPC_CONNECTOR_NOT_SET": 23, + "VPC_CONNECTOR_NOT_RUNNING": 24, + "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, + "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, + "FORWARDING_RULE_REGION_MISMATCH": 25, + "PSC_CONNECTION_NOT_ACCEPTED": 26, + "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, + "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, + "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, + "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, + "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, + "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, + "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, + "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, + "CLOUD_RUN_REVISION_NOT_READY": 29, + "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, + "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, + "CLOUD_NAT_NO_ADDRESSES": 40, + "ROUTING_LOOP": 59, + "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, + "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, + "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, + "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, + "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, + "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, + "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, + "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, + "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, + "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, + "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, + "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, + "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, + "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, + "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, + "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, + "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 + } + } + } + }, + "GKEMasterInfo": { + "fields": { + "clusterUri": { + "type": "string", + "id": 2 + }, + "clusterNetworkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "dnsEndpoint": { + "type": "string", + "id": 7 + } + } + }, + "CloudSQLInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "region": { + "type": "string", + "id": 7 + } + } + }, + "RedisInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "primaryEndpointIp": { + "type": "string", + "id": 4 + }, + "readEndpointIp": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "RedisClusterInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "discoveryEndpointIpAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "secondaryEndpointIpAddress": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "location": { + "type": "string", + "id": 6 + } + } + }, + "CloudFunctionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + }, + "versionId": { + "type": "int64", + "id": 4 + } + } + }, + "CloudRunRevisionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 4 + }, + "serviceUri": { + "type": "string", + "id": 5 + } + } + }, + "AppEngineVersionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "runtime": { + "type": "string", + "id": 3 + }, + "environment": { + "type": "string", + "id": 4 + } + } + }, + "VpcConnectorInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + } + } + }, + "NatInfo": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "protocol": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "oldSourceIp": { + "type": "string", + "id": 4 + }, + "newSourceIp": { + "type": "string", + "id": 5 + }, + "oldDestinationIp": { + "type": "string", + "id": 6 + }, + "newDestinationIp": { + "type": "string", + "id": 7 + }, + "oldSourcePort": { + "type": "int32", + "id": 8 + }, + "newSourcePort": { + "type": "int32", + "id": 9 + }, + "oldDestinationPort": { + "type": "int32", + "id": 10 + }, + "newDestinationPort": { + "type": "int32", + "id": 11 + }, + "routerUri": { + "type": "string", + "id": 12 + }, + "natGatewayName": { + "type": "string", + "id": 13 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INTERNAL_TO_EXTERNAL": 1, + "EXTERNAL_TO_INTERNAL": 2, + "CLOUD_NAT": 3, + "PRIVATE_SERVICE_CONNECT": 4 + } + } + } + }, + "ProxyConnectionInfo": { + "fields": { + "protocol": { + "type": "string", + "id": 1 + }, + "oldSourceIp": { + "type": "string", + "id": 2 + }, + "newSourceIp": { + "type": "string", + "id": 3 + }, + "oldDestinationIp": { + "type": "string", + "id": 4 + }, + "newDestinationIp": { + "type": "string", + "id": 5 + }, + "oldSourcePort": { + "type": "int32", + "id": 6 + }, + "newSourcePort": { + "type": "int32", + "id": 7 + }, + "oldDestinationPort": { + "type": "int32", + "id": 8 + }, + "newDestinationPort": { + "type": "int32", + "id": 9 + }, + "subnetUri": { + "type": "string", + "id": 10 + }, + "networkUri": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerBackendInfo": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "instanceUri": { + "type": "string", + "id": 2 + }, + "backendServiceUri": { + "type": "string", + "id": 3 + }, + "instanceGroupUri": { + "type": "string", + "id": 4 + }, + "networkEndpointGroupUri": { + "type": "string", + "id": 5 + }, + "backendBucketUri": { + "type": "string", + "id": 8 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 9 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 10 + }, + "healthCheckUri": { + "type": "string", + "id": 6 + }, + "healthCheckFirewallsConfigState": { + "type": "HealthCheckFirewallsConfigState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "HealthCheckFirewallsConfigState": { + "values": { + "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, + "FIREWALLS_CONFIGURED": 1, + "FIREWALLS_PARTIALLY_CONFIGURED": 2, + "FIREWALLS_NOT_CONFIGURED": 3, + "FIREWALLS_UNSUPPORTED": 4 + } + } + } + }, + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "HTTPS_ADVANCED_LOAD_BALANCER": 1, + "HTTPS_LOAD_BALANCER": 2, + "REGIONAL_HTTPS_LOAD_BALANCER": 3, + "INTERNAL_HTTPS_LOAD_BALANCER": 4, + "SSL_PROXY_LOAD_BALANCER": 5, + "TCP_PROXY_LOAD_BALANCER": 6, + "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, + "NETWORK_LOAD_BALANCER": 8, + "LEGACY_NETWORK_LOAD_BALANCER": 9, + "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 + } + }, + "StorageBucketInfo": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + } + } + }, + "ServerlessNegInfo": { + "fields": { + "negUri": { + "type": "string", + "id": 1 + } + } + }, + "ReachabilityService": { + "options": { + "(google.api.default_host)": "networkmanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListConnectivityTests": { + "requestType": "ListConnectivityTestsRequest", + "responseType": "ListConnectivityTestsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + } + } + ] + }, + "GetConnectivityTest": { + "requestType": "GetConnectivityTestRequest", + "responseType": "ConnectivityTest", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + } + } + ] + }, + "CreateConnectivityTest": { + "requestType": "CreateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", + "(google.api.http).body": "resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", + "body": "resource" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConnectivityTest": { + "requestType": "UpdateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "(google.api.http).body": "resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "body": "resource" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RerunConnectivityTest": { + "requestType": "RerunConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConnectivityTest": { + "requestType": "DeleteConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "ListConnectivityTestsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListConnectivityTestsResponse": { + "fields": { + "resources": { + "rule": "repeated", + "type": "ConnectivityTest", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "CreateConnectivityTestRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "testId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateConnectivityTestRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "RerunConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "target": { + "type": "string", + "id": 3 + }, + "verb": { + "type": "string", + "id": 4 + }, + "statusDetail": { + "type": "string", + "id": 5 + }, + "cancelRequested": { + "type": "bool", + "id": 6 + }, + "apiVersion": { + "type": "string", + "id": 7 + } + } + }, + "VpcFlowLogsService": { + "options": { + "(google.api.default_host)": "networkmanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListVpcFlowLogsConfigs": { + "requestType": "ListVpcFlowLogsConfigsRequest", + "responseType": "ListVpcFlowLogsConfigsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVpcFlowLogsConfig": { + "requestType": "GetVpcFlowLogsConfigRequest", + "responseType": "VpcFlowLogsConfig", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateVpcFlowLogsConfig": { + "requestType": "CreateVpcFlowLogsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", + "(google.api.http).body": "vpc_flow_logs_config", + "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id", + "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", + "body": "vpc_flow_logs_config" + } + }, + { + "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "VpcFlowLogsConfig", + "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + } + } + ] + }, + "UpdateVpcFlowLogsConfig": { + "requestType": "UpdateVpcFlowLogsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "(google.api.http).body": "vpc_flow_logs_config", + "(google.api.method_signature)": "vpc_flow_logs_config,update_mask", + "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "body": "vpc_flow_logs_config" + } + }, + { + "(google.api.method_signature)": "vpc_flow_logs_config,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "VpcFlowLogsConfig", + "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + } + } + ] + }, + "DeleteVpcFlowLogsConfig": { + "requestType": "DeleteVpcFlowLogsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + } + } + ] + } + } + }, + "ListVpcFlowLogsConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + }, + "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" + } + } + } + }, + "ListVpcFlowLogsConfigsResponse": { + "fields": { + "vpcFlowLogsConfigs": { + "rule": "repeated", + "type": "VpcFlowLogsConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetVpcFlowLogsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + } + } + }, + "CreateVpcFlowLogsConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + }, + "vpcFlowLogsConfigId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + }, + "vpcFlowLogsConfig": { + "type": "VpcFlowLogsConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateVpcFlowLogsConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "vpcFlowLogsConfig": { + "type": "VpcFlowLogsConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteVpcFlowLogsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + } + } + }, + "VpcFlowLogsConfig": { + "options": { + "(google.api.resource).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}", + "(google.api.resource).plural": "vpcFlowLogsConfigs", + "(google.api.resource).singular": "vpcFlowLogsConfig" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_state": { + "oneof": [ + "state" + ] + }, + "_aggregationInterval": { + "oneof": [ + "aggregationInterval" + ] + }, + "_flowSampling": { + "oneof": [ + "flowSampling" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_filterExpr": { + "oneof": [ + "filterExpr" + ] + }, + "targetResource": { + "oneof": [ + "interconnectAttachment", + "vpnTunnel" + ] + } + }, + "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 + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "aggregationInterval": { + "type": "AggregationInterval", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "flowSampling": { + "type": "float", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadataFields": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filterExpr": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "interconnectAttachment": { + "type": "string", + "id": 102 + }, + "vpnTunnel": { + "type": "string", + "id": 103 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + }, + "AggregationInterval": { + "values": { + "AGGREGATION_INTERVAL_UNSPECIFIED": 0, + "INTERVAL_5_SEC": 1, + "INTERVAL_30_SEC": 2, + "INTERVAL_1_MIN": 3, + "INTERVAL_5_MIN": 4, + "INTERVAL_10_MIN": 5, + "INTERVAL_15_MIN": 6 + } + }, + "Metadata": { + "values": { + "METADATA_UNSPECIFIED": 0, + "INCLUDE_ALL_METADATA": 1, + "EXCLUDE_ALL_METADATA": 2, + "CUSTOM_METADATA": 3 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + } + } + }, + "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 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js new file mode 100644 index 00000000000..05458c89c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js @@ -0,0 +1,79 @@ +// 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, testId, resource) { + // [START networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + */ + // const testId = 'abc123' + /** + * Required. A `ConnectivityTest` resource + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callCreateConnectivityTest() { + // Construct request + const request = { + parent, + testId, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.createConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js new file mode 100644 index 00000000000..22a9e8e6bcc --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callDeleteConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.deleteConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js new file mode 100644 index 00000000000..136815a174a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.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 networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callGetConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networkmanagementClient.getConnectivityTest(request); + console.log(response); + } + + callGetConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js new file mode 100644 index 00000000000..0f13d2d7bd8 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.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(parent) { + // [START networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Number of `ConnectivityTests` to return. + */ + // const pageSize = 1234 + /** + * Page token from an earlier query, as returned in `next_page_token`. + */ + // const pageToken = 'abc123' + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callListConnectivityTests() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networkmanagementClient.listConnectivityTestsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnectivityTests(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js new file mode 100644 index 00000000000..060a9e295e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callRerunConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.rerunConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRerunConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js new file mode 100644 index 00000000000..f6925cd1908 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js @@ -0,0 +1,68 @@ +// 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, resource) { + // [START networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. Only fields specified in update_mask are updated. + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callUpdateConnectivityTest() { + // Construct request + const request = { + updateMask, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.updateConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json new file mode 100644 index 00000000000..526ea089821 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json @@ -0,0 +1,511 @@ +{ + "clientLibrary": { + "name": "nodejs-networkmanagement", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.networkmanagement.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async", + "title": "ReachabilityService listConnectivityTests Sample", + "origin": "API_DEFINITION", + "description": " Lists all Connectivity Tests owned by a project.", + "canonical": true, + "file": "reachability_service.list_connectivity_tests.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", + "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.networkmanagement.v1beta1.ListConnectivityTestsResponse", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async", + "title": "ReachabilityService getConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific Connectivity Test.", + "canonical": true, + "file": "reachability_service.get_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async", + "title": "ReachabilityService createConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", + "canonical": true, + "file": "reachability_service.create_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "test_id", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async", + "title": "ReachabilityService updateConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", + "canonical": true, + "file": "reachability_service.update_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async", + "title": "ReachabilityService rerunConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", + "canonical": true, + "file": "reachability_service.rerun_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async", + "title": "ReachabilityService deleteConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific `ConnectivityTest`.", + "canonical": true, + "file": "reachability_service.delete_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async", + "title": "ReachabilityService listVpcFlowLogsConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists all `VpcFlowLogsConfigs` in a given project.", + "canonical": true, + "file": "vpc_flow_logs_service.list_vpc_flow_logs_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVpcFlowLogsConfigs", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", + "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.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "ListVpcFlowLogsConfigs", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async", + "title": "ReachabilityService getVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific `VpcFlowLogsConfig`.", + "canonical": true, + "file": "vpc_flow_logs_service.get_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "GetVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async", + "title": "ReachabilityService createVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", + "canonical": true, + "file": "vpc_flow_logs_service.create_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "vpc_flow_logs_config_id", + "type": "TYPE_STRING" + }, + { + "name": "vpc_flow_logs_config", + "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "CreateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async", + "title": "ReachabilityService updateVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", + "canonical": true, + "file": "vpc_flow_logs_service.update_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "vpc_flow_logs_config", + "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "UpdateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async", + "title": "ReachabilityService deleteVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific `VpcFlowLogsConfig`.", + "canonical": true, + "file": "vpc_flow_logs_service.delete_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "DeleteVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js new file mode 100644 index 00000000000..be3d5827f4b --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js @@ -0,0 +1,73 @@ +// 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, vpcFlowLogsConfigId, vpcFlowLogsConfig) { + // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the VPC Flow Logs configuration to create: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. ID of the `VpcFlowLogsConfig`. + */ + // const vpcFlowLogsConfigId = 'abc123' + /** + * Required. A `VpcFlowLogsConfig` resource + */ + // const vpcFlowLogsConfig = {} + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callCreateVpcFlowLogsConfig() { + // Construct request + const request = { + parent, + vpcFlowLogsConfigId, + vpcFlowLogsConfig, + }; + + // Run request + const [operation] = await networkmanagementClient.createVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js new file mode 100644 index 00000000000..5c029e6248c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callDeleteVpcFlowLogsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.deleteVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js new file mode 100644 index 00000000000..7fca2193c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.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 networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callGetVpcFlowLogsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networkmanagementClient.getVpcFlowLogsConfig(request); + console.log(response); + } + + callGetVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js new file mode 100644 index 00000000000..79caacd62bf --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js @@ -0,0 +1,83 @@ +// 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 networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Optional. Number of `VpcFlowLogsConfigs` to return. + */ + // const pageSize = 1234 + /** + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported CEL logic operators + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callListVpcFlowLogsConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networkmanagementClient.listVpcFlowLogsConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVpcFlowLogsConfigs(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js new file mode 100644 index 00000000000..ee3fbc9e1fb --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js @@ -0,0 +1,68 @@ +// 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, vpcFlowLogsConfig) { + // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. Only fields specified in update_mask are updated. + */ + // const vpcFlowLogsConfig = {} + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callUpdateVpcFlowLogsConfig() { + // Construct request + const request = { + updateMask, + vpcFlowLogsConfig, + }; + + // Run request + const [operation] = await networkmanagementClient.updateVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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-networkmanagement/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts new file mode 100644 index 00000000000..cdc6c3b552c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts @@ -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. ** + +import * as v1beta1 from './v1beta1'; +const ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; +type ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; +const VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; +type VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; +export {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; +export default {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..8318960dbe5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json @@ -0,0 +1,155 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.networkmanagement.v1beta1", + "libraryPackage": "@google-cloud/network-management", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + } + } + }, + "VpcFlowLogsService": { + "clients": { + "grpc": { + "libraryClient": "VpcFlowLogsServiceClient", + "rpcs": { + "GetVpcFlowLogsConfig": { + "methods": [ + "getVpcFlowLogsConfig" + ] + }, + "CreateVpcFlowLogsConfig": { + "methods": [ + "createVpcFlowLogsConfig" + ] + }, + "UpdateVpcFlowLogsConfig": { + "methods": [ + "updateVpcFlowLogsConfig" + ] + }, + "DeleteVpcFlowLogsConfig": { + "methods": [ + "deleteVpcFlowLogsConfig" + ] + }, + "ListVpcFlowLogsConfigs": { + "methods": [ + "listVpcFlowLogsConfigs", + "listVpcFlowLogsConfigsStream", + "listVpcFlowLogsConfigsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "VpcFlowLogsServiceClient", + "rpcs": { + "GetVpcFlowLogsConfig": { + "methods": [ + "getVpcFlowLogsConfig" + ] + }, + "CreateVpcFlowLogsConfig": { + "methods": [ + "createVpcFlowLogsConfig" + ] + }, + "UpdateVpcFlowLogsConfig": { + "methods": [ + "updateVpcFlowLogsConfig" + ] + }, + "DeleteVpcFlowLogsConfig": { + "methods": [ + "deleteVpcFlowLogsConfig" + ] + }, + "ListVpcFlowLogsConfigs": { + "methods": [ + "listVpcFlowLogsConfigs", + "listVpcFlowLogsConfigsStream", + "listVpcFlowLogsConfigsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts new file mode 100644 index 00000000000..f8ad762c8da --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts @@ -0,0 +1,20 @@ +// 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 {ReachabilityServiceClient} from './reachability_service_client'; +export {VpcFlowLogsServiceClient} from './vpc_flow_logs_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts new file mode 100644 index 00000000000..b0e51c2f99b --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts @@ -0,0 +1,1647 @@ +// 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/v1beta1/reachability_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './reachability_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Reachability service in the Google Cloud Network Management API provides + * services that analyze the reachability within a single Google Virtual Private + * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + * networks, or between VPC networks and internet hosts. A reachability analysis + * is based on Google Cloud network configurations. + * + * You can use the analysis results to verify these configurations and + * to troubleshoot connectivity issues. + * @class + * @memberof v1beta1 + */ +export class ReachabilityServiceClient { + 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; + reachabilityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ReachabilityServiceClient. + * + * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; + 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 = 'networkmanagement.' + 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 = { + connectivityTestPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/global/connectivityTests/{test}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' + ), + }; + + // 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 = { + listConnectivityTests: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') + }; + + 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; + const createConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const updateConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; + const updateConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const rerunConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; + const rerunConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const deleteConnectivityTestResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), + createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), + updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), + updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), + rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), + rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), + deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), + deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networkmanagement.v1beta1.ReachabilityService', 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.reachabilityServiceStub) { + return this.reachabilityServiceStub; + } + + // Put together the "service stub" for + // google.cloud.networkmanagement.v1beta1.ReachabilityService. + this.reachabilityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.ReachabilityService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networkmanagement.v1beta1.ReachabilityService, + 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 reachabilityServiceStubMethods = + ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; + for (const methodName of reachabilityServiceStubMethods) { + const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; + } + + /** + * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. + * 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/v1beta1/reachability_service.get_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async + */ + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|undefined, {}|undefined + ]>; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); + } + +/** + * Creates a new Connectivity Test. + * After you create a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, containing non-existent resources in the network, or you + * don't have read permissions to the network configurations of listed + * projects), then the reachability result returns a value of `UNKNOWN`. + * + * If the endpoint specifications in `ConnectivityTest` are + * incomplete, the reachability result returns a value of + * AMBIGUOUS. For more information, + * see the Connectivity Test documentation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * @param {string} request.testId + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource + * Required. A `ConnectivityTest` 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 + * 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/v1beta1/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async + */ + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + 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.createConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createConnectivityTest()`. + * @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/v1beta1/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async + */ + async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the configuration of an existing `ConnectivityTest`. + * After you update a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * The Reachability state in the test resource is updated with the new result. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, they contain non-existent resources in the network, or the + * user does not have read permissions to the network configurations of + * listed projects), then the reachability result returns a value of + * UNKNOWN. + * + * If the endpoint specifications in `ConnectivityTest` are incomplete, the + * reachability result returns a value of `AMBIGUOUS`. See the documentation + * in `ConnectivityTest` for more details. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource + * Required. Only fields specified in update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + 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({ + 'resource.name': request.resource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateConnectivityTest()`. + * @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/v1beta1/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Rerun an existing `ConnectivityTest`. + * After the user triggers the rerun, the reachability analysis is performed + * as part of the long running operation, which completes when the analysis + * completes. + * + * Even though the test configuration remains the same, the reachability + * result may change due to underlying network configuration changes. + * + * If the endpoint specifications in `ConnectivityTest` become invalid (for + * example, specified resources are deleted in the network, or you lost + * read permissions to the network configurations of listed projects), then + * the reachability result returns a value of `UNKNOWN`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async + */ + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + 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.rerunConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `rerunConnectivityTest()`. + * @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/v1beta1/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async + */ + async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific `ConnectivityTest`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + 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.deleteConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteConnectivityTest()`. + * @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/v1beta1/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all Connectivity Tests owned by a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. + * 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse + ]>; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>, + callback?: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTestsStream( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.createStream( + this.innerApiCalls.listConnectivityTests as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConnectivityTests`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. 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/v1beta1/reachability_service.list_connectivity_tests.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async + */ + listConnectivityTestsAsync( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.asyncIterate( + this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. + * + * @param {string} project + * @param {string} test + * @returns {string} Resource name string. + */ + connectivityTestPath(project:string,test:string) { + return this.pathTemplates.connectivityTestPathTemplate.render({ + project: project, + test: test, + }); + } + + /** + * Parse the project from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; + } + + /** + * Parse the test from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the test. + */ + matchTestFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified vpcFlowLogsConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vpc_flow_logs_config + * @returns {string} Resource name string. + */ + vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ + project: project, + location: location, + vpc_flow_logs_config: vpcFlowLogsConfig, + }); + } + + /** + * Parse the project from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; + } + + /** + * Parse the location from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; + } + + /** + * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the vpc_flow_logs_config. + */ + matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; + } + + /** + * 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.reachabilityServiceStub && !this._terminated) { + return this.reachabilityServiceStub.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-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json new file mode 100644 index 00000000000..0d2fd849ae5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1beta1.ReachabilityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListConnectivityTests": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RerunConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json new file mode 100644 index 00000000000..54de9f63455 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" +] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts new file mode 100644 index 00000000000..d69b58611c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts @@ -0,0 +1,1523 @@ +// 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/v1beta1/vpc_flow_logs_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './vpc_flow_logs_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The VPC Flow Logs service in the Google Cloud Network Management API provides + * configurations that generate Flow Logs. The service and the configuration + * resources created using this service are global. + * @class + * @memberof v1beta1 + */ +export class VpcFlowLogsServiceClient { + 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; + vpcFlowLogsServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of VpcFlowLogsServiceClient. + * + * @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 VpcFlowLogsServiceClient({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 VpcFlowLogsServiceClient; + 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 = 'networkmanagement.' + 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 = { + connectivityTestPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/global/connectivityTests/{test}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' + ), + }; + + // 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 = { + listVpcFlowLogsConfigs: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'vpcFlowLogsConfigs') + }; + + 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createVpcFlowLogsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; + const createVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const updateVpcFlowLogsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; + const updateVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const deleteVpcFlowLogsConfigResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createVpcFlowLogsConfigResponse.decode.bind(createVpcFlowLogsConfigResponse), + createVpcFlowLogsConfigMetadata.decode.bind(createVpcFlowLogsConfigMetadata)), + updateVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateVpcFlowLogsConfigResponse.decode.bind(updateVpcFlowLogsConfigResponse), + updateVpcFlowLogsConfigMetadata.decode.bind(updateVpcFlowLogsConfigMetadata)), + deleteVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVpcFlowLogsConfigResponse.decode.bind(deleteVpcFlowLogsConfigResponse), + deleteVpcFlowLogsConfigMetadata.decode.bind(deleteVpcFlowLogsConfigMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networkmanagement.v1beta1.VpcFlowLogsService', 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.vpcFlowLogsServiceStub) { + return this.vpcFlowLogsServiceStub; + } + + // Put together the "service stub" for + // google.cloud.networkmanagement.v1beta1.VpcFlowLogsService. + this.vpcFlowLogsServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.VpcFlowLogsService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networkmanagement.v1beta1.VpcFlowLogsService, + 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 vpcFlowLogsServiceStubMethods = + ['listVpcFlowLogsConfigs', 'getVpcFlowLogsConfig', 'createVpcFlowLogsConfig', 'updateVpcFlowLogsConfig', 'deleteVpcFlowLogsConfig']; + for (const methodName of vpcFlowLogsServiceStubMethods) { + const callPromise = this.vpcFlowLogsServiceStub.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.vpcFlowLogsServiceStub; + } + + /** + * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific `VpcFlowLogsConfig`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. + * 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/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async + */ + getVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|undefined, {}|undefined + ]>; + getVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>): void; + getVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>): void; + getVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|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.getVpcFlowLogsConfig(request, options, callback); + } + +/** + * Creates a new `VpcFlowLogsConfig`. + * If a configuration with the exact same settings already exists (even if the + * ID is different), the creation fails. + * Notes: + * 1. Creating a configuration with state=DISABLED will fail. + * 2. The following fields are not considrered as `settings` for the purpose + * of the check mentioned above, therefore - creating another configuration + * with the same fields but different values for the following fields will + * fail as well: + * - name + * - create_time + * - update_time + * - labels + * - description + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VPC Flow Logs configuration to create: + * `projects/{project_id}/locations/global` + * @param {string} request.vpcFlowLogsConfigId + * Required. ID of the `VpcFlowLogsConfig`. + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig + * Required. A `VpcFlowLogsConfig` 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 + * 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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async + */ + createVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + 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.createVpcFlowLogsConfig(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createVpcFlowLogsConfig()`. + * @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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async + */ + async checkCreateVpcFlowLogsConfigProgress(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.createVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an existing `VpcFlowLogsConfig`. + * If a configuration with the exact same settings already exists (even if the + * ID is different), the creation fails. + * Notes: + * 1. The following fields are not considrered as `settings` for the purpose + * of the check mentioned above, therefore - updating another configuration + * with the same fields but different values for the following fields will + * fail as well: + * - name + * - create_time + * - update_time + * - labels + * - description + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig + * Required. Only fields specified in update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async + */ + updateVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + 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({ + 'vpc_flow_logs_config.name': request.vpcFlowLogsConfig!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateVpcFlowLogsConfig(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateVpcFlowLogsConfig()`. + * @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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async + */ + async checkUpdateVpcFlowLogsConfigProgress(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.updateVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific `VpcFlowLogsConfig`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async + */ + deleteVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + 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.deleteVpcFlowLogsConfig(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteVpcFlowLogsConfig()`. + * @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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async + */ + async checkDeleteVpcFlowLogsConfigProgress(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.deleteVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all `VpcFlowLogsConfigs` in a given project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + * @param {number} [request.pageSize] + * Optional. Number of `VpcFlowLogsConfigs` to return. + * @param {string} [request.pageToken] + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + * @param {string} [request.filter] + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported [CEL logic operators] + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. + * 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 `listVpcFlowLogsConfigsAsync()` + * 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. + */ + listVpcFlowLogsConfigs( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse + ]>; + listVpcFlowLogsConfigs( + request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; + listVpcFlowLogsConfigs( + request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; + listVpcFlowLogsConfigs( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>, + callback?: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listVpcFlowLogsConfigs(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + * @param {number} [request.pageSize] + * Optional. Number of `VpcFlowLogsConfigs` to return. + * @param {string} [request.pageToken] + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + * @param {string} [request.filter] + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported [CEL logic operators] + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig} 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 `listVpcFlowLogsConfigsAsync()` + * 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. + */ + listVpcFlowLogsConfigsStream( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + 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['listVpcFlowLogsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVpcFlowLogsConfigs.createStream( + this.innerApiCalls.listVpcFlowLogsConfigs as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listVpcFlowLogsConfigs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + * @param {number} [request.pageSize] + * Optional. Number of `VpcFlowLogsConfigs` to return. + * @param {string} [request.pageToken] + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + * @param {string} [request.filter] + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported [CEL logic operators] + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. 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/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async + */ + listVpcFlowLogsConfigsAsync( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + 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['listVpcFlowLogsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVpcFlowLogsConfigs.asyncIterate( + this.innerApiCalls['listVpcFlowLogsConfigs'] 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 connectivityTest resource name string. + * + * @param {string} project + * @param {string} test + * @returns {string} Resource name string. + */ + connectivityTestPath(project:string,test:string) { + return this.pathTemplates.connectivityTestPathTemplate.render({ + project: project, + test: test, + }); + } + + /** + * Parse the project from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; + } + + /** + * Parse the test from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the test. + */ + matchTestFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; + } + + /** + * 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 project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified vpcFlowLogsConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vpc_flow_logs_config + * @returns {string} Resource name string. + */ + vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ + project: project, + location: location, + vpc_flow_logs_config: vpcFlowLogsConfig, + }); + } + + /** + * Parse the project from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; + } + + /** + * Parse the location from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; + } + + /** + * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the vpc_flow_logs_config. + */ + matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; + } + + /** + * 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.vpcFlowLogsServiceStub && !this._terminated) { + return this.vpcFlowLogsServiceStub.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-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json new file mode 100644 index 00000000000..fd883cb5ab0 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListVpcFlowLogsConfigs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json new file mode 100644 index 00000000000..54de9f63455 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" +] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c429b7bd73d --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// 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 networkmanagement = require('@google-cloud/network-management'); + +function main() { + const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); + const vpcFlowLogsServiceClient = new networkmanagement.VpcFlowLogsServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..6ec4f20b4c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,38 @@ +// 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 {ReachabilityServiceClient, VpcFlowLogsServiceClient} from '@google-cloud/network-management'; + +// check that the client class type name can be used +function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { + client.close(); +} +function doStuffWithVpcFlowLogsServiceClient(client: VpcFlowLogsServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const reachabilityServiceClient = new ReachabilityServiceClient(); + doStuffWithReachabilityServiceClient(reachabilityServiceClient); + // check that the client instance can be created + const vpcFlowLogsServiceClient = new VpcFlowLogsServiceClient(); + doStuffWithVpcFlowLogsServiceClient(vpcFlowLogsServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts new file mode 100644 index 00000000000..279ec3242ac --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts @@ -0,0 +1,2064 @@ +// 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 reachabilityserviceModule 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('v1beta1.ReachabilityServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + 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 = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.servicePath; + assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + await client.initialize(); + assert(client.reachabilityServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.reachabilityServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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('getConnectivityTest', () => { + it('invokes getConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); + const [response] = await client.getConnectivityTest(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnectivityTest( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with closed client', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnectivityTest(request), expectedError); + }); + }); + + describe('createConnectivityTest', () => { + it('invokes createConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.createConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnectivityTest( + 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.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateConnectivityTest', () => { + it('invokes updateConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnectivityTest( + 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.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('rerunConnectivityTest', () => { + it('invokes rerunConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.rerunConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rerunConnectivityTest( + 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.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.rerunConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.rerunConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRerunConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRerunConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteConnectivityTest', () => { + it('invokes deleteConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectivityTest( + 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.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listConnectivityTests', () => { + it('invokes listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); + const [response] = await client.listConnectivityTests(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectivityTests( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConnectivityTests(request), expectedError); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTestsStream without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { + 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.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConnectivityTestsStream with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; + const iterable = client.listConnectivityTestsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectivityTestsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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('connectivityTest', () => { + const fakePath = "/rendered/path/connectivityTest"; + const expectedParameters = { + project: "projectValue", + test: "testValue", + }; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectivityTestPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.connectivityTestPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('connectivityTestPath', () => { + const result = client.connectivityTestPath("projectValue", "testValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConnectivityTestName', () => { + const result = client.matchProjectFromConnectivityTestName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestFromConnectivityTestName', () => { + const result = client.matchTestFromConnectivityTestName(fakePath); + assert.strictEqual(result, "testValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('vpcFlowLogsConfig', () => { + const fakePath = "/rendered/path/vpcFlowLogsConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + vpc_flow_logs_config: "vpcFlowLogsConfigValue", + }; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('vpcFlowLogsConfigPath', () => { + const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVpcFlowLogsConfigName', () => { + const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVpcFlowLogsConfigName', () => { + const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { + const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "vpcFlowLogsConfigValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts new file mode 100644 index 00000000000..e972bc7a15c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts @@ -0,0 +1,1948 @@ +// 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 vpcflowlogsserviceModule 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('v1beta1.VpcFlowLogsServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + 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 = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.servicePath; + assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); + await client.initialize(); + assert(client.vpcFlowLogsServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.vpcFlowLogsServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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('getVpcFlowLogsConfig', () => { + it('invokes getVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() + ); + client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getVpcFlowLogsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() + ); + client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVpcFlowLogsConfig( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVpcFlowLogsConfig with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVpcFlowLogsConfig with closed client', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); + }); + }); + + describe('createVpcFlowLogsConfig', () => { + it('invokes createVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.createVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createVpcFlowLogsConfig( + 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.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVpcFlowLogsConfig with call error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVpcFlowLogsConfig with LRO error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createVpcFlowLogsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateVpcFlowLogsConfigProgress without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkCreateVpcFlowLogsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateVpcFlowLogsConfigProgress with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkCreateVpcFlowLogsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateVpcFlowLogsConfig', () => { + it('invokes updateVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateVpcFlowLogsConfig( + 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.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVpcFlowLogsConfig with call error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVpcFlowLogsConfig with LRO error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateVpcFlowLogsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateVpcFlowLogsConfigProgress without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkUpdateVpcFlowLogsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateVpcFlowLogsConfigProgress with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkUpdateVpcFlowLogsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteVpcFlowLogsConfig', () => { + it('invokes deleteVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVpcFlowLogsConfig( + 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.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVpcFlowLogsConfig with call error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVpcFlowLogsConfig with LRO error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteVpcFlowLogsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteVpcFlowLogsConfigProgress without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkDeleteVpcFlowLogsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVpcFlowLogsConfigProgress with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkDeleteVpcFlowLogsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listVpcFlowLogsConfigs', () => { + it('invokes listVpcFlowLogsConfigs without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listVpcFlowLogsConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVpcFlowLogsConfigs without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVpcFlowLogsConfigs( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVpcFlowLogsConfigs with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listVpcFlowLogsConfigs(request), expectedError); + const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVpcFlowLogsConfigsStream without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listVpcFlowLogsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { + 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.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVpcFlowLogsConfigsStream with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listVpcFlowLogsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVpcFlowLogsConfigs without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; + const iterable = client.listVpcFlowLogsConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVpcFlowLogsConfigs with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVpcFlowLogsConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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('connectivityTest', () => { + const fakePath = "/rendered/path/connectivityTest"; + const expectedParameters = { + project: "projectValue", + test: "testValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectivityTestPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.connectivityTestPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('connectivityTestPath', () => { + const result = client.connectivityTestPath("projectValue", "testValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConnectivityTestName', () => { + const result = client.matchProjectFromConnectivityTestName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestFromConnectivityTestName', () => { + const result = client.matchTestFromConnectivityTestName(fakePath); + assert.strictEqual(result, "testValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('vpcFlowLogsConfig', () => { + const fakePath = "/rendered/path/vpcFlowLogsConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + vpc_flow_logs_config: "vpcFlowLogsConfigValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('vpcFlowLogsConfigPath', () => { + const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVpcFlowLogsConfigName', () => { + const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVpcFlowLogsConfigName', () => { + const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { + const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "vpcFlowLogsConfigValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js new file mode 100644 index 00000000000..d975be0ab73 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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: 'ReachabilityService', + filename: './reachability-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From bfbb9847bd83746e5f3664d22d2845d6e8b92ed5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 7 Nov 2024 09:08:52 +0000 Subject: [PATCH 2/4] =?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 --- .../v1/.eslintignore | 7 - .../v1/.eslintrc.json | 3 - .../v1/.gitignore | 14 - .../v1/.jsdoc.js | 55 - .../v1/.mocharc.js | 33 - .../v1/.prettierrc.js | 22 - .../v1/README.md | 1 - .../v1/package.json | 58 - .../v1/connectivity_test.proto | 416 - .../networkmanagement/v1/reachability.proto | 309 - .../cloud/networkmanagement/v1/trace.proto | 1865 - .../v1/protos/protos.d.ts | 14640 ------ .../v1/protos/protos.js | 40420 --------------- .../v1/protos/protos.json | 4271 -- ...bility_service.create_connectivity_test.js | 79 - ...bility_service.delete_connectivity_test.js | 63 - ...chability_service.get_connectivity_test.js | 62 - ...ability_service.list_connectivity_tests.js | 95 - ...ability_service.rerun_connectivity_test.js | 63 - ...bility_service.update_connectivity_test.js | 68 - ...ata_google.cloud.networkmanagement.v1.json | 283 - .../v1/src/index.ts | 25 - .../v1/src/v1/gapic_metadata.json | 87 - .../v1/src/v1/index.ts | 19 - .../v1/src/v1/reachability_service_client.ts | 1595 - .../reachability_service_client_config.json | 56 - .../v1/reachability_service_proto_list.json | 5 - .../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_reachability_service_v1.ts | 2018 - .../v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../v1beta1/.eslintignore | 7 - .../v1beta1/.eslintrc.json | 3 - .../v1beta1/.gitignore | 14 - .../v1beta1/.jsdoc.js | 55 - .../v1beta1/.mocharc.js | 33 - .../v1beta1/.prettierrc.js | 22 - .../v1beta1/README.md | 1 - .../v1beta1/package.json | 59 - .../v1beta1/connectivity_test.proto | 422 - .../v1beta1/reachability.proto | 304 - .../networkmanagement/v1beta1/trace.proto | 1876 - .../v1beta1/vpc_flow_logs.proto | 228 - .../v1beta1/vpc_flow_logs_config.proto | 152 - .../v1beta1/protos/protos.d.ts | 15637 ------ .../v1beta1/protos/protos.js | 42968 ---------------- .../v1beta1/protos/protos.json | 4682 -- ...bility_service.create_connectivity_test.js | 79 - ...bility_service.delete_connectivity_test.js | 63 - ...chability_service.get_connectivity_test.js | 62 - ...ability_service.list_connectivity_tests.js | 95 - ...ability_service.rerun_connectivity_test.js | 63 - ...bility_service.update_connectivity_test.js | 68 - ...oogle.cloud.networkmanagement.v1beta1.json | 511 - ...ogs_service.create_vpc_flow_logs_config.js | 73 - ...ogs_service.delete_vpc_flow_logs_config.js | 63 - ...w_logs_service.get_vpc_flow_logs_config.js | 62 - ...logs_service.list_vpc_flow_logs_configs.js | 83 - ...ogs_service.update_vpc_flow_logs_config.js | 68 - .../v1beta1/src/index.ts | 27 - .../v1beta1/src/v1beta1/gapic_metadata.json | 155 - .../v1beta1/src/v1beta1/index.ts | 20 - .../v1beta1/reachability_service_client.ts | 1647 - .../reachability_service_client_config.json | 56 - .../reachability_service_proto_list.json | 7 - .../v1beta1/vpc_flow_logs_service_client.ts | 1523 - .../vpc_flow_logs_service_client_config.json | 46 - .../vpc_flow_logs_service_proto_list.json | 7 - .../system-test/fixtures/sample/src/index.js | 28 - .../system-test/fixtures/sample/src/index.ts | 38 - .../v1beta1/system-test/install.ts | 49 - .../gapic_reachability_service_v1beta1.ts | 2064 - .../gapic_vpc_flow_logs_service_v1beta1.ts | 1948 - .../v1beta1/tsconfig.json | 19 - .../v1beta1/webpack.config.js | 64 - .../v1beta1/connectivity_test.proto | 10 +- .../networkmanagement/v1beta1/trace.proto | 11 +- .../protos/protos.d.ts | 15 +- .../protos/protos.js | 53 + .../protos/protos.json | 11 +- 82 files changed, 94 insertions(+), 142280 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js deleted file mode 100644 index 22d92e8132c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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/network-management', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1/README.md deleted file mode 100644 index 90c3778ad46..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1/package.json deleted file mode 100644 index 607215c940a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/network-management", - "version": "0.1.0", - "description": "Networkmanagement client for Node.js", - "repository": "googleapis/nodejs-networkmanagement", - "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 networkmanagement", - "networkmanagement", - "reachability service" - ], - "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-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto deleted file mode 100644 index 0759773e2ab..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto +++ /dev/null @@ -1,416 +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.networkmanagement.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1/trace.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TestOuterClass"; -option java_package = "com.google.cloud.networkmanagement.v1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1"; - -// A Connectivity Test for a network reachability analysis. -message ConnectivityTest { - option (google.api.resource) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - pattern: "projects/{project}/locations/global/connectivityTests/{test}" - }; - - // Identifier. Unique name of the resource using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The user-supplied description of the Connectivity Test. - // Maximum of 512 characters. - string description = 2; - - // Required. Source specification of the Connectivity Test. - // - // You can use a combination of source IP address, virtual machine - // (VM) instance, or Compute Engine network to uniquely identify - // the source location. - // - // Examples: - // If the source IP address is an internal IP address within a Google Cloud - // Virtual Private Cloud (VPC) network, then you must also specify the VPC - // network. Otherwise, specify the VM instance, which already contains its - // internal IP address and VPC network information. - // - // If the source of the test is within an on-premises network, then you must - // provide the destination VPC network. - // - // If the source endpoint is a Compute Engine VM instance with multiple - // network interfaces, the instance itself is not sufficient to identify the - // endpoint. So, you must also specify the source IP address or VPC network. - // - // A reachability analysis proceeds even if the source location is - // ambiguous. However, the test result may include endpoints that you don't - // intend to test. - Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination specification of the Connectivity Test. - // - // You can use a combination of destination IP address, Compute Engine - // VM instance, or VPC network to uniquely identify the destination - // location. - // - // Even if the destination IP address is not unique, the source IP - // location is unique. Usually, the analysis can infer the destination - // endpoint from route information. - // - // If the destination you specify is a VM instance and the instance has - // multiple network interfaces, then you must also specify either - // a destination IP address or VPC network to identify the destination - // interface. - // - // A reachability analysis proceeds even if the destination location is - // ambiguous. However, the result can include endpoints that you don't - // intend to test. - Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; - - // IP Protocol of the test. When not provided, "TCP" is assumed. - string protocol = 5; - - // Other projects that may be relevant for reachability analysis. - // This is applicable to scenarios where a test can cross project boundaries. - repeated string related_projects = 6; - - // Output only. The display name of a Connectivity Test. - string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user-provided metadata. - map labels = 8; - - // Output only. The time the test was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the test's configuration was updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The reachability details of this test from the latest run. - // The details are updated when creating a new test, updating an - // existing test, or triggering a one-time rerun of an existing test. - ReachabilityDetails reachability_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The probing details of this test from the latest run, present - // for applicable tests only. The details are updated when creating a new - // test, updating an existing test, or triggering a one-time rerun of an - // existing test. - ProbingDetails probing_details = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether the test should skip firewall checking. - // If not provided, we assume false. - bool bypass_firewall_checks = 17; -} - -// Source or destination of the Connectivity Test. -message Endpoint { - // The type definition of an endpoint's network. Use one of the - // following choices: - enum NetworkType { - // Default type if unspecified. - NETWORK_TYPE_UNSPECIFIED = 0; - - // A network hosted within Google Cloud. - // To receive more detailed output, specify the URI for the source or - // destination network. - GCP_NETWORK = 1; - - // A network hosted outside of Google Cloud. - // This can be an on-premises network, or a network hosted by another cloud - // provider. - NON_GCP_NETWORK = 2; - } - - // Type of the target of a forwarding rule. - enum ForwardingRuleTarget { - // Forwarding rule target is unknown. - FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - - // Compute Engine instance for protocol forwarding. - INSTANCE = 1; - - // Load Balancer. The specific type can be found from [load_balancer_type] - // [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. - LOAD_BALANCER = 2; - - // Classic Cloud VPN Gateway. - VPN_GATEWAY = 3; - - // Forwarding Rule is a Private Service Connect endpoint. - PSC = 4; - } - - // Wrapper for Cloud Function attributes. - message CloudFunctionEndpoint { - // A [Cloud Function](https://cloud.google.com/functions) name. - string uri = 1; - } - - // Wrapper for the App Engine service version attributes. - message AppEngineVersionEndpoint { - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - // name. - string uri = 1; - } - - // Wrapper for Cloud Run revision attributes. - message CloudRunRevisionEndpoint { - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - // URI. The format is: - // projects/{project}/locations/{location}/revisions/{revision} - string uri = 1; - } - - // The IP address of the endpoint, which can be an external or internal IP. - string ip_address = 1; - - // The IP protocol port of the endpoint. - // Only applicable when protocol is TCP or UDP. - int32 port = 2; - - // A Compute Engine instance URI. - string instance = 3; - - // A forwarding rule and its corresponding IP address represent the frontend - // configuration of a Google Cloud load balancer. Forwarding rules are also - // used for protocol forwarding, Private Service Connect and other network - // services to provide forwarding information in the control plane. Format: - // projects/{project}/global/forwardingRules/{id} or - // projects/{project}/regions/{region}/forwardingRules/{id} - string forwarding_rule = 13; - - // Output only. Specifies the type of the target of the forwarding rule. - optional ForwardingRuleTarget forwarding_rule_target = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the load balancer the forwarding rule points to. Empty - // for forwarding rules not related to load balancers. - optional string load_balancer_id = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Type of the load balancer the forwarding rule points to. - optional LoadBalancerType load_balancer_type = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A cluster URI for [Google Kubernetes Engine - // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - string gke_master_cluster = 7; - - // A [Cloud SQL](https://cloud.google.com/sql) instance URI. - string cloud_sql_instance = 8; - - // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - // URI. - string redis_instance = 17; - - // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - // URI. - string redis_cluster = 18; - - // A [Cloud Function](https://cloud.google.com/functions). - CloudFunctionEndpoint cloud_function = 10; - - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - AppEngineVersionEndpoint app_engine_version = 11; - - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - CloudRunRevisionEndpoint cloud_run_revision = 12; - - // A Compute Engine network URI. - string network = 4; - - // Type of the network where the endpoint is located. - // Applicable only to source endpoint, as destination network type can be - // inferred from the source. - NetworkType network_type = 5; - - // Project ID where the endpoint is located. - // The Project ID can be derived from the URI if you provide a VM instance or - // network URI. - // The following are two cases where you must provide the project ID: - // 1. Only the IP address is specified, and the IP address is within a Google - // Cloud project. - // 2. When you are using Shared VPC and the IP address that you provide is - // from the service project. In this case, the network that the IP address - // resides in is defined in the host project. - string project_id = 6; -} - -// Results of the configuration analysis from the last run of the test. -message ReachabilityDetails { - // The overall result of the test's configuration analysis. - enum Result { - // No result was specified. - RESULT_UNSPECIFIED = 0; - - // Possible scenarios are: - // - // * The configuration analysis determined that a packet originating from - // the source is expected to reach the destination. - // * The analysis didn't complete because the user lacks permission for - // some of the resources in the trace. However, at the time the user's - // permission became insufficient, the trace had been successful so far. - REACHABLE = 1; - - // A packet originating from the source is expected to be dropped before - // reaching the destination. - UNREACHABLE = 2; - - // The source and destination endpoints do not uniquely identify - // the test location in the network, and the reachability result contains - // multiple traces. For some traces, a packet could be delivered, and for - // others, it would not be. This result is also assigned to - // configuration analysis of return path if on its own it should be - // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. - AMBIGUOUS = 4; - - // The configuration analysis did not complete. Possible reasons are: - // - // * A permissions error occurred--for example, the user might not have - // read permission for all of the resources named in the test. - // * An internal error occurred. - // * The analyzer received an invalid or unsupported argument or was unable - // to identify a known endpoint. - UNDETERMINED = 5; - } - - // The overall result of the test's configuration analysis. - Result result = 1; - - // The time of the configuration analysis. - google.protobuf.Timestamp verify_time = 2; - - // The details of a failure or a cancellation of reachability analysis. - google.rpc.Status error = 3; - - // Result may contain a list of traces if a test has multiple possible - // paths in the network, such as when destination endpoint is a load balancer - // with multiple backends. - repeated Trace traces = 5; -} - -// Latency percentile rank and value. -message LatencyPercentile { - // Percentage of samples this data point applies to. - int32 percent = 1; - - // percent-th percentile of latency observed, in microseconds. - // Fraction of percent/100 of samples have latency lower or - // equal to the value of this field. - int64 latency_micros = 2; -} - -// Describes measured latency distribution. -message LatencyDistribution { - // Representative latency percentiles. - repeated LatencyPercentile latency_percentiles = 1; -} - -// Results of active probing from the last run of the test. -message ProbingDetails { - // Overall probing result of the test. - enum ProbingResult { - // No result was specified. - PROBING_RESULT_UNSPECIFIED = 0; - - // At least 95% of packets reached the destination. - REACHABLE = 1; - - // No packets reached the destination. - UNREACHABLE = 2; - - // Less than 95% of packets reached the destination. - REACHABILITY_INCONSISTENT = 3; - - // Reachability could not be determined. Possible reasons are: - // * The user lacks permission to access some of the network resources - // required to run the test. - // * No valid source endpoint could be derived from the request. - // * An internal error occurred. - UNDETERMINED = 4; - } - - // Abort cause types. - enum ProbingAbortCause { - // No reason was specified. - PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - - // The user lacks permission to access some of the - // network resources required to run the test. - PERMISSION_DENIED = 1; - - // No valid source endpoint could be derived from the request. - NO_SOURCE_LOCATION = 2; - } - - // Representation of a network edge location as per - // https://cloud.google.com/vpc/docs/edge-locations. - message EdgeLocation { - // Name of the metropolitan area. - string metropolitan_area = 1; - } - - // The overall result of active probing. - ProbingResult result = 1; - - // The time that reachability was assessed through active probing. - google.protobuf.Timestamp verify_time = 2; - - // Details about an internal failure or the cancellation of active probing. - google.rpc.Status error = 3; - - // The reason probing was aborted. - ProbingAbortCause abort_cause = 4; - - // Number of probes sent. - int32 sent_probe_count = 5; - - // Number of probes that reached the destination. - int32 successful_probe_count = 6; - - // The source and destination endpoints derived from the test input and used - // for active probing. - EndpointInfo endpoint_info = 7; - - // Latency as measured by active probing in one direction: - // from the source to the destination endpoint. - LatencyDistribution probing_latency = 8; - - // The EdgeLocation from which a packet destined for/originating from the - // internet will egress/ingress the Google network. - // This will only be populated for a connectivity test which has an internet - // destination/source address. - // The absence of this field *must not* be used as an indication that the - // destination/source is part of the Google network. - EdgeLocation destination_egress_location = 9; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto deleted file mode 100644 index e6ece7d335f..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto +++ /dev/null @@ -1,309 +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.networkmanagement.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1/connectivity_test.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "ReachabilityServiceProto"; -option java_package = "com.google.cloud.networkmanagement.v1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1"; - -// The Reachability service in Google Cloud Network Management API - -// The Reachability service in the Google Cloud Network Management API provides -// services that analyze the reachability within a single Google Virtual Private -// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises -// networks, or between VPC networks and internet hosts. A reachability analysis -// is based on Google Cloud network configurations. -// -// You can use the analysis results to verify these configurations and -// to troubleshoot connectivity issues. -service ReachabilityService { - option (google.api.default_host) = "networkmanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all Connectivity Tests owned by a project. - rpc ListConnectivityTests(ListConnectivityTestsRequest) - returns (ListConnectivityTestsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/global}/connectivityTests" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific Connectivity Test. - rpc GetConnectivityTest(GetConnectivityTestRequest) - returns (ConnectivityTest) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/global/connectivityTests/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Connectivity Test. - // After you create a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, containing non-existent resources in the network, or you - // don't have read permissions to the network configurations of listed - // projects), then the reachability result returns a value of `UNKNOWN`. - // - // If the endpoint specifications in `ConnectivityTest` are - // incomplete, the reachability result returns a value of - // AMBIGUOUS. For more information, - // see the Connectivity Test documentation. - rpc CreateConnectivityTest(CreateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/global}/connectivityTests" - body: "resource" - }; - option (google.api.method_signature) = "parent,test_id,resource"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Updates the configuration of an existing `ConnectivityTest`. - // After you update a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // The Reachability state in the test resource is updated with the new result. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, they contain non-existent resources in the network, or the - // user does not have read permissions to the network configurations of - // listed projects), then the reachability result returns a value of - // UNKNOWN. - // - // If the endpoint specifications in `ConnectivityTest` are incomplete, the - // reachability result returns a value of `AMBIGUOUS`. See the documentation - // in `ConnectivityTest` for more details. - rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}" - body: "resource" - }; - option (google.api.method_signature) = "update_mask,resource"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Rerun an existing `ConnectivityTest`. - // After the user triggers the rerun, the reachability analysis is performed - // as part of the long running operation, which completes when the analysis - // completes. - // - // Even though the test configuration remains the same, the reachability - // result may change due to underlying network configuration changes. - // - // If the endpoint specifications in `ConnectivityTest` become invalid (for - // example, specified resources are deleted in the network, or you lost - // read permissions to the network configurations of listed projects), then - // the reachability result returns a value of `UNKNOWN`. - rpc RerunConnectivityTest(RerunConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a specific `ConnectivityTest`. - rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/global/connectivityTests/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } -} - -// Request for the `ListConnectivityTests` method. -message ListConnectivityTestsRequest { - // Required. The parent resource of the Connectivity Tests: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Number of `ConnectivityTests` to return. - int32 page_size = 2; - - // Page token from an earlier query, as returned in `next_page_token`. - string page_token = 3; - - // Lists the `ConnectivityTests` that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form ` ` where operators: `<`, `>`, - // `<=`, - // `>=`, - // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - // roughly synonymous with equality). can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/proj-1/locations/global/connectivityTests/test-1 - // - // - Filter by labels: - // - Resources that have a key called `foo` - // labels.foo:* - // - Resources that have a key called `foo` whose value is `bar` - // labels.foo = bar - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -// Response for the `ListConnectivityTests` method. -message ListConnectivityTestsResponse { - // List of Connectivity Tests. - repeated ConnectivityTest resources = 1; - - // Page token to fetch the next set of Connectivity Tests. - string next_page_token = 2; - - // Locations that could not be reached (when querying all locations with `-`). - repeated string unreachable = 3; -} - -// Request for the `GetConnectivityTest` method. -message GetConnectivityTestRequest { - // Required. `ConnectivityTest` resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `CreateConnectivityTest` method. -message CreateConnectivityTestRequest { - // Required. The parent resource of the Connectivity Test to create: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The logical name of the Connectivity Test in your project - // with the following restrictions: - // - // * Must contain only lowercase letters, numbers, and hyphens. - // * Must start with a letter. - // * Must be between 1-40 characters. - // * Must end with a number or a letter. - // * Must be unique within the customer project - string test_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A `ConnectivityTest` resource - ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `UpdateConnectivityTest` method. -message UpdateConnectivityTestRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `DeleteConnectivityTest` method. -message DeleteConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `RerunConnectivityTest` method. -message RerunConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Metadata describing an [Operation][google.longrunning.Operation] -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Target of the operation - for example - // projects/project-1/locations/global/connectivityTests/test-1 - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // Human-readable status of the operation, if any. - string status_detail = 5; - - // Specifies if cancellation was requested for the operation. - bool cancel_requested = 6; - - // API version. - string api_version = 7; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto deleted file mode 100644 index 0a39fc3ffa5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto +++ /dev/null @@ -1,1865 +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.networkmanagement.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TraceProto"; -option java_package = "com.google.cloud.networkmanagement.v1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1"; - -// Trace represents one simulated packet forwarding path. -// -// * Each trace contains multiple ordered steps. -// * Each step is in a particular state with associated configuration. -// * State is categorized as final or non-final states. -// * Each final state has a reason associated. -// * Each trace must end with a final state (the last step). -// ``` -// |---------------------Trace----------------------| -// Step1(State) Step2(State) --- StepN(State(final)) -// ``` -message Trace { - // Derived from the source and destination endpoints definition specified by - // user request, and validated by the data plane model. - // If there are multiple traces starting from different source locations, then - // the endpoint_info may be different between traces. - EndpointInfo endpoint_info = 1; - - // A trace of a test contains multiple steps from the initial state to the - // final state (delivered, dropped, forwarded, or aborted). - // - // The steps are ordered by the processing sequence within the simulated - // network state machine. It is critical to preserve the order of the steps - // and avoid reordering or sorting them. - repeated Step steps = 2; - - // ID of trace. For forward traces, this ID is unique for each trace. For - // return traces, it matches ID of associated forward trace. A single forward - // trace can be associated with none, one or more than one return trace. - int32 forward_trace_id = 4; -} - -// A simulated forwarding path is composed of multiple steps. -// Each step has a well-defined state and an associated configuration. -message Step { - // Type of states that are defined in the network state machine. - // Each step in the packet trace is in a specific state. - enum State { - // Unspecified state. - STATE_UNSPECIFIED = 0; - - // Initial state: packet originating from a Compute Engine instance. - // An InstanceInfo is populated with starting instance information. - START_FROM_INSTANCE = 1; - - // Initial state: packet originating from the internet. - // The endpoint information is populated. - START_FROM_INTERNET = 2; - - // Initial state: packet originating from a Google service. - // The google_service information is populated. - START_FROM_GOOGLE_SERVICE = 27; - - // Initial state: packet originating from a VPC or on-premises network - // with internal source IP. - // If the source is a VPC network visible to the user, a NetworkInfo - // is populated with details of the network. - START_FROM_PRIVATE_NETWORK = 3; - - // Initial state: packet originating from a Google Kubernetes Engine cluster - // master. A GKEMasterInfo is populated with starting instance information. - START_FROM_GKE_MASTER = 21; - - // Initial state: packet originating from a Cloud SQL instance. - // A CloudSQLInstanceInfo is populated with starting instance information. - START_FROM_CLOUD_SQL_INSTANCE = 22; - - // Initial state: packet originating from a Redis instance. - // A RedisInstanceInfo is populated with starting instance information. - START_FROM_REDIS_INSTANCE = 32; - - // Initial state: packet originating from a Redis Cluster. - // A RedisClusterInfo is populated with starting Cluster information. - START_FROM_REDIS_CLUSTER = 33; - - // Initial state: packet originating from a Cloud Function. - // A CloudFunctionInfo is populated with starting function information. - START_FROM_CLOUD_FUNCTION = 23; - - // Initial state: packet originating from an App Engine service version. - // An AppEngineVersionInfo is populated with starting version information. - START_FROM_APP_ENGINE_VERSION = 25; - - // Initial state: packet originating from a Cloud Run revision. - // A CloudRunRevisionInfo is populated with starting revision information. - START_FROM_CLOUD_RUN_REVISION = 26; - - // Initial state: packet originating from a Storage Bucket. Used only for - // return traces. - // The storage_bucket information is populated. - START_FROM_STORAGE_BUCKET = 29; - - // Initial state: packet originating from a published service that uses - // Private Service Connect. Used only for return traces. - START_FROM_PSC_PUBLISHED_SERVICE = 30; - - // Initial state: packet originating from a serverless network endpoint - // group backend. Used only for return traces. - // The serverless_neg information is populated. - START_FROM_SERVERLESS_NEG = 31; - - // Config checking state: verify ingress firewall rule. - APPLY_INGRESS_FIREWALL_RULE = 4; - - // Config checking state: verify egress firewall rule. - APPLY_EGRESS_FIREWALL_RULE = 5; - - // Config checking state: verify route. - APPLY_ROUTE = 6; - - // Config checking state: match forwarding rule. - APPLY_FORWARDING_RULE = 7; - - // Config checking state: verify load balancer backend configuration. - ANALYZE_LOAD_BALANCER_BACKEND = 28; - - // Config checking state: packet sent or received under foreign IP - // address and allowed. - SPOOFING_APPROVED = 8; - - // Forwarding state: arriving at a Compute Engine instance. - ARRIVE_AT_INSTANCE = 9; - - // Forwarding state: arriving at a Compute Engine internal load balancer. - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; - - // Forwarding state: arriving at a Compute Engine external load balancer. - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; - - // Forwarding state: arriving at a Cloud VPN gateway. - ARRIVE_AT_VPN_GATEWAY = 12; - - // Forwarding state: arriving at a Cloud VPN tunnel. - ARRIVE_AT_VPN_TUNNEL = 13; - - // Forwarding state: arriving at a VPC connector. - ARRIVE_AT_VPC_CONNECTOR = 24; - - // Transition state: packet header translated. - NAT = 14; - - // Transition state: original connection is terminated and a new proxied - // connection is initiated. - PROXY_CONNECTION = 15; - - // Final state: packet could be delivered. - DELIVER = 16; - - // Final state: packet could be dropped. - DROP = 17; - - // Final state: packet could be forwarded to a network with an unknown - // configuration. - FORWARD = 18; - - // Final state: analysis is aborted. - ABORT = 19; - - // Special state: viewer of the test result does not have permission to - // see the configuration in this step. - VIEWER_PERMISSION_MISSING = 20; - } - - // A description of the step. Usually this is a summary of the state. - string description = 1; - - // Each step is in one of the pre-defined states. - State state = 2; - - // This is a step that leads to the final state Drop. - bool causes_drop = 3; - - // Project ID that contains the configuration this step is validating. - string project_id = 4; - - // Configuration or metadata associated with each step. - // The configuration is filtered based on viewer's permission. If a viewer - // has no permission to view the configuration in this step, for non-final - // states a special state is populated (VIEWER_PERMISSION_MISSING), and for - // final state the configuration is cleared. - oneof step_info { - // Display information of a Compute Engine instance. - InstanceInfo instance = 5; - - // Display information of a Compute Engine firewall rule. - FirewallInfo firewall = 6; - - // Display information of a Compute Engine route. - RouteInfo route = 7; - - // Display information of the source and destination under analysis. - // The endpoint information in an intermediate state may differ with the - // initial input, as it might be modified by state like NAT, - // or Connection Proxy. - EndpointInfo endpoint = 8; - - // Display information of a Google service - GoogleServiceInfo google_service = 24; - - // Display information of a Compute Engine forwarding rule. - ForwardingRuleInfo forwarding_rule = 9; - - // Display information of a Compute Engine VPN gateway. - VpnGatewayInfo vpn_gateway = 10; - - // Display information of a Compute Engine VPN tunnel. - VpnTunnelInfo vpn_tunnel = 11; - - // Display information of a VPC connector. - VpcConnectorInfo vpc_connector = 21; - - // Display information of the final state "deliver" and reason. - DeliverInfo deliver = 12; - - // Display information of the final state "forward" and reason. - ForwardInfo forward = 13; - - // Display information of the final state "abort" and reason. - AbortInfo abort = 14; - - // Display information of the final state "drop" and reason. - DropInfo drop = 15; - - // Display information of the load balancers. Deprecated in favor of the - // `load_balancer_backend_info` field, not used in new tests. - LoadBalancerInfo load_balancer = 16 [deprecated = true]; - - // Display information of a Google Cloud network. - NetworkInfo network = 17; - - // Display information of a Google Kubernetes Engine cluster master. - GKEMasterInfo gke_master = 18; - - // Display information of a Cloud SQL instance. - CloudSQLInstanceInfo cloud_sql_instance = 19; - - // Display information of a Redis Instance. - RedisInstanceInfo redis_instance = 30; - - // Display information of a Redis Cluster. - RedisClusterInfo redis_cluster = 31; - - // Display information of a Cloud Function. - CloudFunctionInfo cloud_function = 20; - - // Display information of an App Engine service version. - AppEngineVersionInfo app_engine_version = 22; - - // Display information of a Cloud Run revision. - CloudRunRevisionInfo cloud_run_revision = 23; - - // Display information of a NAT. - NatInfo nat = 25; - - // Display information of a ProxyConnection. - ProxyConnectionInfo proxy_connection = 26; - - // Display information of a specific load balancer backend. - LoadBalancerBackendInfo load_balancer_backend_info = 27; - - // Display information of a Storage Bucket. Used only for return traces. - StorageBucketInfo storage_bucket = 28; - - // Display information of a Serverless network endpoint group backend. Used - // only for return traces. - ServerlessNegInfo serverless_neg = 29; - } -} - -// For display only. Metadata associated with a Compute Engine instance. -message InstanceInfo { - // Name of a Compute Engine instance. - string display_name = 1; - - // URI of a Compute Engine instance. - string uri = 2; - - // Name of the network interface of a Compute Engine instance. - string interface = 3; - - // URI of a Compute Engine network. - string network_uri = 4; - - // Internal IP address of the network interface. - string internal_ip = 5; - - // External IP address of the network interface. - string external_ip = 6; - - // Network tags configured on the instance. - repeated string network_tags = 7; - - // Service account authorized for the instance. - string service_account = 8 [deprecated = true]; - - // URI of the PSC network attachment the NIC is attached to (if relevant). - string psc_network_attachment_uri = 9; -} - -// For display only. Metadata associated with a Compute Engine network. -// Next ID: 7 -message NetworkInfo { - // Name of a Compute Engine network. - string display_name = 1; - - // URI of a Compute Engine network. - string uri = 2; - - // URI of the subnet matching the source IP address of the test. - string matched_subnet_uri = 5; - - // The IP range of the subnet matching the source IP address of the test. - string matched_ip_range = 4; - - // The region of the subnet matching the source IP address of the test. - string region = 6; -} - -// For display only. Metadata associated with a VPC firewall rule, an implied -// VPC firewall rule, or a firewall policy rule. -message FirewallInfo { - // The firewall rule's type. - enum FirewallRuleType { - // Unspecified type. - FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - - // Hierarchical firewall policy rule. For details, see - // [Hierarchical firewall policies - // overview](https://cloud.google.com/vpc/docs/firewall-policies). - HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - - // VPC firewall rule. For details, see - // [VPC firewall rules - // overview](https://cloud.google.com/vpc/docs/firewalls). - VPC_FIREWALL_RULE = 2; - - // Implied VPC firewall rule. For details, see - // [Implied - // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - IMPLIED_VPC_FIREWALL_RULE = 3; - - // Implicit firewall rules that are managed by serverless VPC access to - // allow ingress access. They are not visible in the Google Cloud console. - // For details, see [VPC connector's implicit - // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; - - // Global network firewall policy rule. - // For details, see [Network firewall - // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - NETWORK_FIREWALL_POLICY_RULE = 5; - - // Regional network firewall policy rule. - // For details, see [Regional network firewall - // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; - - // Firewall policy rule containing attributes not yet supported in - // Connectivity tests. Firewall analysis is skipped if such a rule can - // potentially be matched. Please see the [list of unsupported - // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). - UNSUPPORTED_FIREWALL_POLICY_RULE = 100; - - // Tracking state for response traffic created when request traffic goes - // through allow firewall rule. - // For details, see [firewall rules - // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) - TRACKING_STATE = 101; - } - - // The display name of the firewall rule. This field might be empty for - // firewall policy rules. - string display_name = 1; - - // The URI of the firewall rule. This field is not applicable to implied - // VPC firewall rules. - string uri = 2; - - // Possible values: INGRESS, EGRESS - string direction = 3; - - // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - string action = 4; - - // The priority of the firewall rule. - int32 priority = 5; - - // The URI of the VPC network that the firewall rule is associated with. - // This field is not applicable to hierarchical firewall policy rules. - string network_uri = 6; - - // The target tags defined by the VPC firewall rule. This field is not - // applicable to firewall policy rules. - repeated string target_tags = 7; - - // The target service accounts specified by the firewall rule. - repeated string target_service_accounts = 8; - - // The name of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy = 9; - - // The URI of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy_uri = 11; - - // The firewall rule's type. - FirewallRuleType firewall_rule_type = 10; -} - -// For display only. Metadata associated with a Compute Engine route. -message RouteInfo { - // Type of route: - enum RouteType { - // Unspecified type. Default value. - ROUTE_TYPE_UNSPECIFIED = 0; - - // Route is a subnet route automatically created by the system. - SUBNET = 1; - - // Static route created by the user, including the default route to the - // internet. - STATIC = 2; - - // Dynamic route exchanged between BGP peers. - DYNAMIC = 3; - - // A subnet route received from peering network. - PEERING_SUBNET = 4; - - // A static route received from peering network. - PEERING_STATIC = 5; - - // A dynamic route received from peering network. - PEERING_DYNAMIC = 6; - - // Policy based route. - POLICY_BASED = 7; - - // Advertised route. Synthetic route which is used to transition from the - // StartFromPrivateNetwork state in Connectivity tests. - ADVERTISED = 101; - } - - // Type of next hop: - enum NextHopType { - // Unspecified type. Default value. - NEXT_HOP_TYPE_UNSPECIFIED = 0; - - // Next hop is an IP address. - NEXT_HOP_IP = 1; - - // Next hop is a Compute Engine instance. - NEXT_HOP_INSTANCE = 2; - - // Next hop is a VPC network gateway. - NEXT_HOP_NETWORK = 3; - - // Next hop is a peering VPC. - NEXT_HOP_PEERING = 4; - - // Next hop is an interconnect. - NEXT_HOP_INTERCONNECT = 5; - - // Next hop is a VPN tunnel. - NEXT_HOP_VPN_TUNNEL = 6; - - // Next hop is a VPN gateway. This scenario only happens when tracing - // connectivity from an on-premises network to Google Cloud through a VPN. - // The analysis simulates a packet departing from the on-premises network - // through a VPN tunnel and arriving at a Cloud VPN gateway. - NEXT_HOP_VPN_GATEWAY = 7; - - // Next hop is an internet gateway. - NEXT_HOP_INTERNET_GATEWAY = 8; - - // Next hop is blackhole; that is, the next hop either does not exist or is - // not running. - NEXT_HOP_BLACKHOLE = 9; - - // Next hop is the forwarding rule of an Internal Load Balancer. - NEXT_HOP_ILB = 10; - - // Next hop is a - // [router appliance - // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - NEXT_HOP_ROUTER_APPLIANCE = 11; - - // Next hop is an NCC hub. - NEXT_HOP_NCC_HUB = 12; - } - - // Indicates where routes are applicable. - enum RouteScope { - // Unspecified scope. Default value. - ROUTE_SCOPE_UNSPECIFIED = 0; - - // Route is applicable to packets in Network. - NETWORK = 1; - - // Route is applicable to packets using NCC Hub's routing table. - NCC_HUB = 2; - } - - // Type of route. - RouteType route_type = 8; - - // Type of next hop. - NextHopType next_hop_type = 9; - - // Indicates where route is applicable. - RouteScope route_scope = 14; - - // Name of a route. - string display_name = 1; - - // URI of a route (if applicable). - string uri = 2; - - // Region of the route (if applicable). - string region = 19; - - // Destination IP range of the route. - string dest_ip_range = 3; - - // Next hop of the route. - string next_hop = 4; - - // URI of a Compute Engine network. NETWORK routes only. - string network_uri = 5; - - // Priority of the route. - int32 priority = 6; - - // Instance tags of the route. - repeated string instance_tags = 7; - - // Source IP address range of the route. Policy based routes only. - string src_ip_range = 10; - - // Destination port ranges of the route. Policy based routes only. - repeated string dest_port_ranges = 11; - - // Source port ranges of the route. Policy based routes only. - repeated string src_port_ranges = 12; - - // Protocols of the route. Policy based routes only. - repeated string protocols = 13; - - // URI of a NCC Hub. NCC_HUB routes only. - optional string ncc_hub_uri = 15; - - // URI of a NCC Spoke. NCC_HUB routes only. - optional string ncc_spoke_uri = 16; - - // For advertised dynamic routes, the URI of the Cloud Router that advertised - // the corresponding IP prefix. - optional string advertised_route_source_router_uri = 17; - - // For advertised routes, the URI of their next hop, i.e. the URI of the - // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - // the advertised prefix is advertised through, or URI of the source peered - // network. - optional string advertised_route_next_hop_uri = 18; -} - -// For display only. Details of a Google Service sending packets to a -// VPC network. Although the source IP might be a publicly routable address, -// some Google Services use special routes within Google production -// infrastructure to reach Compute Engine Instances. -// https://cloud.google.com/vpc/docs/routes#special_return_paths -message GoogleServiceInfo { - // Recognized type of a Google Service. - enum GoogleServiceType { - // Unspecified Google Service. - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; - - // Identity aware proxy. - // https://cloud.google.com/iap/docs/using-tcp-forwarding - IAP = 1; - - // One of two services sharing IP ranges: - // * Load Balancer proxy - // * Centralized Health Check prober - // https://cloud.google.com/load-balancing/docs/firewall-rules - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; - - // Connectivity from Cloud DNS to forwarding targets or alternate name - // servers that use private routing. - // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - // https://cloud.google.com/dns/docs/policies#firewall-rules - CLOUD_DNS = 3; - - // private.googleapis.com and restricted.googleapis.com - GOOGLE_API = 4; - - // Google API via Private Service Connect. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_PSC = 5; - - // Google API via VPC Service Controls. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_VPC_SC = 6; - } - - // Source IP address. - string source_ip = 1; - - // Recognized type of a Google Service. - GoogleServiceType google_service_type = 2; -} - -// For display only. Metadata associated with a Compute Engine forwarding rule. -message ForwardingRuleInfo { - // Name of the forwarding rule. - string display_name = 1; - - // URI of the forwarding rule. - string uri = 2; - - // Protocol defined in the forwarding rule that matches the packet. - string matched_protocol = 3; - - // Port range defined in the forwarding rule that matches the packet. - string matched_port_range = 6; - - // VIP of the forwarding rule. - string vip = 4; - - // Target type of the forwarding rule. - string target = 5; - - // Network URI. - string network_uri = 7; - - // Region of the forwarding rule. Set only for regional forwarding rules. - string region = 8; - - // Name of the load balancer the forwarding rule belongs to. Empty for - // forwarding rules not related to load balancers (like PSC forwarding rules). - string load_balancer_name = 9; - - // URI of the PSC service attachment this forwarding rule targets (if - // applicable). - string psc_service_attachment_uri = 10; - - // PSC Google API target this forwarding rule targets (if applicable). - string psc_google_api_target = 11; -} - -// For display only. Metadata associated with a load balancer. -message LoadBalancerInfo { - // The type definition for a load balancer: - enum LoadBalancerType { - // Type is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Internal TCP/UDP load balancer. - INTERNAL_TCP_UDP = 1; - - // Network TCP/UDP load balancer. - NETWORK_TCP_UDP = 2; - - // HTTP(S) proxy load balancer. - HTTP_PROXY = 3; - - // TCP proxy load balancer. - TCP_PROXY = 4; - - // SSL proxy load balancer. - SSL_PROXY = 5; - } - - // The type definition for a load balancer backend configuration: - enum BackendType { - // Type is unspecified. - BACKEND_TYPE_UNSPECIFIED = 0; - - // Backend Service as the load balancer's backend. - BACKEND_SERVICE = 1; - - // Target Pool as the load balancer's backend. - TARGET_POOL = 2; - - // Target Instance as the load balancer's backend. - TARGET_INSTANCE = 3; - } - - // Type of the load balancer. - LoadBalancerType load_balancer_type = 1; - - // URI of the health check for the load balancer. Deprecated and no longer - // populated as different load balancer backends might have different health - // checks. - string health_check_uri = 2 [deprecated = true]; - - // Information for the loadbalancer backends. - repeated LoadBalancerBackend backends = 3; - - // Type of load balancer's backend configuration. - BackendType backend_type = 4; - - // Backend configuration URI. - string backend_uri = 5; -} - -// For display only. Metadata associated with a specific load balancer backend. -message LoadBalancerBackend { - // State of a health check firewall configuration: - enum HealthCheckFirewallState { - // State is unspecified. Default state if not populated. - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - - // There are configured firewall rules to allow health check probes to the - // backend. - CONFIGURED = 1; - - // There are firewall rules configured to allow partial health check ranges - // or block all health check ranges. - // If a health check probe is sent from denied IP ranges, - // the health check to the backend will fail. Then, the backend will be - // marked unhealthy and will not receive traffic sent to the load balancer. - MISCONFIGURED = 2; - } - - // Name of a Compute Engine instance or network endpoint. - string display_name = 1; - - // URI of a Compute Engine instance or network endpoint. - string uri = 2; - - // State of the health check firewall configuration. - HealthCheckFirewallState health_check_firewall_state = 3; - - // A list of firewall rule URIs allowing probes from health check IP ranges. - repeated string health_check_allowing_firewall_rules = 4; - - // A list of firewall rule URIs blocking probes from health check IP ranges. - repeated string health_check_blocking_firewall_rules = 5; -} - -// For display only. Metadata associated with a Compute Engine VPN gateway. -message VpnGatewayInfo { - // Name of a VPN gateway. - string display_name = 1; - - // URI of a VPN gateway. - string uri = 2; - - // URI of a Compute Engine network where the VPN gateway is configured. - string network_uri = 3; - - // IP address of the VPN gateway. - string ip_address = 4; - - // A VPN tunnel that is associated with this VPN gateway. - // There may be multiple VPN tunnels configured on a VPN gateway, and only - // the one relevant to the test is displayed. - string vpn_tunnel_uri = 5; - - // Name of a Google Cloud region where this VPN gateway is configured. - string region = 6; -} - -// For display only. Metadata associated with a Compute Engine VPN tunnel. -message VpnTunnelInfo { - // Types of VPN routing policy. For details, refer to [Networks and Tunnel - // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). - enum RoutingType { - // Unspecified type. Default value. - ROUTING_TYPE_UNSPECIFIED = 0; - - // Route based VPN. - ROUTE_BASED = 1; - - // Policy based routing. - POLICY_BASED = 2; - - // Dynamic (BGP) routing. - DYNAMIC = 3; - } - - // Name of a VPN tunnel. - string display_name = 1; - - // URI of a VPN tunnel. - string uri = 2; - - // URI of the VPN gateway at local end of the tunnel. - string source_gateway = 3; - - // URI of a VPN gateway at remote end of the tunnel. - string remote_gateway = 4; - - // Remote VPN gateway's IP address. - string remote_gateway_ip = 5; - - // Local VPN gateway's IP address. - string source_gateway_ip = 6; - - // URI of a Compute Engine network where the VPN tunnel is configured. - string network_uri = 7; - - // Name of a Google Cloud region where this VPN tunnel is configured. - string region = 8; - - // Type of the routing policy. - RoutingType routing_type = 9; -} - -// For display only. The specification of the endpoints for the test. -// EndpointInfo is derived from source and destination Endpoint and validated -// by the backend data plane model. -message EndpointInfo { - // Source IP address. - string source_ip = 1; - - // Destination IP address. - string destination_ip = 2; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 3; - - // Source port. Only valid when protocol is TCP or UDP. - int32 source_port = 4; - - // Destination port. Only valid when protocol is TCP or UDP. - int32 destination_port = 5; - - // URI of the network where this packet originates from. - string source_network_uri = 6; - - // URI of the network where this packet is sent to. - string destination_network_uri = 7; - - // URI of the source telemetry agent this packet originates from. - string source_agent_uri = 8; -} - -// Details of the final state "deliver" and associated resource. -message DeliverInfo { - // Deliver target types: - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Target is a Compute Engine instance. - INSTANCE = 1; - - // Target is the internet. - INTERNET = 2; - - // Target is a Google API. - GOOGLE_API = 3; - - // Target is a Google Kubernetes Engine cluster master. - GKE_MASTER = 4; - - // Target is a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 5; - - // Target is a published service that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - PSC_PUBLISHED_SERVICE = 6; - - // Target is Google APIs that use [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_GOOGLE_API = 7; - - // Target is a VPC-SC that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_VPC_SC = 8; - - // Target is a serverless network endpoint group. - SERVERLESS_NEG = 9; - - // Target is a Cloud Storage bucket. - STORAGE_BUCKET = 10; - - // Target is a private network. Used only for return traces. - PRIVATE_NETWORK = 11; - - // Target is a Cloud Function. Used only for return traces. - CLOUD_FUNCTION = 12; - - // Target is a App Engine service version. Used only for return traces. - APP_ENGINE_VERSION = 13; - - // Target is a Cloud Run revision. Used only for return traces. - CLOUD_RUN_REVISION = 14; - - // Target is a Google-managed service. Used only for return traces. - GOOGLE_MANAGED_SERVICE = 15; - - // Target is a Redis Instance. - REDIS_INSTANCE = 16; - - // Target is a Redis Cluster. - REDIS_CLUSTER = 17; - } - - // Target type where the packet is delivered to. - Target target = 1; - - // URI of the resource that the packet is delivered to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the Cloud Storage Bucket the packet is delivered to (if - // applicable). - string storage_bucket = 4; - - // PSC Google API target the packet is delivered to (if applicable). - string psc_google_api_target = 5; -} - -// Details of the final state "forward" and associated resource. -message ForwardInfo { - // Forward target types. - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Forwarded to a VPC peering network. - PEERING_VPC = 1; - - // Forwarded to a Cloud VPN gateway. - VPN_GATEWAY = 2; - - // Forwarded to a Cloud Interconnect connection. - INTERCONNECT = 3; - - // Forwarded to a Google Kubernetes Engine Container cluster master. - GKE_MASTER = 4 [deprecated = true]; - - // Forwarded to the next hop of a custom route imported from a peering VPC. - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - - // Forwarded to a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 6 [deprecated = true]; - - // Forwarded to a VPC network in another project. - ANOTHER_PROJECT = 7; - - // Forwarded to an NCC Hub. - NCC_HUB = 8; - - // Forwarded to a router appliance. - ROUTER_APPLIANCE = 9; - } - - // Target type where this packet is forwarded to. - Target target = 1; - - // URI of the resource that the packet is forwarded to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; -} - -// Details of the final state "abort" and associated resource. -message AbortInfo { - // Abort cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Aborted due to unknown network. Deprecated, not used in the new tests. - UNKNOWN_NETWORK = 1 [deprecated = true]; - - // Aborted because no project information can be derived from the test - // input. Deprecated, not used in the new tests. - UNKNOWN_PROJECT = 3 [deprecated = true]; - - // Aborted because traffic is sent from a public IP to an instance without - // an external IP. Deprecated, not used in the new tests. - NO_EXTERNAL_IP = 7 [deprecated = true]; - - // Aborted because none of the traces matches destination information - // specified in the input test request. Deprecated, not used in the new - // tests. - UNINTENDED_DESTINATION = 8 [deprecated = true]; - - // Aborted because the source endpoint could not be found. Deprecated, not - // used in the new tests. - SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; - - // Aborted because the source network does not match the source endpoint. - // Deprecated, not used in the new tests. - MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; - - // Aborted because the destination endpoint could not be found. Deprecated, - // not used in the new tests. - DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; - - // Aborted because the destination network does not match the destination - // endpoint. Deprecated, not used in the new tests. - MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; - - // Aborted because no endpoint with the packet's destination IP address is - // found. - UNKNOWN_IP = 2; - - // Aborted because no endpoint with the packet's destination IP is found in - // the Google-managed project. - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; - - // Aborted because the source IP address doesn't belong to any of the - // subnets of the source VPC network. - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - - // Aborted because user lacks permission to access all or part of the - // network configurations required to run the test. - PERMISSION_DENIED = 4; - - // Aborted because user lacks permission to access Cloud NAT configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - - // Aborted because user lacks permission to access Network endpoint group - // endpoint configs required to run the test. - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - - // Aborted because user lacks permission to access Cloud Router configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; - - // Aborted because no valid source or destination endpoint is derived from - // the input test request. - NO_SOURCE_LOCATION = 5; - - // Aborted because the source or destination endpoint specified in - // the request is invalid. Some examples: - // - The request might contain malformed resource URI, project ID, or IP - // address. - // - The request might contain inconsistent information (for example, the - // request might include both the instance and the network, but the instance - // might not have a NIC in that network). - INVALID_ARGUMENT = 6; - - // Aborted because the number of steps in the trace exceeds a certain - // limit. It might be caused by a routing loop. - TRACE_TOO_LONG = 9; - - // Aborted due to internal server error. - INTERNAL_ERROR = 10; - - // Aborted because the test scenario is not supported. - UNSUPPORTED = 15; - - // Aborted because the source and destination resources have no common IP - // version. - MISMATCHED_IP_VERSION = 16; - - // Aborted because the connection between the control plane and the node of - // the source cluster is initiated by the node and managed by the - // Konnectivity proxy. - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - - // Aborted because expected resource configuration was missing. - RESOURCE_CONFIG_NOT_FOUND = 18; - - // Aborted because expected VM instance configuration was missing. - VM_INSTANCE_CONFIG_NOT_FOUND = 24; - - // Aborted because expected network configuration was missing. - NETWORK_CONFIG_NOT_FOUND = 25; - - // Aborted because expected firewall configuration was missing. - FIREWALL_CONFIG_NOT_FOUND = 26; - - // Aborted because expected route configuration was missing. - ROUTE_CONFIG_NOT_FOUND = 27; - - // Aborted because a PSC endpoint selection for the Google-managed service - // is ambiguous (several PSC endpoints satisfy test input). - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - - // Aborted because tests with a PSC-based Cloud SQL instance as a source are - // not supported. - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - - // Aborted because tests with a Redis Cluster as a source are not supported. - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; - - // Aborted because tests with a Redis Instance as a source are not - // supported. - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; - - // Aborted because tests with a forwarding rule as a source are not - // supported. - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - - // Aborted because one of the endpoints is a non-routable IP address - // (loopback, link-local, etc). - NON_ROUTABLE_IP_ADDRESS = 22; - - // Aborted due to an unknown issue in the Google-managed project. - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - - // Aborted due to an unsupported configuration of the Google-managed - // project. - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - } - - // Causes that the analysis is aborted. - Cause cause = 1; - - // URI of the resource that caused the abort. - string resource_uri = 2; - - // IP address that caused the abort. - string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // List of project IDs the user specified in the request but lacks access to. - // In this case, analysis is aborted with the PERMISSION_DENIED cause. - repeated string projects_missing_permission = 3; -} - -// Details of the final state "drop" and associated resource. -message DropInfo { - // Drop cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Destination external address cannot be resolved to a known target. If - // the address is used in a Google Cloud project, provide the project ID - // as test input. - UNKNOWN_EXTERNAL_ADDRESS = 1; - - // A Compute Engine instance can only send or receive a packet with a - // foreign IP address if ip_forward is enabled. - FOREIGN_IP_DISALLOWED = 2; - - // Dropped due to a firewall rule, unless allowed due to connection - // tracking. - FIREWALL_RULE = 3; - - // Dropped due to no matching routes. - NO_ROUTE = 4; - - // Dropped due to invalid route. Route's next hop is a blackhole. - ROUTE_BLACKHOLE = 5; - - // Packet is sent to a wrong (unintended) network. Example: you trace a - // packet from VM1:Network1 to VM2:Network2, however, the route configured - // in Network1 sends the packet destined for VM2's IP address to Network3. - ROUTE_WRONG_NETWORK = 6; - - // Route's next hop IP address cannot be resolved to a GCP resource. - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - - // Route's next hop resource is not found. - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - - // Route's next hop instance doesn't have a NIC in the route's network. - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - - // Route's next hop IP address is not a primary IP address of the next hop - // instance. - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - - // Route's next hop forwarding rule doesn't match next hop IP address. - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - - // Route's next hop VPN tunnel is down (does not have valid IKE SAs). - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - - // Route's next hop forwarding rule type is invalid (it's not a forwarding - // rule of the internal passthrough load balancer). - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - - // Packet is sent from the Internet to the private IPv6 address. - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - - // The packet does not match a policy-based VPN tunnel local selector. - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - - // The packet does not match a policy-based VPN tunnel remote selector. - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - - // Packet with internal destination address sent to the internet gateway. - PRIVATE_TRAFFIC_TO_INTERNET = 7; - - // Instance with only an internal IP address tries to access Google API and - // services, but private Google access is not enabled in the subnet. - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - - // Source endpoint tries to access Google API and services through the VPN - // tunnel to another network, but Private Google Access needs to be enabled - // in the source endpoint network. - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - - // Instance with only an internal IP address tries to access external hosts, - // but Cloud NAT is not enabled in the subnet, unless special configurations - // on a VM allow this connection. - NO_EXTERNAL_ADDRESS = 9; - - // Destination internal address cannot be resolved to a known target. If - // this is a shared VPC scenario, verify if the service project ID is - // provided as test input. Otherwise, verify if the IP address is being - // used in the project. - UNKNOWN_INTERNAL_ADDRESS = 10; - - // Forwarding rule's protocol and ports do not match the packet header. - FORWARDING_RULE_MISMATCH = 11; - - // Forwarding rule does not have backends configured. - FORWARDING_RULE_NO_INSTANCES = 12; - - // Firewalls block the health check probes to the backends and cause - // the backends to be unavailable for traffic from the load balancer. - // For more details, see [Health check firewall - // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - - // Packet is sent from or to a Compute Engine instance that is not in a - // running state. - INSTANCE_NOT_RUNNING = 14; - - // Packet sent from or to a GKE cluster that is not in running state. - GKE_CLUSTER_NOT_RUNNING = 27; - - // Packet sent from or to a Cloud SQL instance that is not in running state. - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - - // Packet sent from or to a Redis Instance that is not in running state. - REDIS_INSTANCE_NOT_RUNNING = 68; - - // Packet sent from or to a Redis Cluster that is not in running state. - REDIS_CLUSTER_NOT_RUNNING = 69; - - // The type of traffic is blocked and the user cannot configure a firewall - // rule to enable it. See [Always blocked - // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - // more details. - TRAFFIC_TYPE_BLOCKED = 15; - - // Access to Google Kubernetes Engine cluster master's endpoint is not - // authorized. See [Access to the cluster - // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - // for more details. - GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - - // Access to the Cloud SQL instance endpoint is not authorized. - // See [Authorizing with authorized - // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - // more details. - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - - // Packet was dropped inside Google Kubernetes Engine Service. - DROPPED_INSIDE_GKE_SERVICE = 18; - - // Packet was dropped inside Cloud SQL Service. - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - - // Packet was dropped because there is no peering between the originating - // network and the Google Managed Services Network. - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - - // Packet was dropped because the Google-managed service uses Private - // Service Connect (PSC), but the PSC endpoint is not found in the project. - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - - // Packet was dropped because the GKE cluster uses Private Service Connect - // (PSC), but the PSC endpoint is not found in the project. - GKE_PSC_ENDPOINT_MISSING = 36; - - // Packet was dropped because the Cloud SQL instance has neither a private - // nor a public IP address. - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - - // Packet was dropped because a GKE cluster private endpoint is - // unreachable from a region different from the cluster's region. - GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - - // Packet sent from a public GKE cluster control plane to a private - // IP address. - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - - // Packet was dropped because there is no route from a GKE cluster - // control plane to a destination network. - GKE_CONTROL_PLANE_NO_ROUTE = 32; - - // Packet sent from a Cloud SQL instance to an external IP address is not - // allowed. The Cloud SQL instance is not configured to send packets to - // external IP addresses. - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - - // Packet sent from a Cloud SQL instance with only a public IP address to a - // private IP address. - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - - // Packet was dropped because there is no route from a Cloud SQL - // instance to a destination network. - CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - - // Packet was dropped because the Cloud SQL instance requires all - // connections to use Cloud SQL connectors and to target the Cloud SQL proxy - // port (3307). - CLOUD_SQL_CONNECTOR_REQUIRED = 63; - - // Packet could be dropped because the Cloud Function is not in an active - // status. - CLOUD_FUNCTION_NOT_ACTIVE = 22; - - // Packet could be dropped because no VPC connector is set. - VPC_CONNECTOR_NOT_SET = 23; - - // Packet could be dropped because the VPC connector is not in a running - // state. - VPC_CONNECTOR_NOT_RUNNING = 24; - - // Packet could be dropped because the traffic from the serverless service - // to the VPC connector is not allowed. - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; - - // Packet could be dropped because the health check traffic to the VPC - // connector is not allowed. - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; - - // Packet could be dropped because it was sent from a different region - // to a regional forwarding without global access. - FORWARDING_RULE_REGION_MISMATCH = 25; - - // The Private Service Connect endpoint is in a project that is not approved - // to connect to the service. - PSC_CONNECTION_NOT_ACCEPTED = 26; - - // The packet is sent to the Private Service Connect endpoint over the - // peering, but [it's not - // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule does not have - // global access enabled. - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule has multiple ports - // specified. - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group) targeting a Cloud SQL service attachment, but this - // configuration is not supported. - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - - // No NAT subnets are defined for the PSC service attachment. - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - - // PSC endpoint is accessed via NCC, but PSC transitivity configuration is - // not yet propagated. - PSC_TRANSITIVITY_NOT_PROPAGATED = 64; - - // The packet sent from the hybrid NEG proxy matches a non-dynamic route, - // but such a configuration is not supported. - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - - // The packet sent from the hybrid NEG proxy matches a dynamic route with a - // next hop in a different region, but such a configuration is not - // supported. - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - - // Packet sent from a Cloud Run revision that is not ready. - CLOUD_RUN_REVISION_NOT_READY = 29; - - // Packet was dropped inside Private Service Connect service producer. - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - - // Packet sent to a load balancer, which requires a proxy-only subnet and - // the subnet is not found. - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - - // Packet sent to Cloud Nat without active NAT IPs. - CLOUD_NAT_NO_ADDRESSES = 40; - - // Packet is stuck in a routing loop. - ROUTING_LOOP = 59; - - // Packet is dropped inside a Google-managed service due to being delivered - // in return trace to an endpoint that doesn't match the endpoint the packet - // was sent from in forward trace. Used only for return traces. - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; - - // Packet is dropped due to a load balancer backend instance not having a - // network interface in the network expected by the load balancer. - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; - - // Packet is dropped due to a backend service named port not being defined - // on the instance group level. - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; - - // Packet is dropped due to a destination IP range being part of a Private - // NAT IP range. - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; - - // Generic drop cause for a packet being dropped inside a Redis Instance - // service project. - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Instance. Port 6379 should be used to connect to a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PORT = 71; - - // Packet is dropped due to connecting from PUPI address to a PSA based - // Redis Instance. - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; - - // Packet is dropped due to no route to the destination network. - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; - - // Redis Instance does not have an external IP address. - REDIS_INSTANCE_NO_EXTERNAL_IP = 74; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Instance. Only TCP connections are accepted by a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; - - // Generic drop cause for a packet being dropped inside a Redis Cluster - // service project. - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to - // a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PORT = 76; - - // Redis Cluster does not have an external IP address. - REDIS_CLUSTER_NO_EXTERNAL_IP = 77; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix advertised - // via BGP by the Cloud Router. - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix included to - // the local traffic selector of the VPN tunnel. - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; - - // Packet from the unknown peered network is dropped due to no known route - // from the source network to the destination IP address. - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; - } - - // Cause that the packet is dropped. - Cause cause = 1; - - // URI of the resource that caused the drop. - string resource_uri = 2; - - // Source IP address of the dropped packet (if relevant). - string source_ip = 3; - - // Destination IP address of the dropped packet (if relevant). - string destination_ip = 4; - - // Region of the dropped packet (if relevant). - string region = 5; -} - -// For display only. Metadata associated with a Google Kubernetes Engine (GKE) -// cluster master. -message GKEMasterInfo { - // URI of a GKE cluster. - string cluster_uri = 2; - - // URI of a GKE cluster network. - string cluster_network_uri = 4; - - // Internal IP address of a GKE cluster master. - string internal_ip = 5; - - // External IP address of a GKE cluster master. - string external_ip = 6; -} - -// For display only. Metadata associated with a Cloud SQL instance. -message CloudSQLInstanceInfo { - // Name of a Cloud SQL instance. - string display_name = 1; - - // URI of a Cloud SQL instance. - string uri = 2; - - // URI of a Cloud SQL instance network or empty string if the instance does - // not have one. - string network_uri = 4; - - // Internal IP address of a Cloud SQL instance. - string internal_ip = 5; - - // External IP address of a Cloud SQL instance. - string external_ip = 6; - - // Region in which the Cloud SQL instance is running. - string region = 7; -} - -// For display only. Metadata associated with a Cloud Redis Instance. -message RedisInstanceInfo { - // Name of a Cloud Redis Instance. - string display_name = 1; - - // URI of a Cloud Redis Instance. - string uri = 2; - - // URI of a Cloud Redis Instance network. - string network_uri = 3; - - // Primary endpoint IP address of a Cloud Redis Instance. - string primary_endpoint_ip = 4; - - // Read endpoint IP address of a Cloud Redis Instance (if applicable). - string read_endpoint_ip = 5; - - // Region in which the Cloud Redis Instance is defined. - string region = 6; -} - -// For display only. Metadata associated with a Redis Cluster. -message RedisClusterInfo { - // Name of a Redis Cluster. - string display_name = 1; - - // URI of a Redis Cluster in format - // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - string uri = 2; - - // URI of a Redis Cluster network in format - // "projects/{project_id}/global/networks/{network_id}". - string network_uri = 3; - - // Discovery endpoint IP address of a Redis Cluster. - string discovery_endpoint_ip_address = 4 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Secondary endpoint IP address of a Redis Cluster. - string secondary_endpoint_ip_address = 5 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the region in which the Redis Cluster is defined. For example, - // "us-central1". - string location = 6; -} - -// For display only. Metadata associated with a Cloud Function. -message CloudFunctionInfo { - // Name of a Cloud Function. - string display_name = 1; - - // URI of a Cloud Function. - string uri = 2; - - // Location in which the Cloud Function is deployed. - string location = 3; - - // Latest successfully deployed version id of the Cloud Function. - int64 version_id = 4; -} - -// For display only. Metadata associated with a Cloud Run revision. -message CloudRunRevisionInfo { - // Name of a Cloud Run revision. - string display_name = 1; - - // URI of a Cloud Run revision. - string uri = 2; - - // Location in which this revision is deployed. - string location = 4; - - // URI of Cloud Run service this revision belongs to. - string service_uri = 5; -} - -// For display only. Metadata associated with an App Engine version. -message AppEngineVersionInfo { - // Name of an App Engine version. - string display_name = 1; - - // URI of an App Engine version. - string uri = 2; - - // Runtime of the App Engine version. - string runtime = 3; - - // App Engine execution environment for a version. - string environment = 4; -} - -// For display only. Metadata associated with a VPC connector. -message VpcConnectorInfo { - // Name of a VPC connector. - string display_name = 1; - - // URI of a VPC connector. - string uri = 2; - - // Location in which the VPC connector is deployed. - string location = 3; -} - -// For display only. Metadata associated with NAT. -message NatInfo { - // Types of NAT. - enum Type { - // Type is unspecified. - TYPE_UNSPECIFIED = 0; - - // From Compute Engine instance's internal address to external address. - INTERNAL_TO_EXTERNAL = 1; - - // From Compute Engine instance's external address to internal address. - EXTERNAL_TO_INTERNAL = 2; - - // Cloud NAT Gateway. - CLOUD_NAT = 3; - - // Private service connect NAT. - PRIVATE_SERVICE_CONNECT = 4; - } - - // Type of NAT. - Type type = 1; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 2; - - // URI of the network where NAT translation takes place. - string network_uri = 3; - - // Source IP address before NAT translation. - string old_source_ip = 4; - - // Source IP address after NAT translation. - string new_source_ip = 5; - - // Destination IP address before NAT translation. - string old_destination_ip = 6; - - // Destination IP address after NAT translation. - string new_destination_ip = 7; - - // Source port before NAT translation. Only valid when protocol is TCP or UDP. - int32 old_source_port = 8; - - // Source port after NAT translation. Only valid when protocol is TCP or UDP. - int32 new_source_port = 9; - - // Destination port before NAT translation. Only valid when protocol is TCP or - // UDP. - int32 old_destination_port = 10; - - // Destination port after NAT translation. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 11; - - // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - string router_uri = 12; - - // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - string nat_gateway_name = 13; -} - -// For display only. Metadata associated with ProxyConnection. -message ProxyConnectionInfo { - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 1; - - // Source IP address of an original connection. - string old_source_ip = 2; - - // Source IP address of a new connection. - string new_source_ip = 3; - - // Destination IP address of an original connection - string old_destination_ip = 4; - - // Destination IP address of a new connection. - string new_destination_ip = 5; - - // Source port of an original connection. Only valid when protocol is TCP or - // UDP. - int32 old_source_port = 6; - - // Source port of a new connection. Only valid when protocol is TCP or UDP. - int32 new_source_port = 7; - - // Destination port of an original connection. Only valid when protocol is TCP - // or UDP. - int32 old_destination_port = 8; - - // Destination port of a new connection. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 9; - - // Uri of proxy subnet. - string subnet_uri = 10; - - // URI of the network where connection is proxied. - string network_uri = 11; -} - -// For display only. Metadata associated with the load balancer backend. -message LoadBalancerBackendInfo { - // Health check firewalls configuration state enum. - enum HealthCheckFirewallsConfigState { - // Configuration state unspecified. It usually means that the backend has - // no health check attached, or there was an unexpected configuration error - // preventing Connectivity tests from verifying health check configuration. - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - - // Firewall rules (policies) allowing health check traffic from all required - // IP ranges to the backend are configured. - FIREWALLS_CONFIGURED = 1; - - // Firewall rules (policies) allow health check traffic only from a part of - // required IP ranges. - FIREWALLS_PARTIALLY_CONFIGURED = 2; - - // Firewall rules (policies) deny health check traffic from all required - // IP ranges to the backend. - FIREWALLS_NOT_CONFIGURED = 3; - - // The network contains firewall rules of unsupported types, so Connectivity - // tests were not able to verify health check configuration status. Please - // refer to the documentation for the list of unsupported configurations: - // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - FIREWALLS_UNSUPPORTED = 4; - } - - // Display name of the backend. For example, it might be an instance name for - // the instance group backends, or an IP address and port for zonal network - // endpoint group backends. - string name = 1; - - // URI of the backend instance (if applicable). Populated for instance group - // backends, and zonal NEG backends. - string instance_uri = 2; - - // URI of the backend service this backend belongs to (if applicable). - string backend_service_uri = 3; - - // URI of the instance group this backend belongs to (if applicable). - string instance_group_uri = 4; - - // URI of the network endpoint group this backend belongs to (if applicable). - string network_endpoint_group_uri = 5; - - // URI of the backend bucket this backend targets (if applicable). - string backend_bucket_uri = 8; - - // URI of the PSC service attachment this PSC NEG backend targets (if - // applicable). - string psc_service_attachment_uri = 9; - - // PSC Google API target this PSC NEG backend targets (if applicable). - string psc_google_api_target = 10; - - // URI of the health check attached to this backend (if applicable). - string health_check_uri = 6; - - // Output only. Health check firewalls configuration state for the backend. - // This is a result of the static firewall analysis (verifying that health - // check traffic from required IP ranges to the backend is allowed or not). - // The backend might still be unhealthy even if these firewalls are - // configured. Please refer to the documentation for more information: - // https://cloud.google.com/load-balancing/docs/firewall-rules - HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Type of a load balancer. For more information, see [Summary of Google Cloud -// load -// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). -enum LoadBalancerType { - // Forwarding rule points to a different target than a load balancer or a - // load balancer type is unknown. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Global external HTTP(S) load balancer. - HTTPS_ADVANCED_LOAD_BALANCER = 1; - - // Global external HTTP(S) load balancer (classic) - HTTPS_LOAD_BALANCER = 2; - - // Regional external HTTP(S) load balancer. - REGIONAL_HTTPS_LOAD_BALANCER = 3; - - // Internal HTTP(S) load balancer. - INTERNAL_HTTPS_LOAD_BALANCER = 4; - - // External SSL proxy load balancer. - SSL_PROXY_LOAD_BALANCER = 5; - - // External TCP proxy load balancer. - TCP_PROXY_LOAD_BALANCER = 6; - - // Internal regional TCP proxy load balancer. - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - - // External TCP/UDP Network load balancer. - NETWORK_LOAD_BALANCER = 8; - - // Target-pool based external TCP/UDP Network load balancer. - LEGACY_NETWORK_LOAD_BALANCER = 9; - - // Internal TCP/UDP load balancer. - TCP_UDP_INTERNAL_LOAD_BALANCER = 10; -} - -// For display only. Metadata associated with Storage Bucket. -message StorageBucketInfo { - // Cloud Storage Bucket name. - string bucket = 1; -} - -// For display only. Metadata associated with the serverless network endpoint -// group backend. -message ServerlessNegInfo { - // URI of the serverless network endpoint group. - string neg_uri = 1; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts deleted file mode 100644 index 301bcf3c9d6..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts +++ /dev/null @@ -1,14640 +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 networkmanagement. */ - namespace networkmanagement { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ConnectivityTest. */ - interface IConnectivityTest { - - /** ConnectivityTest name */ - name?: (string|null); - - /** ConnectivityTest description */ - description?: (string|null); - - /** ConnectivityTest source */ - source?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest destination */ - destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest protocol */ - protocol?: (string|null); - - /** ConnectivityTest relatedProjects */ - relatedProjects?: (string[]|null); - - /** ConnectivityTest displayName */ - displayName?: (string|null); - - /** ConnectivityTest labels */ - labels?: ({ [k: string]: string }|null); - - /** ConnectivityTest createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails */ - reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails */ - probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks */ - bypassFirewallChecks?: (boolean|null); - } - - /** Represents a ConnectivityTest. */ - class ConnectivityTest implements IConnectivityTest { - - /** - * Constructs a new ConnectivityTest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IConnectivityTest); - - /** ConnectivityTest name. */ - public name: string; - - /** ConnectivityTest description. */ - public description: string; - - /** ConnectivityTest source. */ - public source?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest destination. */ - public destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest protocol. */ - public protocol: string; - - /** ConnectivityTest relatedProjects. */ - public relatedProjects: string[]; - - /** ConnectivityTest displayName. */ - public displayName: string; - - /** ConnectivityTest labels. */ - public labels: { [k: string]: string }; - - /** ConnectivityTest createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails. */ - public reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails. */ - public probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks. */ - public bypassFirewallChecks: boolean; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectivityTest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IConnectivityTest): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Verifies a ConnectivityTest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectivityTest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @param message ConnectivityTest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectivityTest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectivityTest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoint. */ - interface IEndpoint { - - /** Endpoint ipAddress */ - ipAddress?: (string|null); - - /** Endpoint port */ - port?: (number|null); - - /** Endpoint instance */ - instance?: (string|null); - - /** Endpoint forwardingRule */ - forwardingRule?: (string|null); - - /** Endpoint forwardingRuleTarget */ - forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId */ - loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster */ - gkeMasterCluster?: (string|null); - - /** Endpoint cloudSqlInstance */ - cloudSqlInstance?: (string|null); - - /** Endpoint redisInstance */ - redisInstance?: (string|null); - - /** Endpoint redisCluster */ - redisCluster?: (string|null); - - /** Endpoint cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network */ - network?: (string|null); - - /** Endpoint networkType */ - networkType?: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType|null); - - /** Endpoint projectId */ - projectId?: (string|null); - } - - /** Represents an Endpoint. */ - class Endpoint implements IEndpoint { - - /** - * Constructs a new Endpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IEndpoint); - - /** Endpoint ipAddress. */ - public ipAddress: string; - - /** Endpoint port. */ - public port: number; - - /** Endpoint instance. */ - public instance: string; - - /** Endpoint forwardingRule. */ - public forwardingRule: string; - - /** Endpoint forwardingRuleTarget. */ - public forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId. */ - public loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType. */ - public loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster. */ - public gkeMasterCluster: string; - - /** Endpoint cloudSqlInstance. */ - public cloudSqlInstance: string; - - /** Endpoint redisInstance. */ - public redisInstance: string; - - /** Endpoint redisCluster. */ - public redisCluster: string; - - /** Endpoint cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network. */ - public network: string; - - /** Endpoint networkType. */ - public networkType: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType); - - /** Endpoint projectId. */ - public projectId: string; - - /** Endpoint _forwardingRuleTarget. */ - public _forwardingRuleTarget?: "forwardingRuleTarget"; - - /** Endpoint _loadBalancerId. */ - public _loadBalancerId?: "loadBalancerId"; - - /** Endpoint _loadBalancerType. */ - public _loadBalancerType?: "loadBalancerType"; - - /** - * Creates a new Endpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IEndpoint): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Verifies an Endpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Endpoint { - - /** NetworkType enum. */ - enum NetworkType { - NETWORK_TYPE_UNSPECIFIED = 0, - GCP_NETWORK = 1, - NON_GCP_NETWORK = 2 - } - - /** ForwardingRuleTarget enum. */ - enum ForwardingRuleTarget { - FORWARDING_RULE_TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - LOAD_BALANCER = 2, - VPN_GATEWAY = 3, - PSC = 4 - } - - /** Properties of a CloudFunctionEndpoint. */ - interface ICloudFunctionEndpoint { - - /** CloudFunctionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudFunctionEndpoint. */ - class CloudFunctionEndpoint implements ICloudFunctionEndpoint { - - /** - * Constructs a new CloudFunctionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint); - - /** CloudFunctionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Verifies a CloudFunctionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @param message CloudFunctionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionEndpoint. */ - interface IAppEngineVersionEndpoint { - - /** AppEngineVersionEndpoint uri */ - uri?: (string|null); - } - - /** Represents an AppEngineVersionEndpoint. */ - class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { - - /** - * Constructs a new AppEngineVersionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint); - - /** AppEngineVersionEndpoint uri. */ - public uri: string; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @param message AppEngineVersionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionEndpoint. */ - interface ICloudRunRevisionEndpoint { - - /** CloudRunRevisionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudRunRevisionEndpoint. */ - class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint); - - /** CloudRunRevisionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @param message CloudRunRevisionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ReachabilityDetails. */ - interface IReachabilityDetails { - - /** ReachabilityDetails result */ - result?: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null); - - /** ReachabilityDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error */ - error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces */ - traces?: (google.cloud.networkmanagement.v1.ITrace[]|null); - } - - /** Represents a ReachabilityDetails. */ - class ReachabilityDetails implements IReachabilityDetails { - - /** - * Constructs a new ReachabilityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails); - - /** ReachabilityDetails result. */ - public result: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result); - - /** ReachabilityDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces. */ - public traces: google.cloud.networkmanagement.v1.ITrace[]; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ReachabilityDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Verifies a ReachabilityDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReachabilityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @param message ReachabilityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReachabilityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReachabilityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReachabilityDetails { - - /** Result enum. */ - enum Result { - RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - AMBIGUOUS = 4, - UNDETERMINED = 5 - } - } - - /** Properties of a LatencyPercentile. */ - interface ILatencyPercentile { - - /** LatencyPercentile percent */ - percent?: (number|null); - - /** LatencyPercentile latencyMicros */ - latencyMicros?: (number|Long|string|null); - } - - /** Represents a LatencyPercentile. */ - class LatencyPercentile implements ILatencyPercentile { - - /** - * Constructs a new LatencyPercentile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile); - - /** LatencyPercentile percent. */ - public percent: number; - - /** LatencyPercentile latencyMicros. */ - public latencyMicros: (number|Long|string); - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyPercentile instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Verifies a LatencyPercentile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyPercentile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @param message LatencyPercentile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyPercentile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyPercentile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LatencyDistribution. */ - interface ILatencyDistribution { - - /** LatencyDistribution latencyPercentiles */ - latencyPercentiles?: (google.cloud.networkmanagement.v1.ILatencyPercentile[]|null); - } - - /** Represents a LatencyDistribution. */ - class LatencyDistribution implements ILatencyDistribution { - - /** - * Constructs a new LatencyDistribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution); - - /** LatencyDistribution latencyPercentiles. */ - public latencyPercentiles: google.cloud.networkmanagement.v1.ILatencyPercentile[]; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyDistribution instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Verifies a LatencyDistribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyDistribution - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @param message LatencyDistribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyDistribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyDistribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProbingDetails. */ - interface IProbingDetails { - - /** ProbingDetails result */ - result?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null); - - /** ProbingDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error */ - error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause */ - abortCause?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null); - - /** ProbingDetails sentProbeCount */ - sentProbeCount?: (number|null); - - /** ProbingDetails successfulProbeCount */ - successfulProbeCount?: (number|null); - - /** ProbingDetails endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** ProbingDetails probingLatency */ - probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation */ - destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); - } - - /** Represents a ProbingDetails. */ - class ProbingDetails implements IProbingDetails { - - /** - * Constructs a new ProbingDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IProbingDetails); - - /** ProbingDetails result. */ - public result: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult); - - /** ProbingDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause. */ - public abortCause: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause); - - /** ProbingDetails sentProbeCount. */ - public sentProbeCount: number; - - /** ProbingDetails successfulProbeCount. */ - public successfulProbeCount: number; - - /** ProbingDetails endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** ProbingDetails probingLatency. */ - public probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation. */ - public destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ProbingDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IProbingDetails): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Verifies a ProbingDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProbingDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @param message ProbingDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProbingDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProbingDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProbingDetails { - - /** ProbingResult enum. */ - enum ProbingResult { - PROBING_RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - REACHABILITY_INCONSISTENT = 3, - UNDETERMINED = 4 - } - - /** ProbingAbortCause enum. */ - enum ProbingAbortCause { - PROBING_ABORT_CAUSE_UNSPECIFIED = 0, - PERMISSION_DENIED = 1, - NO_SOURCE_LOCATION = 2 - } - - /** Properties of an EdgeLocation. */ - interface IEdgeLocation { - - /** EdgeLocation metropolitanArea */ - metropolitanArea?: (string|null); - } - - /** Represents an EdgeLocation. */ - class EdgeLocation implements IEdgeLocation { - - /** - * Constructs a new EdgeLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation); - - /** EdgeLocation metropolitanArea. */ - public metropolitanArea: string; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns EdgeLocation instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Verifies an EdgeLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EdgeLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @param message EdgeLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EdgeLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EdgeLocation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Trace. */ - interface ITrace { - - /** Trace endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Trace steps */ - steps?: (google.cloud.networkmanagement.v1.IStep[]|null); - - /** Trace forwardTraceId */ - forwardTraceId?: (number|null); - } - - /** Represents a Trace. */ - class Trace implements ITrace { - - /** - * Constructs a new Trace. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ITrace); - - /** Trace endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Trace steps. */ - public steps: google.cloud.networkmanagement.v1.IStep[]; - - /** Trace forwardTraceId. */ - public forwardTraceId: number; - - /** - * Creates a new Trace instance using the specified properties. - * @param [properties] Properties to set - * @returns Trace instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ITrace): google.cloud.networkmanagement.v1.Trace; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Trace; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Trace; - - /** - * Verifies a Trace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trace - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Trace; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @param message Trace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trace - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Step. */ - interface IStep { - - /** Step description */ - description?: (string|null); - - /** Step state */ - state?: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State|null); - - /** Step causesDrop */ - causesDrop?: (boolean|null); - - /** Step projectId */ - projectId?: (string|null); - - /** Step instance */ - instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); - - /** Step firewall */ - firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); - - /** Step route */ - route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); - - /** Step endpoint */ - endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Step googleService */ - googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); - - /** Step forwardingRule */ - forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); - - /** Step vpnGateway */ - vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); - - /** Step vpnTunnel */ - vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); - - /** Step vpcConnector */ - vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); - - /** Step deliver */ - deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); - - /** Step forward */ - forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); - - /** Step abort */ - abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); - - /** Step drop */ - drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); - - /** Step loadBalancer */ - loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); - - /** Step network */ - network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); - - /** Step gkeMaster */ - gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance */ - cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance */ - redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); - - /** Step redisCluster */ - redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); - - /** Step cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); - - /** Step appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); - - /** Step nat */ - nat?: (google.cloud.networkmanagement.v1.INatInfo|null); - - /** Step proxyConnection */ - proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo */ - loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket */ - storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); - - /** Step serverlessNeg */ - serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); - } - - /** Represents a Step. */ - class Step implements IStep { - - /** - * Constructs a new Step. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IStep); - - /** Step description. */ - public description: string; - - /** Step state. */ - public state: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State); - - /** Step causesDrop. */ - public causesDrop: boolean; - - /** Step projectId. */ - public projectId: string; - - /** Step instance. */ - public instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); - - /** Step firewall. */ - public firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); - - /** Step route. */ - public route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); - - /** Step endpoint. */ - public endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Step googleService. */ - public googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); - - /** Step forwardingRule. */ - public forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); - - /** Step vpnGateway. */ - public vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); - - /** Step vpnTunnel. */ - public vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); - - /** Step vpcConnector. */ - public vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); - - /** Step deliver. */ - public deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); - - /** Step forward. */ - public forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); - - /** Step abort. */ - public abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); - - /** Step drop. */ - public drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); - - /** Step loadBalancer. */ - public loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); - - /** Step network. */ - public network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); - - /** Step gkeMaster. */ - public gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance. */ - public cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance. */ - public redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); - - /** Step redisCluster. */ - public redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); - - /** Step cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); - - /** Step appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); - - /** Step nat. */ - public nat?: (google.cloud.networkmanagement.v1.INatInfo|null); - - /** Step proxyConnection. */ - public proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo. */ - public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket. */ - public storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); - - /** Step serverlessNeg. */ - public serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); - - /** Step stepInfo. */ - public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); - - /** - * Creates a new Step instance using the specified properties. - * @param [properties] Properties to set - * @returns Step instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IStep): google.cloud.networkmanagement.v1.Step; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Step message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Step; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Step; - - /** - * Verifies a Step message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Step - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Step; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @param message Step - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Step to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Step - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Step { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - START_FROM_INSTANCE = 1, - START_FROM_INTERNET = 2, - START_FROM_GOOGLE_SERVICE = 27, - START_FROM_PRIVATE_NETWORK = 3, - START_FROM_GKE_MASTER = 21, - START_FROM_CLOUD_SQL_INSTANCE = 22, - START_FROM_REDIS_INSTANCE = 32, - START_FROM_REDIS_CLUSTER = 33, - START_FROM_CLOUD_FUNCTION = 23, - START_FROM_APP_ENGINE_VERSION = 25, - START_FROM_CLOUD_RUN_REVISION = 26, - START_FROM_STORAGE_BUCKET = 29, - START_FROM_PSC_PUBLISHED_SERVICE = 30, - START_FROM_SERVERLESS_NEG = 31, - APPLY_INGRESS_FIREWALL_RULE = 4, - APPLY_EGRESS_FIREWALL_RULE = 5, - APPLY_ROUTE = 6, - APPLY_FORWARDING_RULE = 7, - ANALYZE_LOAD_BALANCER_BACKEND = 28, - SPOOFING_APPROVED = 8, - ARRIVE_AT_INSTANCE = 9, - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, - ARRIVE_AT_VPN_GATEWAY = 12, - ARRIVE_AT_VPN_TUNNEL = 13, - ARRIVE_AT_VPC_CONNECTOR = 24, - NAT = 14, - PROXY_CONNECTION = 15, - DELIVER = 16, - DROP = 17, - FORWARD = 18, - ABORT = 19, - VIEWER_PERMISSION_MISSING = 20 - } - } - - /** Properties of an InstanceInfo. */ - interface IInstanceInfo { - - /** InstanceInfo displayName */ - displayName?: (string|null); - - /** InstanceInfo uri */ - uri?: (string|null); - - /** InstanceInfo interface */ - "interface"?: (string|null); - - /** InstanceInfo networkUri */ - networkUri?: (string|null); - - /** InstanceInfo internalIp */ - internalIp?: (string|null); - - /** InstanceInfo externalIp */ - externalIp?: (string|null); - - /** InstanceInfo networkTags */ - networkTags?: (string[]|null); - - /** InstanceInfo serviceAccount */ - serviceAccount?: (string|null); - - /** InstanceInfo pscNetworkAttachmentUri */ - pscNetworkAttachmentUri?: (string|null); - } - - /** Represents an InstanceInfo. */ - class InstanceInfo implements IInstanceInfo { - - /** - * Constructs a new InstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IInstanceInfo); - - /** InstanceInfo displayName. */ - public displayName: string; - - /** InstanceInfo uri. */ - public uri: string; - - /** InstanceInfo interface. */ - public interface: string; - - /** InstanceInfo networkUri. */ - public networkUri: string; - - /** InstanceInfo internalIp. */ - public internalIp: string; - - /** InstanceInfo externalIp. */ - public externalIp: string; - - /** InstanceInfo networkTags. */ - public networkTags: string[]; - - /** InstanceInfo serviceAccount. */ - public serviceAccount: string; - - /** InstanceInfo pscNetworkAttachmentUri. */ - public pscNetworkAttachmentUri: string; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IInstanceInfo): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Verifies an InstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @param message InstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInfo. */ - interface INetworkInfo { - - /** NetworkInfo displayName */ - displayName?: (string|null); - - /** NetworkInfo uri */ - uri?: (string|null); - - /** NetworkInfo matchedSubnetUri */ - matchedSubnetUri?: (string|null); - - /** NetworkInfo matchedIpRange */ - matchedIpRange?: (string|null); - - /** NetworkInfo region */ - region?: (string|null); - } - - /** Represents a NetworkInfo. */ - class NetworkInfo implements INetworkInfo { - - /** - * Constructs a new NetworkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.INetworkInfo); - - /** NetworkInfo displayName. */ - public displayName: string; - - /** NetworkInfo uri. */ - public uri: string; - - /** NetworkInfo matchedSubnetUri. */ - public matchedSubnetUri: string; - - /** NetworkInfo matchedIpRange. */ - public matchedIpRange: string; - - /** NetworkInfo region. */ - public region: string; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.INetworkInfo): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Verifies a NetworkInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @param message NetworkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FirewallInfo. */ - interface IFirewallInfo { - - /** FirewallInfo displayName */ - displayName?: (string|null); - - /** FirewallInfo uri */ - uri?: (string|null); - - /** FirewallInfo direction */ - direction?: (string|null); - - /** FirewallInfo action */ - action?: (string|null); - - /** FirewallInfo priority */ - priority?: (number|null); - - /** FirewallInfo networkUri */ - networkUri?: (string|null); - - /** FirewallInfo targetTags */ - targetTags?: (string[]|null); - - /** FirewallInfo targetServiceAccounts */ - targetServiceAccounts?: (string[]|null); - - /** FirewallInfo policy */ - policy?: (string|null); - - /** FirewallInfo policyUri */ - policyUri?: (string|null); - - /** FirewallInfo firewallRuleType */ - firewallRuleType?: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null); - } - - /** Represents a FirewallInfo. */ - class FirewallInfo implements IFirewallInfo { - - /** - * Constructs a new FirewallInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IFirewallInfo); - - /** FirewallInfo displayName. */ - public displayName: string; - - /** FirewallInfo uri. */ - public uri: string; - - /** FirewallInfo direction. */ - public direction: string; - - /** FirewallInfo action. */ - public action: string; - - /** FirewallInfo priority. */ - public priority: number; - - /** FirewallInfo networkUri. */ - public networkUri: string; - - /** FirewallInfo targetTags. */ - public targetTags: string[]; - - /** FirewallInfo targetServiceAccounts. */ - public targetServiceAccounts: string[]; - - /** FirewallInfo policy. */ - public policy: string; - - /** FirewallInfo policyUri. */ - public policyUri: string; - - /** FirewallInfo firewallRuleType. */ - public firewallRuleType: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType); - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FirewallInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IFirewallInfo): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Verifies a FirewallInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FirewallInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @param message FirewallInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FirewallInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FirewallInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FirewallInfo { - - /** FirewallRuleType enum. */ - enum FirewallRuleType { - FIREWALL_RULE_TYPE_UNSPECIFIED = 0, - HIERARCHICAL_FIREWALL_POLICY_RULE = 1, - VPC_FIREWALL_RULE = 2, - IMPLIED_VPC_FIREWALL_RULE = 3, - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, - NETWORK_FIREWALL_POLICY_RULE = 5, - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, - UNSUPPORTED_FIREWALL_POLICY_RULE = 100, - TRACKING_STATE = 101 - } - } - - /** Properties of a RouteInfo. */ - interface IRouteInfo { - - /** RouteInfo routeType */ - routeType?: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType|null); - - /** RouteInfo nextHopType */ - nextHopType?: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null); - - /** RouteInfo routeScope */ - routeScope?: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null); - - /** RouteInfo displayName */ - displayName?: (string|null); - - /** RouteInfo uri */ - uri?: (string|null); - - /** RouteInfo region */ - region?: (string|null); - - /** RouteInfo destIpRange */ - destIpRange?: (string|null); - - /** RouteInfo nextHop */ - nextHop?: (string|null); - - /** RouteInfo networkUri */ - networkUri?: (string|null); - - /** RouteInfo priority */ - priority?: (number|null); - - /** RouteInfo instanceTags */ - instanceTags?: (string[]|null); - - /** RouteInfo srcIpRange */ - srcIpRange?: (string|null); - - /** RouteInfo destPortRanges */ - destPortRanges?: (string[]|null); - - /** RouteInfo srcPortRanges */ - srcPortRanges?: (string[]|null); - - /** RouteInfo protocols */ - protocols?: (string[]|null); - - /** RouteInfo nccHubUri */ - nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri */ - nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri */ - advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri */ - advertisedRouteNextHopUri?: (string|null); - } - - /** Represents a RouteInfo. */ - class RouteInfo implements IRouteInfo { - - /** - * Constructs a new RouteInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRouteInfo); - - /** RouteInfo routeType. */ - public routeType: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType); - - /** RouteInfo nextHopType. */ - public nextHopType: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType); - - /** RouteInfo routeScope. */ - public routeScope: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope); - - /** RouteInfo displayName. */ - public displayName: string; - - /** RouteInfo uri. */ - public uri: string; - - /** RouteInfo region. */ - public region: string; - - /** RouteInfo destIpRange. */ - public destIpRange: string; - - /** RouteInfo nextHop. */ - public nextHop: string; - - /** RouteInfo networkUri. */ - public networkUri: string; - - /** RouteInfo priority. */ - public priority: number; - - /** RouteInfo instanceTags. */ - public instanceTags: string[]; - - /** RouteInfo srcIpRange. */ - public srcIpRange: string; - - /** RouteInfo destPortRanges. */ - public destPortRanges: string[]; - - /** RouteInfo srcPortRanges. */ - public srcPortRanges: string[]; - - /** RouteInfo protocols. */ - public protocols: string[]; - - /** RouteInfo nccHubUri. */ - public nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri. */ - public nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri. */ - public advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri. */ - public advertisedRouteNextHopUri?: (string|null); - - /** RouteInfo _nccHubUri. */ - public _nccHubUri?: "nccHubUri"; - - /** RouteInfo _nccSpokeUri. */ - public _nccSpokeUri?: "nccSpokeUri"; - - /** RouteInfo _advertisedRouteSourceRouterUri. */ - public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; - - /** RouteInfo _advertisedRouteNextHopUri. */ - public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; - - /** - * Creates a new RouteInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RouteInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRouteInfo): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Verifies a RouteInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RouteInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @param message RouteInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RouteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RouteInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RouteInfo { - - /** RouteType enum. */ - enum RouteType { - ROUTE_TYPE_UNSPECIFIED = 0, - SUBNET = 1, - STATIC = 2, - DYNAMIC = 3, - PEERING_SUBNET = 4, - PEERING_STATIC = 5, - PEERING_DYNAMIC = 6, - POLICY_BASED = 7, - ADVERTISED = 101 - } - - /** NextHopType enum. */ - enum NextHopType { - NEXT_HOP_TYPE_UNSPECIFIED = 0, - NEXT_HOP_IP = 1, - NEXT_HOP_INSTANCE = 2, - NEXT_HOP_NETWORK = 3, - NEXT_HOP_PEERING = 4, - NEXT_HOP_INTERCONNECT = 5, - NEXT_HOP_VPN_TUNNEL = 6, - NEXT_HOP_VPN_GATEWAY = 7, - NEXT_HOP_INTERNET_GATEWAY = 8, - NEXT_HOP_BLACKHOLE = 9, - NEXT_HOP_ILB = 10, - NEXT_HOP_ROUTER_APPLIANCE = 11, - NEXT_HOP_NCC_HUB = 12 - } - - /** RouteScope enum. */ - enum RouteScope { - ROUTE_SCOPE_UNSPECIFIED = 0, - NETWORK = 1, - NCC_HUB = 2 - } - } - - /** Properties of a GoogleServiceInfo. */ - interface IGoogleServiceInfo { - - /** GoogleServiceInfo sourceIp */ - sourceIp?: (string|null); - - /** GoogleServiceInfo googleServiceType */ - googleServiceType?: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null); - } - - /** Represents a GoogleServiceInfo. */ - class GoogleServiceInfo implements IGoogleServiceInfo { - - /** - * Constructs a new GoogleServiceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo); - - /** GoogleServiceInfo sourceIp. */ - public sourceIp: string; - - /** GoogleServiceInfo googleServiceType. */ - public googleServiceType: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType); - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleServiceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Verifies a GoogleServiceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleServiceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @param message GoogleServiceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoogleServiceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GoogleServiceInfo { - - /** GoogleServiceType enum. */ - enum GoogleServiceType { - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, - IAP = 1, - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, - CLOUD_DNS = 3, - GOOGLE_API = 4, - GOOGLE_API_PSC = 5, - GOOGLE_API_VPC_SC = 6 - } - } - - /** Properties of a ForwardingRuleInfo. */ - interface IForwardingRuleInfo { - - /** ForwardingRuleInfo displayName */ - displayName?: (string|null); - - /** ForwardingRuleInfo uri */ - uri?: (string|null); - - /** ForwardingRuleInfo matchedProtocol */ - matchedProtocol?: (string|null); - - /** ForwardingRuleInfo matchedPortRange */ - matchedPortRange?: (string|null); - - /** ForwardingRuleInfo vip */ - vip?: (string|null); - - /** ForwardingRuleInfo target */ - target?: (string|null); - - /** ForwardingRuleInfo networkUri */ - networkUri?: (string|null); - - /** ForwardingRuleInfo region */ - region?: (string|null); - - /** ForwardingRuleInfo loadBalancerName */ - loadBalancerName?: (string|null); - - /** ForwardingRuleInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** ForwardingRuleInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a ForwardingRuleInfo. */ - class ForwardingRuleInfo implements IForwardingRuleInfo { - - /** - * Constructs a new ForwardingRuleInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo); - - /** ForwardingRuleInfo displayName. */ - public displayName: string; - - /** ForwardingRuleInfo uri. */ - public uri: string; - - /** ForwardingRuleInfo matchedProtocol. */ - public matchedProtocol: string; - - /** ForwardingRuleInfo matchedPortRange. */ - public matchedPortRange: string; - - /** ForwardingRuleInfo vip. */ - public vip: string; - - /** ForwardingRuleInfo target. */ - public target: string; - - /** ForwardingRuleInfo networkUri. */ - public networkUri: string; - - /** ForwardingRuleInfo region. */ - public region: string; - - /** ForwardingRuleInfo loadBalancerName. */ - public loadBalancerName: string; - - /** ForwardingRuleInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** ForwardingRuleInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardingRuleInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Verifies a ForwardingRuleInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardingRuleInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @param message ForwardingRuleInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerInfo. */ - interface ILoadBalancerInfo { - - /** LoadBalancerInfo loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null); - - /** LoadBalancerInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerInfo backends */ - backends?: (google.cloud.networkmanagement.v1.ILoadBalancerBackend[]|null); - - /** LoadBalancerInfo backendType */ - backendType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null); - - /** LoadBalancerInfo backendUri */ - backendUri?: (string|null); - } - - /** Represents a LoadBalancerInfo. */ - class LoadBalancerInfo implements ILoadBalancerInfo { - - /** - * Constructs a new LoadBalancerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo); - - /** LoadBalancerInfo loadBalancerType. */ - public loadBalancerType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType); - - /** LoadBalancerInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerInfo backends. */ - public backends: google.cloud.networkmanagement.v1.ILoadBalancerBackend[]; - - /** LoadBalancerInfo backendType. */ - public backendType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType); - - /** LoadBalancerInfo backendUri. */ - public backendUri: string; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Verifies a LoadBalancerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @param message LoadBalancerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerInfo { - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - INTERNAL_TCP_UDP = 1, - NETWORK_TCP_UDP = 2, - HTTP_PROXY = 3, - TCP_PROXY = 4, - SSL_PROXY = 5 - } - - /** BackendType enum. */ - enum BackendType { - BACKEND_TYPE_UNSPECIFIED = 0, - BACKEND_SERVICE = 1, - TARGET_POOL = 2, - TARGET_INSTANCE = 3 - } - } - - /** Properties of a LoadBalancerBackend. */ - interface ILoadBalancerBackend { - - /** LoadBalancerBackend displayName */ - displayName?: (string|null); - - /** LoadBalancerBackend uri */ - uri?: (string|null); - - /** LoadBalancerBackend healthCheckFirewallState */ - healthCheckFirewallState?: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules */ - healthCheckAllowingFirewallRules?: (string[]|null); - - /** LoadBalancerBackend healthCheckBlockingFirewallRules */ - healthCheckBlockingFirewallRules?: (string[]|null); - } - - /** Represents a LoadBalancerBackend. */ - class LoadBalancerBackend implements ILoadBalancerBackend { - - /** - * Constructs a new LoadBalancerBackend. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend); - - /** LoadBalancerBackend displayName. */ - public displayName: string; - - /** LoadBalancerBackend uri. */ - public uri: string; - - /** LoadBalancerBackend healthCheckFirewallState. */ - public healthCheckFirewallState: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ - public healthCheckAllowingFirewallRules: string[]; - - /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ - public healthCheckBlockingFirewallRules: string[]; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackend instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Verifies a LoadBalancerBackend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackend - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @param message LoadBalancerBackend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackend - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackend { - - /** HealthCheckFirewallState enum. */ - enum HealthCheckFirewallState { - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, - CONFIGURED = 1, - MISCONFIGURED = 2 - } - } - - /** Properties of a VpnGatewayInfo. */ - interface IVpnGatewayInfo { - - /** VpnGatewayInfo displayName */ - displayName?: (string|null); - - /** VpnGatewayInfo uri */ - uri?: (string|null); - - /** VpnGatewayInfo networkUri */ - networkUri?: (string|null); - - /** VpnGatewayInfo ipAddress */ - ipAddress?: (string|null); - - /** VpnGatewayInfo vpnTunnelUri */ - vpnTunnelUri?: (string|null); - - /** VpnGatewayInfo region */ - region?: (string|null); - } - - /** Represents a VpnGatewayInfo. */ - class VpnGatewayInfo implements IVpnGatewayInfo { - - /** - * Constructs a new VpnGatewayInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo); - - /** VpnGatewayInfo displayName. */ - public displayName: string; - - /** VpnGatewayInfo uri. */ - public uri: string; - - /** VpnGatewayInfo networkUri. */ - public networkUri: string; - - /** VpnGatewayInfo ipAddress. */ - public ipAddress: string; - - /** VpnGatewayInfo vpnTunnelUri. */ - public vpnTunnelUri: string; - - /** VpnGatewayInfo region. */ - public region: string; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnGatewayInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Verifies a VpnGatewayInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnGatewayInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @param message VpnGatewayInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnGatewayInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpnTunnelInfo. */ - interface IVpnTunnelInfo { - - /** VpnTunnelInfo displayName */ - displayName?: (string|null); - - /** VpnTunnelInfo uri */ - uri?: (string|null); - - /** VpnTunnelInfo sourceGateway */ - sourceGateway?: (string|null); - - /** VpnTunnelInfo remoteGateway */ - remoteGateway?: (string|null); - - /** VpnTunnelInfo remoteGatewayIp */ - remoteGatewayIp?: (string|null); - - /** VpnTunnelInfo sourceGatewayIp */ - sourceGatewayIp?: (string|null); - - /** VpnTunnelInfo networkUri */ - networkUri?: (string|null); - - /** VpnTunnelInfo region */ - region?: (string|null); - - /** VpnTunnelInfo routingType */ - routingType?: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null); - } - - /** Represents a VpnTunnelInfo. */ - class VpnTunnelInfo implements IVpnTunnelInfo { - - /** - * Constructs a new VpnTunnelInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo); - - /** VpnTunnelInfo displayName. */ - public displayName: string; - - /** VpnTunnelInfo uri. */ - public uri: string; - - /** VpnTunnelInfo sourceGateway. */ - public sourceGateway: string; - - /** VpnTunnelInfo remoteGateway. */ - public remoteGateway: string; - - /** VpnTunnelInfo remoteGatewayIp. */ - public remoteGatewayIp: string; - - /** VpnTunnelInfo sourceGatewayIp. */ - public sourceGatewayIp: string; - - /** VpnTunnelInfo networkUri. */ - public networkUri: string; - - /** VpnTunnelInfo region. */ - public region: string; - - /** VpnTunnelInfo routingType. */ - public routingType: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType); - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnTunnelInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Verifies a VpnTunnelInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnTunnelInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @param message VpnTunnelInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnTunnelInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VpnTunnelInfo { - - /** RoutingType enum. */ - enum RoutingType { - ROUTING_TYPE_UNSPECIFIED = 0, - ROUTE_BASED = 1, - POLICY_BASED = 2, - DYNAMIC = 3 - } - } - - /** Properties of an EndpointInfo. */ - interface IEndpointInfo { - - /** EndpointInfo sourceIp */ - sourceIp?: (string|null); - - /** EndpointInfo destinationIp */ - destinationIp?: (string|null); - - /** EndpointInfo protocol */ - protocol?: (string|null); - - /** EndpointInfo sourcePort */ - sourcePort?: (number|null); - - /** EndpointInfo destinationPort */ - destinationPort?: (number|null); - - /** EndpointInfo sourceNetworkUri */ - sourceNetworkUri?: (string|null); - - /** EndpointInfo destinationNetworkUri */ - destinationNetworkUri?: (string|null); - - /** EndpointInfo sourceAgentUri */ - sourceAgentUri?: (string|null); - } - - /** Represents an EndpointInfo. */ - class EndpointInfo implements IEndpointInfo { - - /** - * Constructs a new EndpointInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IEndpointInfo); - - /** EndpointInfo sourceIp. */ - public sourceIp: string; - - /** EndpointInfo destinationIp. */ - public destinationIp: string; - - /** EndpointInfo protocol. */ - public protocol: string; - - /** EndpointInfo sourcePort. */ - public sourcePort: number; - - /** EndpointInfo destinationPort. */ - public destinationPort: number; - - /** EndpointInfo sourceNetworkUri. */ - public sourceNetworkUri: string; - - /** EndpointInfo destinationNetworkUri. */ - public destinationNetworkUri: string; - - /** EndpointInfo sourceAgentUri. */ - public sourceAgentUri: string; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IEndpointInfo): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Verifies an EndpointInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @param message EndpointInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeliverInfo. */ - interface IDeliverInfo { - - /** DeliverInfo target */ - target?: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target|null); - - /** DeliverInfo resourceUri */ - resourceUri?: (string|null); - - /** DeliverInfo ipAddress */ - ipAddress?: (string|null); - - /** DeliverInfo storageBucket */ - storageBucket?: (string|null); - - /** DeliverInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a DeliverInfo. */ - class DeliverInfo implements IDeliverInfo { - - /** - * Constructs a new DeliverInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IDeliverInfo); - - /** DeliverInfo target. */ - public target: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target); - - /** DeliverInfo resourceUri. */ - public resourceUri: string; - - /** DeliverInfo ipAddress. */ - public ipAddress: string; - - /** DeliverInfo storageBucket. */ - public storageBucket: string; - - /** DeliverInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DeliverInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IDeliverInfo): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Verifies a DeliverInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeliverInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @param message DeliverInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeliverInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeliverInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeliverInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - INTERNET = 2, - GOOGLE_API = 3, - GKE_MASTER = 4, - CLOUD_SQL_INSTANCE = 5, - PSC_PUBLISHED_SERVICE = 6, - PSC_GOOGLE_API = 7, - PSC_VPC_SC = 8, - SERVERLESS_NEG = 9, - STORAGE_BUCKET = 10, - PRIVATE_NETWORK = 11, - CLOUD_FUNCTION = 12, - APP_ENGINE_VERSION = 13, - CLOUD_RUN_REVISION = 14, - GOOGLE_MANAGED_SERVICE = 15, - REDIS_INSTANCE = 16, - REDIS_CLUSTER = 17 - } - } - - /** Properties of a ForwardInfo. */ - interface IForwardInfo { - - /** ForwardInfo target */ - target?: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target|null); - - /** ForwardInfo resourceUri */ - resourceUri?: (string|null); - - /** ForwardInfo ipAddress */ - ipAddress?: (string|null); - } - - /** Represents a ForwardInfo. */ - class ForwardInfo implements IForwardInfo { - - /** - * Constructs a new ForwardInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IForwardInfo); - - /** ForwardInfo target. */ - public target: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target); - - /** ForwardInfo resourceUri. */ - public resourceUri: string; - - /** ForwardInfo ipAddress. */ - public ipAddress: string; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IForwardInfo): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Verifies a ForwardInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @param message ForwardInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ForwardInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - PEERING_VPC = 1, - VPN_GATEWAY = 2, - INTERCONNECT = 3, - GKE_MASTER = 4, - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, - CLOUD_SQL_INSTANCE = 6, - ANOTHER_PROJECT = 7, - NCC_HUB = 8, - ROUTER_APPLIANCE = 9 - } - } - - /** Properties of an AbortInfo. */ - interface IAbortInfo { - - /** AbortInfo cause */ - cause?: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause|null); - - /** AbortInfo resourceUri */ - resourceUri?: (string|null); - - /** AbortInfo ipAddress */ - ipAddress?: (string|null); - - /** AbortInfo projectsMissingPermission */ - projectsMissingPermission?: (string[]|null); - } - - /** Represents an AbortInfo. */ - class AbortInfo implements IAbortInfo { - - /** - * Constructs a new AbortInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IAbortInfo); - - /** AbortInfo cause. */ - public cause: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause); - - /** AbortInfo resourceUri. */ - public resourceUri: string; - - /** AbortInfo ipAddress. */ - public ipAddress: string; - - /** AbortInfo projectsMissingPermission. */ - public projectsMissingPermission: string[]; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AbortInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IAbortInfo): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Verifies an AbortInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AbortInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @param message AbortInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AbortInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AbortInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AbortInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_NETWORK = 1, - UNKNOWN_PROJECT = 3, - NO_EXTERNAL_IP = 7, - UNINTENDED_DESTINATION = 8, - SOURCE_ENDPOINT_NOT_FOUND = 11, - MISMATCHED_SOURCE_NETWORK = 12, - DESTINATION_ENDPOINT_NOT_FOUND = 13, - MISMATCHED_DESTINATION_NETWORK = 14, - UNKNOWN_IP = 2, - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, - PERMISSION_DENIED = 4, - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, - NO_SOURCE_LOCATION = 5, - INVALID_ARGUMENT = 6, - TRACE_TOO_LONG = 9, - INTERNAL_ERROR = 10, - UNSUPPORTED = 15, - MISMATCHED_IP_VERSION = 16, - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, - RESOURCE_CONFIG_NOT_FOUND = 18, - VM_INSTANCE_CONFIG_NOT_FOUND = 24, - NETWORK_CONFIG_NOT_FOUND = 25, - FIREWALL_CONFIG_NOT_FOUND = 26, - ROUTE_CONFIG_NOT_FOUND = 27, - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, - NON_ROUTABLE_IP_ADDRESS = 22, - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 - } - } - - /** Properties of a DropInfo. */ - interface IDropInfo { - - /** DropInfo cause */ - cause?: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause|null); - - /** DropInfo resourceUri */ - resourceUri?: (string|null); - - /** DropInfo sourceIp */ - sourceIp?: (string|null); - - /** DropInfo destinationIp */ - destinationIp?: (string|null); - - /** DropInfo region */ - region?: (string|null); - } - - /** Represents a DropInfo. */ - class DropInfo implements IDropInfo { - - /** - * Constructs a new DropInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IDropInfo); - - /** DropInfo cause. */ - public cause: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause); - - /** DropInfo resourceUri. */ - public resourceUri: string; - - /** DropInfo sourceIp. */ - public sourceIp: string; - - /** DropInfo destinationIp. */ - public destinationIp: string; - - /** DropInfo region. */ - public region: string; - - /** - * Creates a new DropInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DropInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IDropInfo): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Verifies a DropInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DropInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @param message DropInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DropInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DropInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DropInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_EXTERNAL_ADDRESS = 1, - FOREIGN_IP_DISALLOWED = 2, - FIREWALL_RULE = 3, - NO_ROUTE = 4, - ROUTE_BLACKHOLE = 5, - ROUTE_WRONG_NETWORK = 6, - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, - PRIVATE_TRAFFIC_TO_INTERNET = 7, - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, - NO_EXTERNAL_ADDRESS = 9, - UNKNOWN_INTERNAL_ADDRESS = 10, - FORWARDING_RULE_MISMATCH = 11, - FORWARDING_RULE_NO_INSTANCES = 12, - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, - INSTANCE_NOT_RUNNING = 14, - GKE_CLUSTER_NOT_RUNNING = 27, - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, - REDIS_INSTANCE_NOT_RUNNING = 68, - REDIS_CLUSTER_NOT_RUNNING = 69, - TRAFFIC_TYPE_BLOCKED = 15, - GKE_MASTER_UNAUTHORIZED_ACCESS = 16, - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, - DROPPED_INSIDE_GKE_SERVICE = 18, - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, - GKE_PSC_ENDPOINT_MISSING = 36, - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, - GKE_CONTROL_PLANE_REGION_MISMATCH = 30, - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, - GKE_CONTROL_PLANE_NO_ROUTE = 32, - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, - CLOUD_SQL_INSTANCE_NO_ROUTE = 35, - CLOUD_SQL_CONNECTOR_REQUIRED = 63, - CLOUD_FUNCTION_NOT_ACTIVE = 22, - VPC_CONNECTOR_NOT_SET = 23, - VPC_CONNECTOR_NOT_RUNNING = 24, - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, - FORWARDING_RULE_REGION_MISMATCH = 25, - PSC_CONNECTION_NOT_ACCEPTED = 26, - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, - PSC_TRANSITIVITY_NOT_PROPAGATED = 64, - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, - CLOUD_RUN_REVISION_NOT_READY = 29, - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, - CLOUD_NAT_NO_ADDRESSES = 40, - ROUTING_LOOP = 59, - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, - REDIS_INSTANCE_UNSUPPORTED_PORT = 71, - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, - REDIS_INSTANCE_NO_EXTERNAL_IP = 74, - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, - REDIS_CLUSTER_UNSUPPORTED_PORT = 76, - REDIS_CLUSTER_NO_EXTERNAL_IP = 77, - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82 - } - } - - /** Properties of a GKEMasterInfo. */ - interface IGKEMasterInfo { - - /** GKEMasterInfo clusterUri */ - clusterUri?: (string|null); - - /** GKEMasterInfo clusterNetworkUri */ - clusterNetworkUri?: (string|null); - - /** GKEMasterInfo internalIp */ - internalIp?: (string|null); - - /** GKEMasterInfo externalIp */ - externalIp?: (string|null); - } - - /** Represents a GKEMasterInfo. */ - class GKEMasterInfo implements IGKEMasterInfo { - - /** - * Constructs a new GKEMasterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo); - - /** GKEMasterInfo clusterUri. */ - public clusterUri: string; - - /** GKEMasterInfo clusterNetworkUri. */ - public clusterNetworkUri: string; - - /** GKEMasterInfo internalIp. */ - public internalIp: string; - - /** GKEMasterInfo externalIp. */ - public externalIp: string; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GKEMasterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Verifies a GKEMasterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GKEMasterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @param message GKEMasterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GKEMasterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GKEMasterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudSQLInstanceInfo. */ - interface ICloudSQLInstanceInfo { - - /** CloudSQLInstanceInfo displayName */ - displayName?: (string|null); - - /** CloudSQLInstanceInfo uri */ - uri?: (string|null); - - /** CloudSQLInstanceInfo networkUri */ - networkUri?: (string|null); - - /** CloudSQLInstanceInfo internalIp */ - internalIp?: (string|null); - - /** CloudSQLInstanceInfo externalIp */ - externalIp?: (string|null); - - /** CloudSQLInstanceInfo region */ - region?: (string|null); - } - - /** Represents a CloudSQLInstanceInfo. */ - class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { - - /** - * Constructs a new CloudSQLInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo); - - /** CloudSQLInstanceInfo displayName. */ - public displayName: string; - - /** CloudSQLInstanceInfo uri. */ - public uri: string; - - /** CloudSQLInstanceInfo networkUri. */ - public networkUri: string; - - /** CloudSQLInstanceInfo internalIp. */ - public internalIp: string; - - /** CloudSQLInstanceInfo externalIp. */ - public externalIp: string; - - /** CloudSQLInstanceInfo region. */ - public region: string; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudSQLInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudSQLInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @param message CloudSQLInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisInstanceInfo. */ - interface IRedisInstanceInfo { - - /** RedisInstanceInfo displayName */ - displayName?: (string|null); - - /** RedisInstanceInfo uri */ - uri?: (string|null); - - /** RedisInstanceInfo networkUri */ - networkUri?: (string|null); - - /** RedisInstanceInfo primaryEndpointIp */ - primaryEndpointIp?: (string|null); - - /** RedisInstanceInfo readEndpointIp */ - readEndpointIp?: (string|null); - - /** RedisInstanceInfo region */ - region?: (string|null); - } - - /** Represents a RedisInstanceInfo. */ - class RedisInstanceInfo implements IRedisInstanceInfo { - - /** - * Constructs a new RedisInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo); - - /** RedisInstanceInfo displayName. */ - public displayName: string; - - /** RedisInstanceInfo uri. */ - public uri: string; - - /** RedisInstanceInfo networkUri. */ - public networkUri: string; - - /** RedisInstanceInfo primaryEndpointIp. */ - public primaryEndpointIp: string; - - /** RedisInstanceInfo readEndpointIp. */ - public readEndpointIp: string; - - /** RedisInstanceInfo region. */ - public region: string; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Verifies a RedisInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @param message RedisInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisClusterInfo. */ - interface IRedisClusterInfo { - - /** RedisClusterInfo displayName */ - displayName?: (string|null); - - /** RedisClusterInfo uri */ - uri?: (string|null); - - /** RedisClusterInfo networkUri */ - networkUri?: (string|null); - - /** RedisClusterInfo discoveryEndpointIpAddress */ - discoveryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo secondaryEndpointIpAddress */ - secondaryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo location */ - location?: (string|null); - } - - /** Represents a RedisClusterInfo. */ - class RedisClusterInfo implements IRedisClusterInfo { - - /** - * Constructs a new RedisClusterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo); - - /** RedisClusterInfo displayName. */ - public displayName: string; - - /** RedisClusterInfo uri. */ - public uri: string; - - /** RedisClusterInfo networkUri. */ - public networkUri: string; - - /** RedisClusterInfo discoveryEndpointIpAddress. */ - public discoveryEndpointIpAddress: string; - - /** RedisClusterInfo secondaryEndpointIpAddress. */ - public secondaryEndpointIpAddress: string; - - /** RedisClusterInfo location. */ - public location: string; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisClusterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Verifies a RedisClusterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisClusterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @param message RedisClusterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisClusterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisClusterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudFunctionInfo. */ - interface ICloudFunctionInfo { - - /** CloudFunctionInfo displayName */ - displayName?: (string|null); - - /** CloudFunctionInfo uri */ - uri?: (string|null); - - /** CloudFunctionInfo location */ - location?: (string|null); - - /** CloudFunctionInfo versionId */ - versionId?: (number|Long|string|null); - } - - /** Represents a CloudFunctionInfo. */ - class CloudFunctionInfo implements ICloudFunctionInfo { - - /** - * Constructs a new CloudFunctionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo); - - /** CloudFunctionInfo displayName. */ - public displayName: string; - - /** CloudFunctionInfo uri. */ - public uri: string; - - /** CloudFunctionInfo location. */ - public location: string; - - /** CloudFunctionInfo versionId. */ - public versionId: (number|Long|string); - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Verifies a CloudFunctionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @param message CloudFunctionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionInfo. */ - interface ICloudRunRevisionInfo { - - /** CloudRunRevisionInfo displayName */ - displayName?: (string|null); - - /** CloudRunRevisionInfo uri */ - uri?: (string|null); - - /** CloudRunRevisionInfo location */ - location?: (string|null); - - /** CloudRunRevisionInfo serviceUri */ - serviceUri?: (string|null); - } - - /** Represents a CloudRunRevisionInfo. */ - class CloudRunRevisionInfo implements ICloudRunRevisionInfo { - - /** - * Constructs a new CloudRunRevisionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo); - - /** CloudRunRevisionInfo displayName. */ - public displayName: string; - - /** CloudRunRevisionInfo uri. */ - public uri: string; - - /** CloudRunRevisionInfo location. */ - public location: string; - - /** CloudRunRevisionInfo serviceUri. */ - public serviceUri: string; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Verifies a CloudRunRevisionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @param message CloudRunRevisionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionInfo. */ - interface IAppEngineVersionInfo { - - /** AppEngineVersionInfo displayName */ - displayName?: (string|null); - - /** AppEngineVersionInfo uri */ - uri?: (string|null); - - /** AppEngineVersionInfo runtime */ - runtime?: (string|null); - - /** AppEngineVersionInfo environment */ - environment?: (string|null); - } - - /** Represents an AppEngineVersionInfo. */ - class AppEngineVersionInfo implements IAppEngineVersionInfo { - - /** - * Constructs a new AppEngineVersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo); - - /** AppEngineVersionInfo displayName. */ - public displayName: string; - - /** AppEngineVersionInfo uri. */ - public uri: string; - - /** AppEngineVersionInfo runtime. */ - public runtime: string; - - /** AppEngineVersionInfo environment. */ - public environment: string; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Verifies an AppEngineVersionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @param message AppEngineVersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcConnectorInfo. */ - interface IVpcConnectorInfo { - - /** VpcConnectorInfo displayName */ - displayName?: (string|null); - - /** VpcConnectorInfo uri */ - uri?: (string|null); - - /** VpcConnectorInfo location */ - location?: (string|null); - } - - /** Represents a VpcConnectorInfo. */ - class VpcConnectorInfo implements IVpcConnectorInfo { - - /** - * Constructs a new VpcConnectorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo); - - /** VpcConnectorInfo displayName. */ - public displayName: string; - - /** VpcConnectorInfo uri. */ - public uri: string; - - /** VpcConnectorInfo location. */ - public location: string; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcConnectorInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Verifies a VpcConnectorInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcConnectorInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @param message VpcConnectorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcConnectorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NatInfo. */ - interface INatInfo { - - /** NatInfo type */ - type?: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type|null); - - /** NatInfo protocol */ - protocol?: (string|null); - - /** NatInfo networkUri */ - networkUri?: (string|null); - - /** NatInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** NatInfo newSourceIp */ - newSourceIp?: (string|null); - - /** NatInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** NatInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** NatInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** NatInfo newSourcePort */ - newSourcePort?: (number|null); - - /** NatInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** NatInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** NatInfo routerUri */ - routerUri?: (string|null); - - /** NatInfo natGatewayName */ - natGatewayName?: (string|null); - } - - /** Represents a NatInfo. */ - class NatInfo implements INatInfo { - - /** - * Constructs a new NatInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.INatInfo); - - /** NatInfo type. */ - public type: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type); - - /** NatInfo protocol. */ - public protocol: string; - - /** NatInfo networkUri. */ - public networkUri: string; - - /** NatInfo oldSourceIp. */ - public oldSourceIp: string; - - /** NatInfo newSourceIp. */ - public newSourceIp: string; - - /** NatInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** NatInfo newDestinationIp. */ - public newDestinationIp: string; - - /** NatInfo oldSourcePort. */ - public oldSourcePort: number; - - /** NatInfo newSourcePort. */ - public newSourcePort: number; - - /** NatInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** NatInfo newDestinationPort. */ - public newDestinationPort: number; - - /** NatInfo routerUri. */ - public routerUri: string; - - /** NatInfo natGatewayName. */ - public natGatewayName: string; - - /** - * Creates a new NatInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NatInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.INatInfo): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Verifies a NatInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NatInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @param message NatInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NatInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NatInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NatInfo { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INTERNAL_TO_EXTERNAL = 1, - EXTERNAL_TO_INTERNAL = 2, - CLOUD_NAT = 3, - PRIVATE_SERVICE_CONNECT = 4 - } - } - - /** Properties of a ProxyConnectionInfo. */ - interface IProxyConnectionInfo { - - /** ProxyConnectionInfo protocol */ - protocol?: (string|null); - - /** ProxyConnectionInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** ProxyConnectionInfo newSourceIp */ - newSourceIp?: (string|null); - - /** ProxyConnectionInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** ProxyConnectionInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** ProxyConnectionInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** ProxyConnectionInfo newSourcePort */ - newSourcePort?: (number|null); - - /** ProxyConnectionInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** ProxyConnectionInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** ProxyConnectionInfo subnetUri */ - subnetUri?: (string|null); - - /** ProxyConnectionInfo networkUri */ - networkUri?: (string|null); - } - - /** Represents a ProxyConnectionInfo. */ - class ProxyConnectionInfo implements IProxyConnectionInfo { - - /** - * Constructs a new ProxyConnectionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo); - - /** ProxyConnectionInfo protocol. */ - public protocol: string; - - /** ProxyConnectionInfo oldSourceIp. */ - public oldSourceIp: string; - - /** ProxyConnectionInfo newSourceIp. */ - public newSourceIp: string; - - /** ProxyConnectionInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** ProxyConnectionInfo newDestinationIp. */ - public newDestinationIp: string; - - /** ProxyConnectionInfo oldSourcePort. */ - public oldSourcePort: number; - - /** ProxyConnectionInfo newSourcePort. */ - public newSourcePort: number; - - /** ProxyConnectionInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** ProxyConnectionInfo newDestinationPort. */ - public newDestinationPort: number; - - /** ProxyConnectionInfo subnetUri. */ - public subnetUri: string; - - /** ProxyConnectionInfo networkUri. */ - public networkUri: string; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ProxyConnectionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Verifies a ProxyConnectionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProxyConnectionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @param message ProxyConnectionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerBackendInfo. */ - interface ILoadBalancerBackendInfo { - - /** LoadBalancerBackendInfo name */ - name?: (string|null); - - /** LoadBalancerBackendInfo instanceUri */ - instanceUri?: (string|null); - - /** LoadBalancerBackendInfo backendServiceUri */ - backendServiceUri?: (string|null); - - /** LoadBalancerBackendInfo instanceGroupUri */ - instanceGroupUri?: (string|null); - - /** LoadBalancerBackendInfo networkEndpointGroupUri */ - networkEndpointGroupUri?: (string|null); - - /** LoadBalancerBackendInfo backendBucketUri */ - backendBucketUri?: (string|null); - - /** LoadBalancerBackendInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** LoadBalancerBackendInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - - /** LoadBalancerBackendInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ - healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); - } - - /** Represents a LoadBalancerBackendInfo. */ - class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { - - /** - * Constructs a new LoadBalancerBackendInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo); - - /** LoadBalancerBackendInfo name. */ - public name: string; - - /** LoadBalancerBackendInfo instanceUri. */ - public instanceUri: string; - - /** LoadBalancerBackendInfo backendServiceUri. */ - public backendServiceUri: string; - - /** LoadBalancerBackendInfo instanceGroupUri. */ - public instanceGroupUri: string; - - /** LoadBalancerBackendInfo networkEndpointGroupUri. */ - public networkEndpointGroupUri: string; - - /** LoadBalancerBackendInfo backendBucketUri. */ - public backendBucketUri: string; - - /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** LoadBalancerBackendInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** LoadBalancerBackendInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ - public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackendInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackendInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @param message LoadBalancerBackendInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackendInfo { - - /** HealthCheckFirewallsConfigState enum. */ - enum HealthCheckFirewallsConfigState { - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, - FIREWALLS_CONFIGURED = 1, - FIREWALLS_PARTIALLY_CONFIGURED = 2, - FIREWALLS_NOT_CONFIGURED = 3, - FIREWALLS_UNSUPPORTED = 4 - } - } - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - HTTPS_ADVANCED_LOAD_BALANCER = 1, - HTTPS_LOAD_BALANCER = 2, - REGIONAL_HTTPS_LOAD_BALANCER = 3, - INTERNAL_HTTPS_LOAD_BALANCER = 4, - SSL_PROXY_LOAD_BALANCER = 5, - TCP_PROXY_LOAD_BALANCER = 6, - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, - NETWORK_LOAD_BALANCER = 8, - LEGACY_NETWORK_LOAD_BALANCER = 9, - TCP_UDP_INTERNAL_LOAD_BALANCER = 10 - } - - /** Properties of a StorageBucketInfo. */ - interface IStorageBucketInfo { - - /** StorageBucketInfo bucket */ - bucket?: (string|null); - } - - /** Represents a StorageBucketInfo. */ - class StorageBucketInfo implements IStorageBucketInfo { - - /** - * Constructs a new StorageBucketInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo); - - /** StorageBucketInfo bucket. */ - public bucket: string; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageBucketInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Verifies a StorageBucketInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageBucketInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @param message StorageBucketInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageBucketInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageBucketInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerlessNegInfo. */ - interface IServerlessNegInfo { - - /** ServerlessNegInfo negUri */ - negUri?: (string|null); - } - - /** Represents a ServerlessNegInfo. */ - class ServerlessNegInfo implements IServerlessNegInfo { - - /** - * Constructs a new ServerlessNegInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo); - - /** ServerlessNegInfo negUri. */ - public negUri: string; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerlessNegInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Verifies a ServerlessNegInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerlessNegInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @param message ServerlessNegInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerlessNegInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a ReachabilityService */ - class ReachabilityService extends $protobuf.rpc.Service { - - /** - * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback): void; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @returns Promise - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): Promise; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConnectivityTest - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback): void; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @returns Promise - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): Promise; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback): void; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @returns Promise - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): Promise; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback): void; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @returns Promise - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): Promise; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback): void; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @returns Promise - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): Promise; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback): void; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @returns Promise - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): Promise; - } - - namespace ReachabilityService { - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. - * @param error Error, if any - * @param [response] ListConnectivityTestsResponse - */ - type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. - * @param error Error, if any - * @param [response] ConnectivityTest - */ - type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ConnectivityTest) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a ListConnectivityTestsRequest. */ - interface IListConnectivityTestsRequest { - - /** ListConnectivityTestsRequest parent */ - parent?: (string|null); - - /** ListConnectivityTestsRequest pageSize */ - pageSize?: (number|null); - - /** ListConnectivityTestsRequest pageToken */ - pageToken?: (string|null); - - /** ListConnectivityTestsRequest filter */ - filter?: (string|null); - - /** ListConnectivityTestsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListConnectivityTestsRequest. */ - class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { - - /** - * Constructs a new ListConnectivityTestsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest); - - /** ListConnectivityTestsRequest parent. */ - public parent: string; - - /** ListConnectivityTestsRequest pageSize. */ - public pageSize: number; - - /** ListConnectivityTestsRequest pageToken. */ - public pageToken: string; - - /** ListConnectivityTestsRequest filter. */ - public filter: string; - - /** ListConnectivityTestsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @param message ListConnectivityTestsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectivityTestsResponse. */ - interface IListConnectivityTestsResponse { - - /** ListConnectivityTestsResponse resources */ - resources?: (google.cloud.networkmanagement.v1.IConnectivityTest[]|null); - - /** ListConnectivityTestsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListConnectivityTestsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListConnectivityTestsResponse. */ - class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { - - /** - * Constructs a new ListConnectivityTestsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse); - - /** ListConnectivityTestsResponse resources. */ - public resources: google.cloud.networkmanagement.v1.IConnectivityTest[]; - - /** ListConnectivityTestsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListConnectivityTestsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsResponse instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @param message ListConnectivityTestsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityTestRequest. */ - interface IGetConnectivityTestRequest { - - /** GetConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a GetConnectivityTestRequest. */ - class GetConnectivityTestRequest implements IGetConnectivityTestRequest { - - /** - * Constructs a new GetConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest); - - /** GetConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Verifies a GetConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @param message GetConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectivityTestRequest. */ - interface ICreateConnectivityTestRequest { - - /** CreateConnectivityTestRequest parent */ - parent?: (string|null); - - /** CreateConnectivityTestRequest testId */ - testId?: (string|null); - - /** CreateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - } - - /** Represents a CreateConnectivityTestRequest. */ - class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { - - /** - * Constructs a new CreateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest); - - /** CreateConnectivityTestRequest parent. */ - public parent: string; - - /** CreateConnectivityTestRequest testId. */ - public testId: string; - - /** CreateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message CreateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateConnectivityTestRequest. */ - interface IUpdateConnectivityTestRequest { - - /** UpdateConnectivityTestRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - } - - /** Represents an UpdateConnectivityTestRequest. */ - class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest); - - /** UpdateConnectivityTestRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message UpdateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectivityTestRequest. */ - interface IDeleteConnectivityTestRequest { - - /** DeleteConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a DeleteConnectivityTestRequest. */ - class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest); - - /** DeleteConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @param message DeleteConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RerunConnectivityTestRequest. */ - interface IRerunConnectivityTestRequest { - - /** RerunConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a RerunConnectivityTestRequest. */ - class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { - - /** - * Constructs a new RerunConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest); - - /** RerunConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RerunConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RerunConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @param message RerunConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RerunConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @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 statusDetail */ - statusDetail?: (string|null); - - /** OperationMetadata cancelRequested */ - cancelRequested?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.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 statusDetail. */ - public statusDetail: string; - - /** OperationMetadata cancelRequested. */ - public cancelRequested: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IOperationMetadata): google.cloud.networkmanagement.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a 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 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 - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of 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-networkmanagement/v1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js deleted file mode 100644 index 7d4e525beb0..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js +++ /dev/null @@ -1,40420 +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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.networkmanagement = (function() { - - /** - * Namespace networkmanagement. - * @memberof google.cloud - * @namespace - */ - var networkmanagement = {}; - - networkmanagement.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.networkmanagement - * @namespace - */ - var v1 = {}; - - v1.ConnectivityTest = (function() { - - /** - * Properties of a ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IConnectivityTest - * @property {string|null} [name] ConnectivityTest name - * @property {string|null} [description] ConnectivityTest description - * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [source] ConnectivityTest source - * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [destination] ConnectivityTest destination - * @property {string|null} [protocol] ConnectivityTest protocol - * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects - * @property {string|null} [displayName] ConnectivityTest displayName - * @property {Object.|null} [labels] ConnectivityTest labels - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime - * @property {google.cloud.networkmanagement.v1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails - * @property {google.cloud.networkmanagement.v1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails - * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks - */ - - /** - * Constructs a new ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ConnectivityTest. - * @implements IConnectivityTest - * @constructor - * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set - */ - function ConnectivityTest(properties) { - this.relatedProjects = []; - 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]]; - } - - /** - * ConnectivityTest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.name = ""; - - /** - * ConnectivityTest description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.description = ""; - - /** - * ConnectivityTest source. - * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} source - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.source = null; - - /** - * ConnectivityTest destination. - * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} destination - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.destination = null; - - /** - * ConnectivityTest protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.protocol = ""; - - /** - * ConnectivityTest relatedProjects. - * @member {Array.} relatedProjects - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.relatedProjects = $util.emptyArray; - - /** - * ConnectivityTest displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.displayName = ""; - - /** - * ConnectivityTest labels. - * @member {Object.} labels - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.labels = $util.emptyObject; - - /** - * ConnectivityTest createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.createTime = null; - - /** - * ConnectivityTest updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.updateTime = null; - - /** - * ConnectivityTest reachabilityDetails. - * @member {google.cloud.networkmanagement.v1.IReachabilityDetails|null|undefined} reachabilityDetails - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.reachabilityDetails = null; - - /** - * ConnectivityTest probingDetails. - * @member {google.cloud.networkmanagement.v1.IProbingDetails|null|undefined} probingDetails - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.probingDetails = null; - - /** - * ConnectivityTest bypassFirewallChecks. - * @member {boolean} bypassFirewallChecks - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.bypassFirewallChecks = false; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest instance - */ - ConnectivityTest.create = function create(properties) { - return new ConnectivityTest(properties); - }; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encode = function encode(message, writer) { - if (!writer) - 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.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); - if (message.relatedProjects != null && message.relatedProjects.length) - for (var i = 0; i < message.relatedProjects.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) - $root.google.cloud.networkmanagement.v1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) - $root.google.cloud.networkmanagement.v1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); - return writer; - }; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 5: { - message.protocol = reader.string(); - break; - } - case 6: { - if (!(message.relatedProjects && message.relatedProjects.length)) - message.relatedProjects = []; - message.relatedProjects.push(reader.string()); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 8: { - 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 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.decode(reader, reader.uint32()); - break; - } - case 14: { - message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.decode(reader, reader.uint32()); - break; - } - case 17: { - message.bypassFirewallChecks = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectivityTest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectivityTest.verify = function verify(message) { - if (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.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.source); - if (error) - return "source." + error; - } - if (message.destination != null && message.hasOwnProperty("destination")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.destination); - if (error) - return "destination." + error; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { - if (!Array.isArray(message.relatedProjects)) - return "relatedProjects: array expected"; - for (var i = 0; i < message.relatedProjects.length; ++i) - if (!$util.isString(message.relatedProjects[i])) - return "relatedProjects: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { - var error = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.verify(message.reachabilityDetails); - if (error) - return "reachabilityDetails." + error; - } - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { - var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.verify(message.probingDetails); - if (error) - return "probingDetails." + error; - } - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - if (typeof message.bypassFirewallChecks !== "boolean") - return "bypassFirewallChecks: boolean expected"; - return null; - }; - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest - */ - ConnectivityTest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ConnectivityTest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.source: object expected"); - message.source = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.source); - } - if (object.destination != null) { - if (typeof object.destination !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.destination: object expected"); - message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.destination); - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.relatedProjects) { - if (!Array.isArray(object.relatedProjects)) - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.relatedProjects: array expected"); - message.relatedProjects = []; - for (var i = 0; i < object.relatedProjects.length; ++i) - message.relatedProjects[i] = String(object.relatedProjects[i]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.reachabilityDetails != null) { - if (typeof object.reachabilityDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.reachabilityDetails: object expected"); - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.fromObject(object.reachabilityDetails); - } - if (object.probingDetails != null) { - if (typeof object.probingDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.probingDetails: object expected"); - message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.fromObject(object.probingDetails); - } - if (object.bypassFirewallChecks != null) - message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); - return message; - }; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} message ConnectivityTest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectivityTest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relatedProjects = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.source = null; - object.destination = null; - object.protocol = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - object.reachabilityDetails = null; - object.probingDetails = null; - object.bypassFirewallChecks = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.source, options); - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.destination, options); - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.relatedProjects && message.relatedProjects.length) { - object.relatedProjects = []; - for (var j = 0; j < message.relatedProjects.length; ++j) - object.relatedProjects[j] = message.relatedProjects[j]; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) - object.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.toObject(message.reachabilityDetails, options); - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) - object.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.toObject(message.probingDetails, options); - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - object.bypassFirewallChecks = message.bypassFirewallChecks; - return object; - }; - - /** - * Converts this ConnectivityTest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - * @returns {Object.} JSON object - */ - ConnectivityTest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectivityTest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ConnectivityTest"; - }; - - return ConnectivityTest; - })(); - - v1.Endpoint = (function() { - - /** - * Properties of an Endpoint. - * @memberof google.cloud.networkmanagement.v1 - * @interface IEndpoint - * @property {string|null} [ipAddress] Endpoint ipAddress - * @property {number|null} [port] Endpoint port - * @property {string|null} [instance] Endpoint instance - * @property {string|null} [forwardingRule] Endpoint forwardingRule - * @property {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget - * @property {string|null} [loadBalancerId] Endpoint loadBalancerId - * @property {google.cloud.networkmanagement.v1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType - * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster - * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance - * @property {string|null} [redisInstance] Endpoint redisInstance - * @property {string|null} [redisCluster] Endpoint redisCluster - * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction - * @property {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion - * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision - * @property {string|null} [network] Endpoint network - * @property {google.cloud.networkmanagement.v1.Endpoint.NetworkType|null} [networkType] Endpoint networkType - * @property {string|null} [projectId] Endpoint projectId - */ - - /** - * Constructs a new Endpoint. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an Endpoint. - * @implements IEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set - */ - function Endpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Endpoint ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.ipAddress = ""; - - /** - * Endpoint port. - * @member {number} port - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.port = 0; - - /** - * Endpoint instance. - * @member {string} instance - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.instance = ""; - - /** - * Endpoint forwardingRule. - * @member {string} forwardingRule - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRule = ""; - - /** - * Endpoint forwardingRuleTarget. - * @member {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRuleTarget = null; - - /** - * Endpoint loadBalancerId. - * @member {string|null|undefined} loadBalancerId - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerId = null; - - /** - * Endpoint loadBalancerType. - * @member {google.cloud.networkmanagement.v1.LoadBalancerType|null|undefined} loadBalancerType - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerType = null; - - /** - * Endpoint gkeMasterCluster. - * @member {string} gkeMasterCluster - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.gkeMasterCluster = ""; - - /** - * Endpoint cloudSqlInstance. - * @member {string} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.cloudSqlInstance = ""; - - /** - * Endpoint redisInstance. - * @member {string} redisInstance - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.redisInstance = ""; - - /** - * Endpoint redisCluster. - * @member {string} redisCluster - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.redisCluster = ""; - - /** - * Endpoint cloudFunction. - * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.cloudFunction = null; - - /** - * Endpoint appEngineVersion. - * @member {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.appEngineVersion = null; - - /** - * Endpoint cloudRunRevision. - * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.cloudRunRevision = null; - - /** - * Endpoint network. - * @member {string} network - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.network = ""; - - /** - * Endpoint networkType. - * @member {google.cloud.networkmanagement.v1.Endpoint.NetworkType} networkType - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.networkType = 0; - - /** - * Endpoint projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.projectId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Endpoint _forwardingRuleTarget. - * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { - get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerId. - * @member {"loadBalancerId"|undefined} _loadBalancerId - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerType. - * @member {"loadBalancerType"|undefined} _loadBalancerType - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Endpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint instance - */ - Endpoint.create = function create(properties) { - return new Endpoint(properties); - }; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); - if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); - if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); - if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); - if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); - return writer; - }; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipAddress = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.instance = reader.string(); - break; - } - case 13: { - message.forwardingRule = reader.string(); - break; - } - case 14: { - message.forwardingRuleTarget = reader.int32(); - break; - } - case 15: { - message.loadBalancerId = reader.string(); - break; - } - case 16: { - message.loadBalancerType = reader.int32(); - break; - } - case 7: { - message.gkeMasterCluster = reader.string(); - break; - } - case 8: { - message.cloudSqlInstance = reader.string(); - break; - } - case 17: { - message.redisInstance = reader.string(); - break; - } - case 18: { - message.redisCluster = reader.string(); - break; - } - case 10: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); - break; - } - case 11: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); - break; - } - case 12: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.network = reader.string(); - break; - } - case 5: { - message.networkType = reader.int32(); - break; - } - case 6: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Endpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Endpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.instance != null && message.hasOwnProperty("instance")) - if (!$util.isString(message.instance)) - return "instance: string expected"; - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - if (!$util.isString(message.forwardingRule)) - return "forwardingRule: string expected"; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - properties._forwardingRuleTarget = 1; - switch (message.forwardingRuleTarget) { - default: - return "forwardingRuleTarget: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - properties._loadBalancerId = 1; - if (!$util.isString(message.loadBalancerId)) - return "loadBalancerId: string expected"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - properties._loadBalancerType = 1; - switch (message.loadBalancerType) { - default: - return "loadBalancerType: 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: - break; - } - } - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - if (!$util.isString(message.gkeMasterCluster)) - return "gkeMasterCluster: string expected"; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - if (!$util.isString(message.cloudSqlInstance)) - return "cloudSqlInstance: string expected"; - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - if (!$util.isString(message.redisInstance)) - return "redisInstance: string expected"; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - if (!$util.isString(message.redisCluster)) - return "redisCluster: string expected"; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.networkType != null && message.hasOwnProperty("networkType")) - switch (message.networkType) { - default: - return "networkType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint - */ - Endpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint(); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.port != null) - message.port = object.port | 0; - if (object.instance != null) - message.instance = String(object.instance); - if (object.forwardingRule != null) - message.forwardingRule = String(object.forwardingRule); - switch (object.forwardingRuleTarget) { - default: - if (typeof object.forwardingRuleTarget === "number") { - message.forwardingRuleTarget = object.forwardingRuleTarget; - break; - } - break; - case "FORWARDING_RULE_TARGET_UNSPECIFIED": - case 0: - message.forwardingRuleTarget = 0; - break; - case "INSTANCE": - case 1: - message.forwardingRuleTarget = 1; - break; - case "LOAD_BALANCER": - case 2: - message.forwardingRuleTarget = 2; - break; - case "VPN_GATEWAY": - case 3: - message.forwardingRuleTarget = 3; - break; - case "PSC": - case 4: - message.forwardingRuleTarget = 4; - break; - } - if (object.loadBalancerId != null) - message.loadBalancerId = String(object.loadBalancerId); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "HTTPS_ADVANCED_LOAD_BALANCER": - case 1: - message.loadBalancerType = 1; - break; - case "HTTPS_LOAD_BALANCER": - case 2: - message.loadBalancerType = 2; - break; - case "REGIONAL_HTTPS_LOAD_BALANCER": - case 3: - message.loadBalancerType = 3; - break; - case "INTERNAL_HTTPS_LOAD_BALANCER": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY_LOAD_BALANCER": - case 5: - message.loadBalancerType = 5; - break; - case "TCP_PROXY_LOAD_BALANCER": - case 6: - message.loadBalancerType = 6; - break; - case "INTERNAL_TCP_PROXY_LOAD_BALANCER": - case 7: - message.loadBalancerType = 7; - break; - case "NETWORK_LOAD_BALANCER": - case 8: - message.loadBalancerType = 8; - break; - case "LEGACY_NETWORK_LOAD_BALANCER": - case 9: - message.loadBalancerType = 9; - break; - case "TCP_UDP_INTERNAL_LOAD_BALANCER": - case 10: - message.loadBalancerType = 10; - break; - } - if (object.gkeMasterCluster != null) - message.gkeMasterCluster = String(object.gkeMasterCluster); - if (object.cloudSqlInstance != null) - message.cloudSqlInstance = String(object.cloudSqlInstance); - if (object.redisInstance != null) - message.redisInstance = String(object.redisInstance); - if (object.redisCluster != null) - message.redisCluster = String(object.redisCluster); - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); - } - if (object.network != null) - message.network = String(object.network); - switch (object.networkType) { - default: - if (typeof object.networkType === "number") { - message.networkType = object.networkType; - break; - } - break; - case "NETWORK_TYPE_UNSPECIFIED": - case 0: - message.networkType = 0; - break; - case "GCP_NETWORK": - case 1: - message.networkType = 1; - break; - case "NON_GCP_NETWORK": - case 2: - message.networkType = 2; - break; - } - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint} message Endpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Endpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ipAddress = ""; - object.port = 0; - object.instance = ""; - object.network = ""; - object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; - object.projectId = ""; - object.gkeMasterCluster = ""; - object.cloudSqlInstance = ""; - object.cloudFunction = null; - object.appEngineVersion = null; - object.cloudRunRevision = null; - object.forwardingRule = ""; - object.redisInstance = ""; - object.redisCluster = ""; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = message.instance; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.networkType != null && message.hasOwnProperty("networkType")) - object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] : message.networkType; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - object.gkeMasterCluster = message.gkeMasterCluster; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - object.cloudSqlInstance = message.cloudSqlInstance; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) - object.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) - object.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - object.forwardingRule = message.forwardingRule; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; - if (options.oneofs) - object._forwardingRuleTarget = "forwardingRuleTarget"; - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - object.loadBalancerId = message.loadBalancerId; - if (options.oneofs) - object._loadBalancerId = "loadBalancerId"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (options.oneofs) - object._loadBalancerType = "loadBalancerType"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - object.redisInstance = message.redisInstance; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - object.redisCluster = message.redisCluster; - return object; - }; - - /** - * Converts this Endpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - * @returns {Object.} JSON object - */ - Endpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Endpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint"; - }; - - /** - * NetworkType enum. - * @name google.cloud.networkmanagement.v1.Endpoint.NetworkType - * @enum {number} - * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value - * @property {number} GCP_NETWORK=1 GCP_NETWORK value - * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value - */ - Endpoint.NetworkType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GCP_NETWORK"] = 1; - values[valuesById[2] = "NON_GCP_NETWORK"] = 2; - return values; - })(); - - /** - * ForwardingRuleTarget enum. - * @name google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget - * @enum {number} - * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value - * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value - * @property {number} PSC=4 PSC value - */ - Endpoint.ForwardingRuleTarget = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "LOAD_BALANCER"] = 2; - values[valuesById[3] = "VPN_GATEWAY"] = 3; - values[valuesById[4] = "PSC"] = 4; - return values; - })(); - - Endpoint.CloudFunctionEndpoint = (function() { - - /** - * Properties of a CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @interface ICloudFunctionEndpoint - * @property {string|null} [uri] CloudFunctionEndpoint uri - */ - - /** - * Constructs a new CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @classdesc Represents a CloudFunctionEndpoint. - * @implements ICloudFunctionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - */ - function CloudFunctionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @instance - */ - CloudFunctionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance - */ - CloudFunctionEndpoint.create = function create(properties) { - return new CloudFunctionEndpoint(properties); - }; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - */ - CloudFunctionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint"; - }; - - return CloudFunctionEndpoint; - })(); - - Endpoint.AppEngineVersionEndpoint = (function() { - - /** - * Properties of an AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @interface IAppEngineVersionEndpoint - * @property {string|null} [uri] AppEngineVersionEndpoint uri - */ - - /** - * Constructs a new AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @classdesc Represents an AppEngineVersionEndpoint. - * @implements IAppEngineVersionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - */ - function AppEngineVersionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @instance - */ - AppEngineVersionEndpoint.prototype.uri = ""; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance - */ - AppEngineVersionEndpoint.create = function create(properties) { - return new AppEngineVersionEndpoint(properties); - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - */ - AppEngineVersionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint"; - }; - - return AppEngineVersionEndpoint; - })(); - - Endpoint.CloudRunRevisionEndpoint = (function() { - - /** - * Properties of a CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @interface ICloudRunRevisionEndpoint - * @property {string|null} [uri] CloudRunRevisionEndpoint uri - */ - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @classdesc Represents a CloudRunRevisionEndpoint. - * @implements ICloudRunRevisionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - */ - function CloudRunRevisionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @instance - */ - CloudRunRevisionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance - */ - CloudRunRevisionEndpoint.create = function create(properties) { - return new CloudRunRevisionEndpoint(properties); - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - */ - CloudRunRevisionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint"; - }; - - return CloudRunRevisionEndpoint; - })(); - - return Endpoint; - })(); - - v1.ReachabilityDetails = (function() { - - /** - * Properties of a ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1 - * @interface IReachabilityDetails - * @property {google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error - * @property {Array.|null} [traces] ReachabilityDetails traces - */ - - /** - * Constructs a new ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ReachabilityDetails. - * @implements IReachabilityDetails - * @constructor - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set - */ - function ReachabilityDetails(properties) { - this.traces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReachabilityDetails result. - * @member {google.cloud.networkmanagement.v1.ReachabilityDetails.Result} result - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.result = 0; - - /** - * ReachabilityDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.verifyTime = null; - - /** - * ReachabilityDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.error = null; - - /** - * ReachabilityDetails traces. - * @member {Array.} traces - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.traces = $util.emptyArray; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails instance - */ - ReachabilityDetails.create = function create(properties) { - return new ReachabilityDetails(properties); - }; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.traces != null && message.traces.length) - for (var i = 0; i < message.traces.length; ++i) - $root.google.cloud.networkmanagement.v1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.traces && message.traces.length)) - message.traces = []; - message.traces.push($root.google.cloud.networkmanagement.v1.Trace.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReachabilityDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReachabilityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.traces != null && message.hasOwnProperty("traces")) { - if (!Array.isArray(message.traces)) - return "traces: array expected"; - for (var i = 0; i < message.traces.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.Trace.verify(message.traces[i]); - if (error) - return "traces." + error; - } - } - return null; - }; - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails - */ - ReachabilityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ReachabilityDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "AMBIGUOUS": - case 4: - message.result = 4; - break; - case "UNDETERMINED": - case 5: - message.result = 5; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.traces) { - if (!Array.isArray(object.traces)) - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: array expected"); - message.traces = []; - for (var i = 0; i < object.traces.length; ++i) { - if (typeof object.traces[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: object expected"); - message.traces[i] = $root.google.cloud.networkmanagement.v1.Trace.fromObject(object.traces[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.ReachabilityDetails} message ReachabilityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReachabilityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.traces = []; - if (options.defaults) { - object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.traces && message.traces.length) { - object.traces = []; - for (var j = 0; j < message.traces.length; ++j) - object.traces[j] = $root.google.cloud.networkmanagement.v1.Trace.toObject(message.traces[j], options); - } - return object; - }; - - /** - * Converts this ReachabilityDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - * @returns {Object.} JSON object - */ - ReachabilityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReachabilityDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ReachabilityDetails"; - }; - - /** - * Result enum. - * @name google.cloud.networkmanagement.v1.ReachabilityDetails.Result - * @enum {number} - * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} AMBIGUOUS=4 AMBIGUOUS value - * @property {number} UNDETERMINED=5 UNDETERMINED value - */ - ReachabilityDetails.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[4] = "AMBIGUOUS"] = 4; - values[valuesById[5] = "UNDETERMINED"] = 5; - return values; - })(); - - return ReachabilityDetails; - })(); - - v1.LatencyPercentile = (function() { - - /** - * Properties of a LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILatencyPercentile - * @property {number|null} [percent] LatencyPercentile percent - * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros - */ - - /** - * Constructs a new LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LatencyPercentile. - * @implements ILatencyPercentile - * @constructor - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set - */ - function LatencyPercentile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyPercentile percent. - * @member {number} percent - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.percent = 0; - - /** - * LatencyPercentile latencyMicros. - * @member {number|Long} latencyMicros - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile instance - */ - LatencyPercentile.create = function create(properties) { - return new LatencyPercentile(properties); - }; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); - if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); - return writer; - }; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.percent = reader.int32(); - break; - } - case 2: { - message.latencyMicros = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyPercentile message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyPercentile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.percent != null && message.hasOwnProperty("percent")) - if (!$util.isInteger(message.percent)) - return "percent: integer expected"; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) - return "latencyMicros: integer|Long expected"; - return null; - }; - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile - */ - LatencyPercentile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyPercentile) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); - if (object.percent != null) - message.percent = object.percent | 0; - if (object.latencyMicros != null) - if ($util.Long) - (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; - else if (typeof object.latencyMicros === "string") - message.latencyMicros = parseInt(object.latencyMicros, 10); - else if (typeof object.latencyMicros === "number") - message.latencyMicros = object.latencyMicros; - else if (typeof object.latencyMicros === "object") - message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.LatencyPercentile} message LatencyPercentile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyPercentile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.percent = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.latencyMicros = options.longs === String ? "0" : 0; - } - if (message.percent != null && message.hasOwnProperty("percent")) - object.percent = message.percent; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (typeof message.latencyMicros === "number") - object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; - else - object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; - return object; - }; - - /** - * Converts this LatencyPercentile to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @instance - * @returns {Object.} JSON object - */ - LatencyPercentile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyPercentile - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyPercentile"; - }; - - return LatencyPercentile; - })(); - - v1.LatencyDistribution = (function() { - - /** - * Properties of a LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILatencyDistribution - * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles - */ - - /** - * Constructs a new LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LatencyDistribution. - * @implements ILatencyDistribution - * @constructor - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set - */ - function LatencyDistribution(properties) { - this.latencyPercentiles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyDistribution latencyPercentiles. - * @member {Array.} latencyPercentiles - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @instance - */ - LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution instance - */ - LatencyDistribution.create = function create(properties) { - return new LatencyDistribution(properties); - }; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latencyPercentiles != null && message.latencyPercentiles.length) - for (var i = 0; i < message.latencyPercentiles.length; ++i) - $root.google.cloud.networkmanagement.v1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.latencyPercentiles && message.latencyPercentiles.length)) - message.latencyPercentiles = []; - message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1.LatencyPercentile.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyDistribution message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyDistribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { - if (!Array.isArray(message.latencyPercentiles)) - return "latencyPercentiles: array expected"; - for (var i = 0; i < message.latencyPercentiles.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.LatencyPercentile.verify(message.latencyPercentiles[i]); - if (error) - return "latencyPercentiles." + error; - } - } - return null; - }; - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution - */ - LatencyDistribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyDistribution) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); - if (object.latencyPercentiles) { - if (!Array.isArray(object.latencyPercentiles)) - throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: array expected"); - message.latencyPercentiles = []; - for (var i = 0; i < object.latencyPercentiles.length; ++i) { - if (typeof object.latencyPercentiles[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: object expected"); - message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.LatencyDistribution} message LatencyDistribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyDistribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.latencyPercentiles = []; - if (message.latencyPercentiles && message.latencyPercentiles.length) { - object.latencyPercentiles = []; - for (var j = 0; j < message.latencyPercentiles.length; ++j) - object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); - } - return object; - }; - - /** - * Converts this LatencyDistribution to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @instance - * @returns {Object.} JSON object - */ - LatencyDistribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyDistribution - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyDistribution"; - }; - - return LatencyDistribution; - })(); - - v1.ProbingDetails = (function() { - - /** - * Properties of a ProbingDetails. - * @memberof google.cloud.networkmanagement.v1 - * @interface IProbingDetails - * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ProbingDetails error - * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause - * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount - * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount - * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo - * @property {google.cloud.networkmanagement.v1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency - * @property {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation - */ - - /** - * Constructs a new ProbingDetails. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ProbingDetails. - * @implements IProbingDetails - * @constructor - * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set - */ - function ProbingDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProbingDetails result. - * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult} result - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.result = 0; - - /** - * ProbingDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.verifyTime = null; - - /** - * ProbingDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.error = null; - - /** - * ProbingDetails abortCause. - * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause} abortCause - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.abortCause = 0; - - /** - * ProbingDetails sentProbeCount. - * @member {number} sentProbeCount - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.sentProbeCount = 0; - - /** - * ProbingDetails successfulProbeCount. - * @member {number} successfulProbeCount - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.successfulProbeCount = 0; - - /** - * ProbingDetails endpointInfo. - * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.endpointInfo = null; - - /** - * ProbingDetails probingLatency. - * @member {google.cloud.networkmanagement.v1.ILatencyDistribution|null|undefined} probingLatency - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.probingLatency = null; - - /** - * ProbingDetails destinationEgressLocation. - * @member {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.destinationEgressLocation = null; - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails instance - */ - ProbingDetails.create = function create(properties) { - return new ProbingDetails(properties); - }; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); - if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); - if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) - $root.google.cloud.networkmanagement.v1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) - $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.abortCause = reader.int32(); - break; - } - case 5: { - message.sentProbeCount = reader.int32(); - break; - } - case 6: { - message.successfulProbeCount = reader.int32(); - break; - } - case 7: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.decode(reader, reader.uint32()); - break; - } - case 9: { - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProbingDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProbingDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - switch (message.abortCause) { - default: - return "abortCause: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - if (!$util.isInteger(message.sentProbeCount)) - return "sentProbeCount: integer expected"; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - if (!$util.isInteger(message.successfulProbeCount)) - return "successfulProbeCount: integer expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { - var error = $root.google.cloud.networkmanagement.v1.LatencyDistribution.verify(message.probingLatency); - if (error) - return "probingLatency." + error; - } - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { - var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); - if (error) - return "destinationEgressLocation." + error; - } - return null; - }; - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails - */ - ProbingDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "PROBING_RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "REACHABILITY_INCONSISTENT": - case 3: - message.result = 3; - break; - case "UNDETERMINED": - case 4: - message.result = 4; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - switch (object.abortCause) { - default: - if (typeof object.abortCause === "number") { - message.abortCause = object.abortCause; - break; - } - break; - case "PROBING_ABORT_CAUSE_UNSPECIFIED": - case 0: - message.abortCause = 0; - break; - case "PERMISSION_DENIED": - case 1: - message.abortCause = 1; - break; - case "NO_SOURCE_LOCATION": - case 2: - message.abortCause = 2; - break; - } - if (object.sentProbeCount != null) - message.sentProbeCount = object.sentProbeCount | 0; - if (object.successfulProbeCount != null) - message.successfulProbeCount = object.successfulProbeCount | 0; - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.probingLatency != null) { - if (typeof object.probingLatency !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.probingLatency: object expected"); - message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.fromObject(object.probingLatency); - } - if (object.destinationEgressLocation != null) { - if (typeof object.destinationEgressLocation !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.destinationEgressLocation: object expected"); - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); - } - return message; - }; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails} message ProbingDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProbingDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; - object.sentProbeCount = 0; - object.successfulProbeCount = 0; - object.endpointInfo = null; - object.probingLatency = null; - object.destinationEgressLocation = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - object.sentProbeCount = message.sentProbeCount; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - object.successfulProbeCount = message.successfulProbeCount; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) - object.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.toObject(message.probingLatency, options); - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) - object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); - return object; - }; - - /** - * Converts this ProbingDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - * @returns {Object.} JSON object - */ - ProbingDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProbingDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails"; - }; - - /** - * ProbingResult enum. - * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult - * @enum {number} - * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value - * @property {number} UNDETERMINED=4 UNDETERMINED value - */ - ProbingDetails.ProbingResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; - values[valuesById[4] = "UNDETERMINED"] = 4; - return values; - })(); - - /** - * ProbingAbortCause enum. - * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause - * @enum {number} - * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value - * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value - * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value - */ - ProbingDetails.ProbingAbortCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PERMISSION_DENIED"] = 1; - values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; - return values; - })(); - - ProbingDetails.EdgeLocation = (function() { - - /** - * Properties of an EdgeLocation. - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @interface IEdgeLocation - * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea - */ - - /** - * Constructs a new EdgeLocation. - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @classdesc Represents an EdgeLocation. - * @implements IEdgeLocation - * @constructor - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - */ - function EdgeLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EdgeLocation metropolitanArea. - * @member {string} metropolitanArea - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @instance - */ - EdgeLocation.prototype.metropolitanArea = ""; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation instance - */ - EdgeLocation.create = function create(properties) { - return new EdgeLocation(properties); - }; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); - return writer; - }; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metropolitanArea = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EdgeLocation message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EdgeLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - if (!$util.isString(message.metropolitanArea)) - return "metropolitanArea: string expected"; - return null; - }; - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation - */ - EdgeLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); - if (object.metropolitanArea != null) - message.metropolitanArea = String(object.metropolitanArea); - return message; - }; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} message EdgeLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EdgeLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metropolitanArea = ""; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - object.metropolitanArea = message.metropolitanArea; - return object; - }; - - /** - * Converts this EdgeLocation to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @instance - * @returns {Object.} JSON object - */ - EdgeLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EdgeLocation - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation"; - }; - - return EdgeLocation; - })(); - - return ProbingDetails; - })(); - - v1.Trace = (function() { - - /** - * Properties of a Trace. - * @memberof google.cloud.networkmanagement.v1 - * @interface ITrace - * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo - * @property {Array.|null} [steps] Trace steps - * @property {number|null} [forwardTraceId] Trace forwardTraceId - */ - - /** - * Constructs a new Trace. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a Trace. - * @implements ITrace - * @constructor - * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set - */ - function Trace(properties) { - this.steps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trace endpointInfo. - * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - */ - Trace.prototype.endpointInfo = null; - - /** - * Trace steps. - * @member {Array.} steps - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - */ - Trace.prototype.steps = $util.emptyArray; - - /** - * Trace forwardTraceId. - * @member {number} forwardTraceId - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - */ - Trace.prototype.forwardTraceId = 0; - - /** - * Creates a new Trace instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Trace} Trace instance - */ - Trace.create = function create(properties) { - return new Trace(properties); - }; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.cloud.networkmanagement.v1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); - return writer; - }; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Trace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.cloud.networkmanagement.v1.Step.decode(reader, reader.uint32())); - break; - } - case 4: { - message.forwardTraceId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Trace message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.Step.verify(message.steps[i]); - if (error) - return "steps." + error; - } - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - if (!$util.isInteger(message.forwardTraceId)) - return "forwardTraceId: integer expected"; - return null; - }; - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Trace} Trace - */ - Trace.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Trace) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Trace(); - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Trace.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: object expected"); - message.steps[i] = $root.google.cloud.networkmanagement.v1.Step.fromObject(object.steps[i]); - } - } - if (object.forwardTraceId != null) - message.forwardTraceId = object.forwardTraceId | 0; - return message; - }; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.Trace} message Trace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.steps = []; - if (options.defaults) { - object.endpointInfo = null; - object.forwardTraceId = 0; - } - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.cloud.networkmanagement.v1.Step.toObject(message.steps[j], options); - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - object.forwardTraceId = message.forwardTraceId; - return object; - }; - - /** - * Converts this Trace to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - * @returns {Object.} JSON object - */ - Trace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Trace - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Trace"; - }; - - return Trace; - })(); - - v1.Step = (function() { - - /** - * Properties of a Step. - * @memberof google.cloud.networkmanagement.v1 - * @interface IStep - * @property {string|null} [description] Step description - * @property {google.cloud.networkmanagement.v1.Step.State|null} [state] Step state - * @property {boolean|null} [causesDrop] Step causesDrop - * @property {string|null} [projectId] Step projectId - * @property {google.cloud.networkmanagement.v1.IInstanceInfo|null} [instance] Step instance - * @property {google.cloud.networkmanagement.v1.IFirewallInfo|null} [firewall] Step firewall - * @property {google.cloud.networkmanagement.v1.IRouteInfo|null} [route] Step route - * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpoint] Step endpoint - * @property {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null} [googleService] Step googleService - * @property {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule - * @property {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway - * @property {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel - * @property {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector - * @property {google.cloud.networkmanagement.v1.IDeliverInfo|null} [deliver] Step deliver - * @property {google.cloud.networkmanagement.v1.IForwardInfo|null} [forward] Step forward - * @property {google.cloud.networkmanagement.v1.IAbortInfo|null} [abort] Step abort - * @property {google.cloud.networkmanagement.v1.IDropInfo|null} [drop] Step drop - * @property {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer - * @property {google.cloud.networkmanagement.v1.INetworkInfo|null} [network] Step network - * @property {google.cloud.networkmanagement.v1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster - * @property {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance - * @property {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance - * @property {google.cloud.networkmanagement.v1.IRedisClusterInfo|null} [redisCluster] Step redisCluster - * @property {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction - * @property {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion - * @property {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision - * @property {google.cloud.networkmanagement.v1.INatInfo|null} [nat] Step nat - * @property {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection - * @property {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo - * @property {google.cloud.networkmanagement.v1.IStorageBucketInfo|null} [storageBucket] Step storageBucket - * @property {google.cloud.networkmanagement.v1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg - */ - - /** - * Constructs a new Step. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a Step. - * @implements IStep - * @constructor - * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set - */ - function Step(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Step description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.description = ""; - - /** - * Step state. - * @member {google.cloud.networkmanagement.v1.Step.State} state - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.state = 0; - - /** - * Step causesDrop. - * @member {boolean} causesDrop - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.causesDrop = false; - - /** - * Step projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.projectId = ""; - - /** - * Step instance. - * @member {google.cloud.networkmanagement.v1.IInstanceInfo|null|undefined} instance - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.instance = null; - - /** - * Step firewall. - * @member {google.cloud.networkmanagement.v1.IFirewallInfo|null|undefined} firewall - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.firewall = null; - - /** - * Step route. - * @member {google.cloud.networkmanagement.v1.IRouteInfo|null|undefined} route - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.route = null; - - /** - * Step endpoint. - * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpoint - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.endpoint = null; - - /** - * Step googleService. - * @member {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null|undefined} googleService - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.googleService = null; - - /** - * Step forwardingRule. - * @member {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null|undefined} forwardingRule - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.forwardingRule = null; - - /** - * Step vpnGateway. - * @member {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null|undefined} vpnGateway - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.vpnGateway = null; - - /** - * Step vpnTunnel. - * @member {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null|undefined} vpnTunnel - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.vpnTunnel = null; - - /** - * Step vpcConnector. - * @member {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null|undefined} vpcConnector - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.vpcConnector = null; - - /** - * Step deliver. - * @member {google.cloud.networkmanagement.v1.IDeliverInfo|null|undefined} deliver - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.deliver = null; - - /** - * Step forward. - * @member {google.cloud.networkmanagement.v1.IForwardInfo|null|undefined} forward - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.forward = null; - - /** - * Step abort. - * @member {google.cloud.networkmanagement.v1.IAbortInfo|null|undefined} abort - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.abort = null; - - /** - * Step drop. - * @member {google.cloud.networkmanagement.v1.IDropInfo|null|undefined} drop - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.drop = null; - - /** - * Step loadBalancer. - * @member {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null|undefined} loadBalancer - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.loadBalancer = null; - - /** - * Step network. - * @member {google.cloud.networkmanagement.v1.INetworkInfo|null|undefined} network - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.network = null; - - /** - * Step gkeMaster. - * @member {google.cloud.networkmanagement.v1.IGKEMasterInfo|null|undefined} gkeMaster - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.gkeMaster = null; - - /** - * Step cloudSqlInstance. - * @member {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.cloudSqlInstance = null; - - /** - * Step redisInstance. - * @member {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null|undefined} redisInstance - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.redisInstance = null; - - /** - * Step redisCluster. - * @member {google.cloud.networkmanagement.v1.IRedisClusterInfo|null|undefined} redisCluster - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.redisCluster = null; - - /** - * Step cloudFunction. - * @member {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.cloudFunction = null; - - /** - * Step appEngineVersion. - * @member {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.appEngineVersion = null; - - /** - * Step cloudRunRevision. - * @member {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.cloudRunRevision = null; - - /** - * Step nat. - * @member {google.cloud.networkmanagement.v1.INatInfo|null|undefined} nat - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.nat = null; - - /** - * Step proxyConnection. - * @member {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null|undefined} proxyConnection - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.proxyConnection = null; - - /** - * Step loadBalancerBackendInfo. - * @member {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.loadBalancerBackendInfo = null; - - /** - * Step storageBucket. - * @member {google.cloud.networkmanagement.v1.IStorageBucketInfo|null|undefined} storageBucket - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.storageBucket = null; - - /** - * Step serverlessNeg. - * @member {google.cloud.networkmanagement.v1.IServerlessNegInfo|null|undefined} serverlessNeg - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.serverlessNeg = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Step stepInfo. - * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Object.defineProperty(Step.prototype, "stepInfo", { - get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Step instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Step} Step instance - */ - Step.create = function create(properties) { - return new Step(properties); - }; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - $root.google.cloud.networkmanagement.v1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) - $root.google.cloud.networkmanagement.v1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.route != null && Object.hasOwnProperty.call(message, "route")) - $root.google.cloud.networkmanagement.v1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) - $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) - $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) - $root.google.cloud.networkmanagement.v1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) - $root.google.cloud.networkmanagement.v1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) - $root.google.cloud.networkmanagement.v1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) - $root.google.cloud.networkmanagement.v1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) - $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - $root.google.cloud.networkmanagement.v1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) - $root.google.cloud.networkmanagement.v1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) - $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) - $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) - $root.google.cloud.networkmanagement.v1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) - $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) - $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - $root.google.cloud.networkmanagement.v1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) - $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - $root.google.cloud.networkmanagement.v1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Step message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Step(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.causesDrop = reader.bool(); - break; - } - case 4: { - message.projectId = reader.string(); - break; - } - case 5: { - message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.decode(reader, reader.uint32()); - break; - } - case 7: { - message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 24: { - message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.decode(reader, reader.uint32()); - break; - } - case 9: { - message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.decode(reader, reader.uint32()); - break; - } - case 10: { - message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.decode(reader, reader.uint32()); - break; - } - case 11: { - message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.decode(reader, reader.uint32()); - break; - } - case 21: { - message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.decode(reader, reader.uint32()); - break; - } - case 16: { - message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.decode(reader, reader.uint32()); - break; - } - case 17: { - message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.decode(reader, reader.uint32()); - break; - } - case 18: { - message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.decode(reader, reader.uint32()); - break; - } - case 19: { - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 30: { - message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 31: { - message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.decode(reader, reader.uint32()); - break; - } - case 20: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.decode(reader, reader.uint32()); - break; - } - case 22: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.decode(reader, reader.uint32()); - break; - } - case 27: { - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); - break; - } - case 28: { - message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.decode(reader, reader.uint32()); - break; - } - case 29: { - message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Step message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Step.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 27: - case 3: - case 21: - case 22: - case 32: - case 33: - case 23: - case 25: - case 26: - case 29: - case 30: - case 31: - case 4: - case 5: - case 6: - case 7: - case 28: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 24: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - break; - } - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - if (typeof message.causesDrop !== "boolean") - return "causesDrop: boolean expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.InstanceInfo.verify(message.instance); - if (error) - return "instance." + error; - } - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.FirewallInfo.verify(message.firewall); - if (error) - return "firewall." + error; - } - } - if (message.route != null && message.hasOwnProperty("route")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.RouteInfo.verify(message.route); - if (error) - return "route." + error; - } - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpoint); - if (error) - return "endpoint." + error; - } - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.verify(message.googleService); - if (error) - return "googleService." + error; - } - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify(message.forwardingRule); - if (error) - return "forwardingRule." + error; - } - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.verify(message.vpnGateway); - if (error) - return "vpnGateway." + error; - } - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.verify(message.vpnTunnel); - if (error) - return "vpnTunnel." + error; - } - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.verify(message.vpcConnector); - if (error) - return "vpcConnector." + error; - } - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.DeliverInfo.verify(message.deliver); - if (error) - return "deliver." + error; - } - } - if (message.forward != null && message.hasOwnProperty("forward")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ForwardInfo.verify(message.forward); - if (error) - return "forward." + error; - } - } - if (message.abort != null && message.hasOwnProperty("abort")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.AbortInfo.verify(message.abort); - if (error) - return "abort." + error; - } - } - if (message.drop != null && message.hasOwnProperty("drop")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.DropInfo.verify(message.drop); - if (error) - return "drop." + error; - } - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.verify(message.loadBalancer); - if (error) - return "loadBalancer." + error; - } - } - if (message.network != null && message.hasOwnProperty("network")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.NetworkInfo.verify(message.network); - if (error) - return "network." + error; - } - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.verify(message.gkeMaster); - if (error) - return "gkeMaster." + error; - } - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); - if (error) - return "cloudSqlInstance." + error; - } - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.verify(message.redisInstance); - if (error) - return "redisInstance." + error; - } - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.verify(message.redisCluster); - if (error) - return "redisCluster." + error; - } - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - } - if (message.nat != null && message.hasOwnProperty("nat")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.NatInfo.verify(message.nat); - if (error) - return "nat." + error; - } - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify(message.proxyConnection); - if (error) - return "proxyConnection." + error; - } - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); - if (error) - return "loadBalancerBackendInfo." + error; - } - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.verify(message.storageBucket); - if (error) - return "storageBucket." + error; - } - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.verify(message.serverlessNeg); - if (error) - return "serverlessNeg." + error; - } - } - return null; - }; - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Step} Step - */ - Step.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Step) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Step(); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "START_FROM_INSTANCE": - case 1: - message.state = 1; - break; - case "START_FROM_INTERNET": - case 2: - message.state = 2; - break; - case "START_FROM_GOOGLE_SERVICE": - case 27: - message.state = 27; - break; - case "START_FROM_PRIVATE_NETWORK": - case 3: - message.state = 3; - break; - case "START_FROM_GKE_MASTER": - case 21: - message.state = 21; - break; - case "START_FROM_CLOUD_SQL_INSTANCE": - case 22: - message.state = 22; - break; - case "START_FROM_REDIS_INSTANCE": - case 32: - message.state = 32; - break; - case "START_FROM_REDIS_CLUSTER": - case 33: - message.state = 33; - break; - case "START_FROM_CLOUD_FUNCTION": - case 23: - message.state = 23; - break; - case "START_FROM_APP_ENGINE_VERSION": - case 25: - message.state = 25; - break; - case "START_FROM_CLOUD_RUN_REVISION": - case 26: - message.state = 26; - break; - case "START_FROM_STORAGE_BUCKET": - case 29: - message.state = 29; - break; - case "START_FROM_PSC_PUBLISHED_SERVICE": - case 30: - message.state = 30; - break; - case "START_FROM_SERVERLESS_NEG": - case 31: - message.state = 31; - break; - case "APPLY_INGRESS_FIREWALL_RULE": - case 4: - message.state = 4; - break; - case "APPLY_EGRESS_FIREWALL_RULE": - case 5: - message.state = 5; - break; - case "APPLY_ROUTE": - case 6: - message.state = 6; - break; - case "APPLY_FORWARDING_RULE": - case 7: - message.state = 7; - break; - case "ANALYZE_LOAD_BALANCER_BACKEND": - case 28: - message.state = 28; - break; - case "SPOOFING_APPROVED": - case 8: - message.state = 8; - break; - case "ARRIVE_AT_INSTANCE": - case 9: - message.state = 9; - break; - case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": - case 10: - message.state = 10; - break; - case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": - case 11: - message.state = 11; - break; - case "ARRIVE_AT_VPN_GATEWAY": - case 12: - message.state = 12; - break; - case "ARRIVE_AT_VPN_TUNNEL": - case 13: - message.state = 13; - break; - case "ARRIVE_AT_VPC_CONNECTOR": - case 24: - message.state = 24; - break; - case "NAT": - case 14: - message.state = 14; - break; - case "PROXY_CONNECTION": - case 15: - message.state = 15; - break; - case "DELIVER": - case 16: - message.state = 16; - break; - case "DROP": - case 17: - message.state = 17; - break; - case "FORWARD": - case 18: - message.state = 18; - break; - case "ABORT": - case 19: - message.state = 19; - break; - case "VIEWER_PERMISSION_MISSING": - case 20: - message.state = 20; - break; - } - if (object.causesDrop != null) - message.causesDrop = Boolean(object.causesDrop); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instance != null) { - if (typeof object.instance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.instance: object expected"); - message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.fromObject(object.instance); - } - if (object.firewall != null) { - if (typeof object.firewall !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.firewall: object expected"); - message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.fromObject(object.firewall); - } - if (object.route != null) { - if (typeof object.route !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.route: object expected"); - message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.fromObject(object.route); - } - if (object.endpoint != null) { - if (typeof object.endpoint !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.endpoint: object expected"); - message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpoint); - } - if (object.googleService != null) { - if (typeof object.googleService !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.googleService: object expected"); - message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.fromObject(object.googleService); - } - if (object.forwardingRule != null) { - if (typeof object.forwardingRule !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.forwardingRule: object expected"); - message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.fromObject(object.forwardingRule); - } - if (object.vpnGateway != null) { - if (typeof object.vpnGateway !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnGateway: object expected"); - message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.fromObject(object.vpnGateway); - } - if (object.vpnTunnel != null) { - if (typeof object.vpnTunnel !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnTunnel: object expected"); - message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.fromObject(object.vpnTunnel); - } - if (object.vpcConnector != null) { - if (typeof object.vpcConnector !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.vpcConnector: object expected"); - message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.fromObject(object.vpcConnector); - } - if (object.deliver != null) { - if (typeof object.deliver !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.deliver: object expected"); - message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.fromObject(object.deliver); - } - if (object.forward != null) { - if (typeof object.forward !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.forward: object expected"); - message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.fromObject(object.forward); - } - if (object.abort != null) { - if (typeof object.abort !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.abort: object expected"); - message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.fromObject(object.abort); - } - if (object.drop != null) { - if (typeof object.drop !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.drop: object expected"); - message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.fromObject(object.drop); - } - if (object.loadBalancer != null) { - if (typeof object.loadBalancer !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancer: object expected"); - message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.fromObject(object.loadBalancer); - } - if (object.network != null) { - if (typeof object.network !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.network: object expected"); - message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.fromObject(object.network); - } - if (object.gkeMaster != null) { - if (typeof object.gkeMaster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.gkeMaster: object expected"); - message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.fromObject(object.gkeMaster); - } - if (object.cloudSqlInstance != null) { - if (typeof object.cloudSqlInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudSqlInstance: object expected"); - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); - } - if (object.redisInstance != null) { - if (typeof object.redisInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.redisInstance: object expected"); - message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.fromObject(object.redisInstance); - } - if (object.redisCluster != null) { - if (typeof object.redisCluster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.redisCluster: object expected"); - message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.fromObject(object.redisCluster); - } - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); - } - if (object.nat != null) { - if (typeof object.nat !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.nat: object expected"); - message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.fromObject(object.nat); - } - if (object.proxyConnection != null) { - if (typeof object.proxyConnection !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.proxyConnection: object expected"); - message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.fromObject(object.proxyConnection); - } - if (object.loadBalancerBackendInfo != null) { - if (typeof object.loadBalancerBackendInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancerBackendInfo: object expected"); - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); - } - if (object.storageBucket != null) { - if (typeof object.storageBucket !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.storageBucket: object expected"); - message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.fromObject(object.storageBucket); - } - if (object.serverlessNeg != null) { - if (typeof object.serverlessNeg !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.serverlessNeg: object expected"); - message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.fromObject(object.serverlessNeg); - } - return message; - }; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.Step} message Step - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Step.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.causesDrop = false; - object.projectId = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1.Step.State[message.state] : message.state; - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - object.causesDrop = message.causesDrop; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instance != null && message.hasOwnProperty("instance")) { - object.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.toObject(message.instance, options); - if (options.oneofs) - object.stepInfo = "instance"; - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - object.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.toObject(message.firewall, options); - if (options.oneofs) - object.stepInfo = "firewall"; - } - if (message.route != null && message.hasOwnProperty("route")) { - object.route = $root.google.cloud.networkmanagement.v1.RouteInfo.toObject(message.route, options); - if (options.oneofs) - object.stepInfo = "route"; - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - object.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpoint, options); - if (options.oneofs) - object.stepInfo = "endpoint"; - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - object.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.toObject(message.forwardingRule, options); - if (options.oneofs) - object.stepInfo = "forwardingRule"; - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - object.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.toObject(message.vpnGateway, options); - if (options.oneofs) - object.stepInfo = "vpnGateway"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - object.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.toObject(message.vpnTunnel, options); - if (options.oneofs) - object.stepInfo = "vpnTunnel"; - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - object.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.toObject(message.deliver, options); - if (options.oneofs) - object.stepInfo = "deliver"; - } - if (message.forward != null && message.hasOwnProperty("forward")) { - object.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.toObject(message.forward, options); - if (options.oneofs) - object.stepInfo = "forward"; - } - if (message.abort != null && message.hasOwnProperty("abort")) { - object.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.toObject(message.abort, options); - if (options.oneofs) - object.stepInfo = "abort"; - } - if (message.drop != null && message.hasOwnProperty("drop")) { - object.drop = $root.google.cloud.networkmanagement.v1.DropInfo.toObject(message.drop, options); - if (options.oneofs) - object.stepInfo = "drop"; - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - object.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.toObject(message.loadBalancer, options); - if (options.oneofs) - object.stepInfo = "loadBalancer"; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.toObject(message.network, options); - if (options.oneofs) - object.stepInfo = "network"; - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - object.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.toObject(message.gkeMaster, options); - if (options.oneofs) - object.stepInfo = "gkeMaster"; - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); - if (options.oneofs) - object.stepInfo = "cloudSqlInstance"; - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - object.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.toObject(message.cloudFunction, options); - if (options.oneofs) - object.stepInfo = "cloudFunction"; - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - object.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.toObject(message.vpcConnector, options); - if (options.oneofs) - object.stepInfo = "vpcConnector"; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - object.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); - if (options.oneofs) - object.stepInfo = "appEngineVersion"; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); - if (options.oneofs) - object.stepInfo = "cloudRunRevision"; - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - object.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.toObject(message.googleService, options); - if (options.oneofs) - object.stepInfo = "googleService"; - } - if (message.nat != null && message.hasOwnProperty("nat")) { - object.nat = $root.google.cloud.networkmanagement.v1.NatInfo.toObject(message.nat, options); - if (options.oneofs) - object.stepInfo = "nat"; - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - object.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.toObject(message.proxyConnection, options); - if (options.oneofs) - object.stepInfo = "proxyConnection"; - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); - if (options.oneofs) - object.stepInfo = "loadBalancerBackendInfo"; - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - object.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.toObject(message.storageBucket, options); - if (options.oneofs) - object.stepInfo = "storageBucket"; - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - object.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.toObject(message.serverlessNeg, options); - if (options.oneofs) - object.stepInfo = "serverlessNeg"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - object.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.toObject(message.redisInstance, options); - if (options.oneofs) - object.stepInfo = "redisInstance"; - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - object.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.toObject(message.redisCluster, options); - if (options.oneofs) - object.stepInfo = "redisCluster"; - } - return object; - }; - - /** - * Converts this Step to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - * @returns {Object.} JSON object - */ - Step.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Step - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Step"; - }; - - /** - * State enum. - * @name google.cloud.networkmanagement.v1.Step.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value - * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value - * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value - * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value - * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value - * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value - * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value - * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value - * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value - * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value - * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value - * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value - * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value - * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value - * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value - * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value - * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value - * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value - * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value - * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value - * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value - * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value - * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value - * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value - * @property {number} NAT=14 NAT value - * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value - * @property {number} DELIVER=16 DELIVER value - * @property {number} DROP=17 DROP value - * @property {number} FORWARD=18 FORWARD value - * @property {number} ABORT=19 ABORT value - * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value - */ - Step.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START_FROM_INSTANCE"] = 1; - values[valuesById[2] = "START_FROM_INTERNET"] = 2; - values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; - values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; - values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; - values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; - values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; - values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; - values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; - values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; - values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; - values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; - values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; - values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; - values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; - values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; - values[valuesById[6] = "APPLY_ROUTE"] = 6; - values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; - values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; - values[valuesById[8] = "SPOOFING_APPROVED"] = 8; - values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; - values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; - values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; - values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; - values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; - values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; - values[valuesById[14] = "NAT"] = 14; - values[valuesById[15] = "PROXY_CONNECTION"] = 15; - values[valuesById[16] = "DELIVER"] = 16; - values[valuesById[17] = "DROP"] = 17; - values[valuesById[18] = "FORWARD"] = 18; - values[valuesById[19] = "ABORT"] = 19; - values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; - return values; - })(); - - return Step; - })(); - - v1.InstanceInfo = (function() { - - /** - * Properties of an InstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IInstanceInfo - * @property {string|null} [displayName] InstanceInfo displayName - * @property {string|null} [uri] InstanceInfo uri - * @property {string|null} ["interface"] InstanceInfo interface - * @property {string|null} [networkUri] InstanceInfo networkUri - * @property {string|null} [internalIp] InstanceInfo internalIp - * @property {string|null} [externalIp] InstanceInfo externalIp - * @property {Array.|null} [networkTags] InstanceInfo networkTags - * @property {string|null} [serviceAccount] InstanceInfo serviceAccount - * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri - */ - - /** - * Constructs a new InstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an InstanceInfo. - * @implements IInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set - */ - function InstanceInfo(properties) { - this.networkTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.displayName = ""; - - /** - * InstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.uri = ""; - - /** - * InstanceInfo interface. - * @member {string} interface - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype["interface"] = ""; - - /** - * InstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkUri = ""; - - /** - * InstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.internalIp = ""; - - /** - * InstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.externalIp = ""; - - /** - * InstanceInfo networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkTags = $util.emptyArray; - - /** - * InstanceInfo serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.serviceAccount = ""; - - /** - * InstanceInfo pscNetworkAttachmentUri. - * @member {string} pscNetworkAttachmentUri - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.pscNetworkAttachmentUri = ""; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo instance - */ - InstanceInfo.create = function create(properties) { - return new InstanceInfo(properties); - }; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); - if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); - return writer; - }; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message["interface"] = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; - } - case 8: { - message.serviceAccount = reader.string(); - break; - } - case 9: { - message.pscNetworkAttachmentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message["interface"] != null && message.hasOwnProperty("interface")) - if (!$util.isString(message["interface"])) - return "interface: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - if (!$util.isString(message.pscNetworkAttachmentUri)) - return "pscNetworkAttachmentUri: string expected"; - return null; - }; - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo - */ - InstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.InstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object["interface"] != null) - message["interface"] = String(object["interface"]); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.networkmanagement.v1.InstanceInfo.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.pscNetworkAttachmentUri != null) - message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); - return message; - }; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.InstanceInfo} message InstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object["interface"] = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.serviceAccount = ""; - object.pscNetworkAttachmentUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message["interface"] != null && message.hasOwnProperty("interface")) - object["interface"] = message["interface"]; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; - return object; - }; - - /** - * Converts this InstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - * @returns {Object.} JSON object - */ - InstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.InstanceInfo"; - }; - - return InstanceInfo; - })(); - - v1.NetworkInfo = (function() { - - /** - * Properties of a NetworkInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface INetworkInfo - * @property {string|null} [displayName] NetworkInfo displayName - * @property {string|null} [uri] NetworkInfo uri - * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri - * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange - * @property {string|null} [region] NetworkInfo region - */ - - /** - * Constructs a new NetworkInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a NetworkInfo. - * @implements INetworkInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set - */ - function NetworkInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.displayName = ""; - - /** - * NetworkInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.uri = ""; - - /** - * NetworkInfo matchedSubnetUri. - * @member {string} matchedSubnetUri - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedSubnetUri = ""; - - /** - * NetworkInfo matchedIpRange. - * @member {string} matchedIpRange - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedIpRange = ""; - - /** - * NetworkInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.region = ""; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo instance - */ - NetworkInfo.create = function create(properties) { - return new NetworkInfo(properties); - }; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); - if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 5: { - message.matchedSubnetUri = reader.string(); - break; - } - case 4: { - message.matchedIpRange = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - if (!$util.isString(message.matchedSubnetUri)) - return "matchedSubnetUri: string expected"; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - if (!$util.isString(message.matchedIpRange)) - return "matchedIpRange: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo - */ - NetworkInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.NetworkInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedSubnetUri != null) - message.matchedSubnetUri = String(object.matchedSubnetUri); - if (object.matchedIpRange != null) - message.matchedIpRange = String(object.matchedIpRange); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.NetworkInfo} message NetworkInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedIpRange = ""; - object.matchedSubnetUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - object.matchedIpRange = message.matchedIpRange; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - object.matchedSubnetUri = message.matchedSubnetUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this NetworkInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - * @returns {Object.} JSON object - */ - NetworkInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NetworkInfo"; - }; - - return NetworkInfo; - })(); - - v1.FirewallInfo = (function() { - - /** - * Properties of a FirewallInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IFirewallInfo - * @property {string|null} [displayName] FirewallInfo displayName - * @property {string|null} [uri] FirewallInfo uri - * @property {string|null} [direction] FirewallInfo direction - * @property {string|null} [action] FirewallInfo action - * @property {number|null} [priority] FirewallInfo priority - * @property {string|null} [networkUri] FirewallInfo networkUri - * @property {Array.|null} [targetTags] FirewallInfo targetTags - * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts - * @property {string|null} [policy] FirewallInfo policy - * @property {string|null} [policyUri] FirewallInfo policyUri - * @property {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType - */ - - /** - * Constructs a new FirewallInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a FirewallInfo. - * @implements IFirewallInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set - */ - function FirewallInfo(properties) { - this.targetTags = []; - this.targetServiceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FirewallInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.displayName = ""; - - /** - * FirewallInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.uri = ""; - - /** - * FirewallInfo direction. - * @member {string} direction - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.direction = ""; - - /** - * FirewallInfo action. - * @member {string} action - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.action = ""; - - /** - * FirewallInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.priority = 0; - - /** - * FirewallInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.networkUri = ""; - - /** - * FirewallInfo targetTags. - * @member {Array.} targetTags - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetTags = $util.emptyArray; - - /** - * FirewallInfo targetServiceAccounts. - * @member {Array.} targetServiceAccounts - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; - - /** - * FirewallInfo policy. - * @member {string} policy - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policy = ""; - - /** - * FirewallInfo policyUri. - * @member {string} policyUri - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policyUri = ""; - - /** - * FirewallInfo firewallRuleType. - * @member {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType} firewallRuleType - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.firewallRuleType = 0; - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo instance - */ - FirewallInfo.create = function create(properties) { - return new FirewallInfo(properties); - }; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); - if (message.targetTags != null && message.targetTags.length) - for (var i = 0; i < message.targetTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); - if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); - if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); - if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); - return writer; - }; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.direction = reader.string(); - break; - } - case 4: { - message.action = reader.string(); - break; - } - case 5: { - message.priority = reader.int32(); - break; - } - case 6: { - message.networkUri = reader.string(); - break; - } - case 7: { - if (!(message.targetTags && message.targetTags.length)) - message.targetTags = []; - message.targetTags.push(reader.string()); - break; - } - case 8: { - if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) - message.targetServiceAccounts = []; - message.targetServiceAccounts.push(reader.string()); - break; - } - case 9: { - message.policy = reader.string(); - break; - } - case 11: { - message.policyUri = reader.string(); - break; - } - case 10: { - message.firewallRuleType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FirewallInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FirewallInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.direction != null && message.hasOwnProperty("direction")) - if (!$util.isString(message.direction)) - return "direction: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.targetTags != null && message.hasOwnProperty("targetTags")) { - if (!Array.isArray(message.targetTags)) - return "targetTags: array expected"; - for (var i = 0; i < message.targetTags.length; ++i) - if (!$util.isString(message.targetTags[i])) - return "targetTags: string[] expected"; - } - if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { - if (!Array.isArray(message.targetServiceAccounts)) - return "targetServiceAccounts: array expected"; - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - if (!$util.isString(message.targetServiceAccounts[i])) - return "targetServiceAccounts: string[] expected"; - } - if (message.policy != null && message.hasOwnProperty("policy")) - if (!$util.isString(message.policy)) - return "policy: string expected"; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - if (!$util.isString(message.policyUri)) - return "policyUri: string expected"; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - switch (message.firewallRuleType) { - default: - return "firewallRuleType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 100: - case 101: - break; - } - return null; - }; - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo - */ - FirewallInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.FirewallInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.direction != null) - message.direction = String(object.direction); - if (object.action != null) - message.action = String(object.action); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.targetTags) { - if (!Array.isArray(object.targetTags)) - throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetTags: array expected"); - message.targetTags = []; - for (var i = 0; i < object.targetTags.length; ++i) - message.targetTags[i] = String(object.targetTags[i]); - } - if (object.targetServiceAccounts) { - if (!Array.isArray(object.targetServiceAccounts)) - throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetServiceAccounts: array expected"); - message.targetServiceAccounts = []; - for (var i = 0; i < object.targetServiceAccounts.length; ++i) - message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); - } - if (object.policy != null) - message.policy = String(object.policy); - if (object.policyUri != null) - message.policyUri = String(object.policyUri); - switch (object.firewallRuleType) { - default: - if (typeof object.firewallRuleType === "number") { - message.firewallRuleType = object.firewallRuleType; - break; - } - break; - case "FIREWALL_RULE_TYPE_UNSPECIFIED": - case 0: - message.firewallRuleType = 0; - break; - case "HIERARCHICAL_FIREWALL_POLICY_RULE": - case 1: - message.firewallRuleType = 1; - break; - case "VPC_FIREWALL_RULE": - case 2: - message.firewallRuleType = 2; - break; - case "IMPLIED_VPC_FIREWALL_RULE": - case 3: - message.firewallRuleType = 3; - break; - case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": - case 4: - message.firewallRuleType = 4; - break; - case "NETWORK_FIREWALL_POLICY_RULE": - case 5: - message.firewallRuleType = 5; - break; - case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": - case 6: - message.firewallRuleType = 6; - break; - case "UNSUPPORTED_FIREWALL_POLICY_RULE": - case 100: - message.firewallRuleType = 100; - break; - case "TRACKING_STATE": - case 101: - message.firewallRuleType = 101; - break; - } - return message; - }; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.FirewallInfo} message FirewallInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FirewallInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targetTags = []; - object.targetServiceAccounts = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.direction = ""; - object.action = ""; - object.priority = 0; - object.networkUri = ""; - object.policy = ""; - object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; - object.policyUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = message.direction; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.targetTags && message.targetTags.length) { - object.targetTags = []; - for (var j = 0; j < message.targetTags.length; ++j) - object.targetTags[j] = message.targetTags[j]; - } - if (message.targetServiceAccounts && message.targetServiceAccounts.length) { - object.targetServiceAccounts = []; - for (var j = 0; j < message.targetServiceAccounts.length; ++j) - object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; - } - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = message.policy; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - object.policyUri = message.policyUri; - return object; - }; - - /** - * Converts this FirewallInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - * @returns {Object.} JSON object - */ - FirewallInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FirewallInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.FirewallInfo"; - }; - - /** - * FirewallRuleType enum. - * @name google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType - * @enum {number} - * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value - * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value - * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value - * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value - * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value - * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value - * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value - * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value - * @property {number} TRACKING_STATE=101 TRACKING_STATE value - */ - FirewallInfo.FirewallRuleType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; - values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; - values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; - values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; - values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; - values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; - values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; - values[valuesById[101] = "TRACKING_STATE"] = 101; - return values; - })(); - - return FirewallInfo; - })(); - - v1.RouteInfo = (function() { - - /** - * Properties of a RouteInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRouteInfo - * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType - * @property {google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType - * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope - * @property {string|null} [displayName] RouteInfo displayName - * @property {string|null} [uri] RouteInfo uri - * @property {string|null} [region] RouteInfo region - * @property {string|null} [destIpRange] RouteInfo destIpRange - * @property {string|null} [nextHop] RouteInfo nextHop - * @property {string|null} [networkUri] RouteInfo networkUri - * @property {number|null} [priority] RouteInfo priority - * @property {Array.|null} [instanceTags] RouteInfo instanceTags - * @property {string|null} [srcIpRange] RouteInfo srcIpRange - * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges - * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges - * @property {Array.|null} [protocols] RouteInfo protocols - * @property {string|null} [nccHubUri] RouteInfo nccHubUri - * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri - * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri - * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri - */ - - /** - * Constructs a new RouteInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RouteInfo. - * @implements IRouteInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set - */ - function RouteInfo(properties) { - this.instanceTags = []; - this.destPortRanges = []; - this.srcPortRanges = []; - this.protocols = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RouteInfo routeType. - * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteType} routeType - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeType = 0; - - /** - * RouteInfo nextHopType. - * @member {google.cloud.networkmanagement.v1.RouteInfo.NextHopType} nextHopType - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHopType = 0; - - /** - * RouteInfo routeScope. - * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteScope} routeScope - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeScope = 0; - - /** - * RouteInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.displayName = ""; - - /** - * RouteInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.uri = ""; - - /** - * RouteInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.region = ""; - - /** - * RouteInfo destIpRange. - * @member {string} destIpRange - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.destIpRange = ""; - - /** - * RouteInfo nextHop. - * @member {string} nextHop - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHop = ""; - - /** - * RouteInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.networkUri = ""; - - /** - * RouteInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.priority = 0; - - /** - * RouteInfo instanceTags. - * @member {Array.} instanceTags - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.instanceTags = $util.emptyArray; - - /** - * RouteInfo srcIpRange. - * @member {string} srcIpRange - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcIpRange = ""; - - /** - * RouteInfo destPortRanges. - * @member {Array.} destPortRanges - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.destPortRanges = $util.emptyArray; - - /** - * RouteInfo srcPortRanges. - * @member {Array.} srcPortRanges - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcPortRanges = $util.emptyArray; - - /** - * RouteInfo protocols. - * @member {Array.} protocols - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.protocols = $util.emptyArray; - - /** - * RouteInfo nccHubUri. - * @member {string|null|undefined} nccHubUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccHubUri = null; - - /** - * RouteInfo nccSpokeUri. - * @member {string|null|undefined} nccSpokeUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccSpokeUri = null; - - /** - * RouteInfo advertisedRouteSourceRouterUri. - * @member {string|null|undefined} advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteSourceRouterUri = null; - - /** - * RouteInfo advertisedRouteNextHopUri. - * @member {string|null|undefined} advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteNextHopUri = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RouteInfo _nccHubUri. - * @member {"nccHubUri"|undefined} _nccHubUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { - get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _nccSpokeUri. - * @member {"nccSpokeUri"|undefined} _nccSpokeUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { - get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteSourceRouterUri. - * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteNextHopUri. - * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RouteInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo instance - */ - RouteInfo.create = function create(properties) { - return new RouteInfo(properties); - }; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); - if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); - if (message.instanceTags != null && message.instanceTags.length) - for (var i = 0; i < message.instanceTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); - if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); - if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); - if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); - if (message.destPortRanges != null && message.destPortRanges.length) - for (var i = 0; i < message.destPortRanges.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); - if (message.srcPortRanges != null && message.srcPortRanges.length) - for (var i = 0; i < message.srcPortRanges.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); - if (message.protocols != null && message.protocols.length) - for (var i = 0; i < message.protocols.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); - if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); - if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); - if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); - if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); - if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); - return writer; - }; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: { - message.routeType = reader.int32(); - break; - } - case 9: { - message.nextHopType = reader.int32(); - break; - } - case 14: { - message.routeScope = reader.int32(); - break; - } - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 19: { - message.region = reader.string(); - break; - } - case 3: { - message.destIpRange = reader.string(); - break; - } - case 4: { - message.nextHop = reader.string(); - break; - } - case 5: { - message.networkUri = reader.string(); - break; - } - case 6: { - message.priority = reader.int32(); - break; - } - case 7: { - if (!(message.instanceTags && message.instanceTags.length)) - message.instanceTags = []; - message.instanceTags.push(reader.string()); - break; - } - case 10: { - message.srcIpRange = reader.string(); - break; - } - case 11: { - if (!(message.destPortRanges && message.destPortRanges.length)) - message.destPortRanges = []; - message.destPortRanges.push(reader.string()); - break; - } - case 12: { - if (!(message.srcPortRanges && message.srcPortRanges.length)) - message.srcPortRanges = []; - message.srcPortRanges.push(reader.string()); - break; - } - case 13: { - if (!(message.protocols && message.protocols.length)) - message.protocols = []; - message.protocols.push(reader.string()); - break; - } - case 15: { - message.nccHubUri = reader.string(); - break; - } - case 16: { - message.nccSpokeUri = reader.string(); - break; - } - case 17: { - message.advertisedRouteSourceRouterUri = reader.string(); - break; - } - case 18: { - message.advertisedRouteNextHopUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RouteInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RouteInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.routeType != null && message.hasOwnProperty("routeType")) - switch (message.routeType) { - default: - return "routeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 101: - break; - } - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - switch (message.nextHopType) { - default: - return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) - switch (message.routeScope) { - default: - return "routeScope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - if (!$util.isString(message.destIpRange)) - return "destIpRange: string expected"; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - if (!$util.isString(message.nextHop)) - return "nextHop: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { - if (!Array.isArray(message.instanceTags)) - return "instanceTags: array expected"; - for (var i = 0; i < message.instanceTags.length; ++i) - if (!$util.isString(message.instanceTags[i])) - return "instanceTags: string[] expected"; - } - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - if (!$util.isString(message.srcIpRange)) - return "srcIpRange: string expected"; - if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { - if (!Array.isArray(message.destPortRanges)) - return "destPortRanges: array expected"; - for (var i = 0; i < message.destPortRanges.length; ++i) - if (!$util.isString(message.destPortRanges[i])) - return "destPortRanges: string[] expected"; - } - if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { - if (!Array.isArray(message.srcPortRanges)) - return "srcPortRanges: array expected"; - for (var i = 0; i < message.srcPortRanges.length; ++i) - if (!$util.isString(message.srcPortRanges[i])) - return "srcPortRanges: string[] expected"; - } - if (message.protocols != null && message.hasOwnProperty("protocols")) { - if (!Array.isArray(message.protocols)) - return "protocols: array expected"; - for (var i = 0; i < message.protocols.length; ++i) - if (!$util.isString(message.protocols[i])) - return "protocols: string[] expected"; - } - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - properties._nccHubUri = 1; - if (!$util.isString(message.nccHubUri)) - return "nccHubUri: string expected"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - properties._nccSpokeUri = 1; - if (!$util.isString(message.nccSpokeUri)) - return "nccSpokeUri: string expected"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - properties._advertisedRouteSourceRouterUri = 1; - if (!$util.isString(message.advertisedRouteSourceRouterUri)) - return "advertisedRouteSourceRouterUri: string expected"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - properties._advertisedRouteNextHopUri = 1; - if (!$util.isString(message.advertisedRouteNextHopUri)) - return "advertisedRouteNextHopUri: string expected"; - } - return null; - }; - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo - */ - RouteInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RouteInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); - switch (object.routeType) { - default: - if (typeof object.routeType === "number") { - message.routeType = object.routeType; - break; - } - break; - case "ROUTE_TYPE_UNSPECIFIED": - case 0: - message.routeType = 0; - break; - case "SUBNET": - case 1: - message.routeType = 1; - break; - case "STATIC": - case 2: - message.routeType = 2; - break; - case "DYNAMIC": - case 3: - message.routeType = 3; - break; - case "PEERING_SUBNET": - case 4: - message.routeType = 4; - break; - case "PEERING_STATIC": - case 5: - message.routeType = 5; - break; - case "PEERING_DYNAMIC": - case 6: - message.routeType = 6; - break; - case "POLICY_BASED": - case 7: - message.routeType = 7; - break; - case "ADVERTISED": - case 101: - message.routeType = 101; - break; - } - switch (object.nextHopType) { - default: - if (typeof object.nextHopType === "number") { - message.nextHopType = object.nextHopType; - break; - } - break; - case "NEXT_HOP_TYPE_UNSPECIFIED": - case 0: - message.nextHopType = 0; - break; - case "NEXT_HOP_IP": - case 1: - message.nextHopType = 1; - break; - case "NEXT_HOP_INSTANCE": - case 2: - message.nextHopType = 2; - break; - case "NEXT_HOP_NETWORK": - case 3: - message.nextHopType = 3; - break; - case "NEXT_HOP_PEERING": - case 4: - message.nextHopType = 4; - break; - case "NEXT_HOP_INTERCONNECT": - case 5: - message.nextHopType = 5; - break; - case "NEXT_HOP_VPN_TUNNEL": - case 6: - message.nextHopType = 6; - break; - case "NEXT_HOP_VPN_GATEWAY": - case 7: - message.nextHopType = 7; - break; - case "NEXT_HOP_INTERNET_GATEWAY": - case 8: - message.nextHopType = 8; - break; - case "NEXT_HOP_BLACKHOLE": - case 9: - message.nextHopType = 9; - break; - case "NEXT_HOP_ILB": - case 10: - message.nextHopType = 10; - break; - case "NEXT_HOP_ROUTER_APPLIANCE": - case 11: - message.nextHopType = 11; - break; - case "NEXT_HOP_NCC_HUB": - case 12: - message.nextHopType = 12; - break; - } - switch (object.routeScope) { - default: - if (typeof object.routeScope === "number") { - message.routeScope = object.routeScope; - break; - } - break; - case "ROUTE_SCOPE_UNSPECIFIED": - case 0: - message.routeScope = 0; - break; - case "NETWORK": - case 1: - message.routeScope = 1; - break; - case "NCC_HUB": - case 2: - message.routeScope = 2; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.region != null) - message.region = String(object.region); - if (object.destIpRange != null) - message.destIpRange = String(object.destIpRange); - if (object.nextHop != null) - message.nextHop = String(object.nextHop); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.instanceTags) { - if (!Array.isArray(object.instanceTags)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.instanceTags: array expected"); - message.instanceTags = []; - for (var i = 0; i < object.instanceTags.length; ++i) - message.instanceTags[i] = String(object.instanceTags[i]); - } - if (object.srcIpRange != null) - message.srcIpRange = String(object.srcIpRange); - if (object.destPortRanges) { - if (!Array.isArray(object.destPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.destPortRanges: array expected"); - message.destPortRanges = []; - for (var i = 0; i < object.destPortRanges.length; ++i) - message.destPortRanges[i] = String(object.destPortRanges[i]); - } - if (object.srcPortRanges) { - if (!Array.isArray(object.srcPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.srcPortRanges: array expected"); - message.srcPortRanges = []; - for (var i = 0; i < object.srcPortRanges.length; ++i) - message.srcPortRanges[i] = String(object.srcPortRanges[i]); - } - if (object.protocols) { - if (!Array.isArray(object.protocols)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.protocols: array expected"); - message.protocols = []; - for (var i = 0; i < object.protocols.length; ++i) - message.protocols[i] = String(object.protocols[i]); - } - if (object.nccHubUri != null) - message.nccHubUri = String(object.nccHubUri); - if (object.nccSpokeUri != null) - message.nccSpokeUri = String(object.nccSpokeUri); - if (object.advertisedRouteSourceRouterUri != null) - message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); - if (object.advertisedRouteNextHopUri != null) - message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); - return message; - }; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.RouteInfo} message RouteInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RouteInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.instanceTags = []; - object.destPortRanges = []; - object.srcPortRanges = []; - object.protocols = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.destIpRange = ""; - object.nextHop = ""; - object.networkUri = ""; - object.priority = 0; - object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; - object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; - object.srcIpRange = ""; - object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - object.destIpRange = message.destIpRange; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - object.nextHop = message.nextHop; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.instanceTags && message.instanceTags.length) { - object.instanceTags = []; - for (var j = 0; j < message.instanceTags.length; ++j) - object.instanceTags[j] = message.instanceTags[j]; - } - if (message.routeType != null && message.hasOwnProperty("routeType")) - object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] : message.routeType; - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - object.srcIpRange = message.srcIpRange; - if (message.destPortRanges && message.destPortRanges.length) { - object.destPortRanges = []; - for (var j = 0; j < message.destPortRanges.length; ++j) - object.destPortRanges[j] = message.destPortRanges[j]; - } - if (message.srcPortRanges && message.srcPortRanges.length) { - object.srcPortRanges = []; - for (var j = 0; j < message.srcPortRanges.length; ++j) - object.srcPortRanges[j] = message.srcPortRanges[j]; - } - if (message.protocols && message.protocols.length) { - object.protocols = []; - for (var j = 0; j < message.protocols.length; ++j) - object.protocols[j] = message.protocols[j]; - } - if (message.routeScope != null && message.hasOwnProperty("routeScope")) - object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - object.nccHubUri = message.nccHubUri; - if (options.oneofs) - object._nccHubUri = "nccHubUri"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - object.nccSpokeUri = message.nccSpokeUri; - if (options.oneofs) - object._nccSpokeUri = "nccSpokeUri"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; - if (options.oneofs) - object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; - if (options.oneofs) - object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; - } - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RouteInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - * @returns {Object.} JSON object - */ - RouteInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RouteInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RouteInfo"; - }; - - /** - * RouteType enum. - * @name google.cloud.networkmanagement.v1.RouteInfo.RouteType - * @enum {number} - * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value - * @property {number} SUBNET=1 SUBNET value - * @property {number} STATIC=2 STATIC value - * @property {number} DYNAMIC=3 DYNAMIC value - * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value - * @property {number} PEERING_STATIC=5 PEERING_STATIC value - * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value - * @property {number} POLICY_BASED=7 POLICY_BASED value - * @property {number} ADVERTISED=101 ADVERTISED value - */ - RouteInfo.RouteType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUBNET"] = 1; - values[valuesById[2] = "STATIC"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - values[valuesById[4] = "PEERING_SUBNET"] = 4; - values[valuesById[5] = "PEERING_STATIC"] = 5; - values[valuesById[6] = "PEERING_DYNAMIC"] = 6; - values[valuesById[7] = "POLICY_BASED"] = 7; - values[valuesById[101] = "ADVERTISED"] = 101; - return values; - })(); - - /** - * NextHopType enum. - * @name google.cloud.networkmanagement.v1.RouteInfo.NextHopType - * @enum {number} - * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value - * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value - * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value - * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value - * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value - * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value - * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value - * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value - * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value - * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value - * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value - * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value - * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value - */ - RouteInfo.NextHopType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEXT_HOP_IP"] = 1; - values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; - values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; - values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; - values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; - values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; - values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; - values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; - values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; - values[valuesById[10] = "NEXT_HOP_ILB"] = 10; - values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; - values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; - return values; - })(); - - /** - * RouteScope enum. - * @name google.cloud.networkmanagement.v1.RouteInfo.RouteScope - * @enum {number} - * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value - * @property {number} NETWORK=1 NETWORK value - * @property {number} NCC_HUB=2 NCC_HUB value - */ - RouteInfo.RouteScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NETWORK"] = 1; - values[valuesById[2] = "NCC_HUB"] = 2; - return values; - })(); - - return RouteInfo; - })(); - - v1.GoogleServiceInfo = (function() { - - /** - * Properties of a GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IGoogleServiceInfo - * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp - * @property {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType - */ - - /** - * Constructs a new GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a GoogleServiceInfo. - * @implements IGoogleServiceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set - */ - function GoogleServiceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoogleServiceInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.sourceIp = ""; - - /** - * GoogleServiceInfo googleServiceType. - * @member {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType} googleServiceType - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.googleServiceType = 0; - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo instance - */ - GoogleServiceInfo.create = function create(properties) { - return new GoogleServiceInfo(properties); - }; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); - return writer; - }; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.googleServiceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoogleServiceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoogleServiceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - switch (message.googleServiceType) { - default: - return "googleServiceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - return null; - }; - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo - */ - GoogleServiceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.GoogleServiceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - switch (object.googleServiceType) { - default: - if (typeof object.googleServiceType === "number") { - message.googleServiceType = object.googleServiceType; - break; - } - break; - case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": - case 0: - message.googleServiceType = 0; - break; - case "IAP": - case 1: - message.googleServiceType = 1; - break; - case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": - case 2: - message.googleServiceType = 2; - break; - case "CLOUD_DNS": - case 3: - message.googleServiceType = 3; - break; - case "GOOGLE_API": - case 4: - message.googleServiceType = 4; - break; - case "GOOGLE_API_PSC": - case 5: - message.googleServiceType = 5; - break; - case "GOOGLE_API_VPC_SC": - case 6: - message.googleServiceType = 6; - break; - } - return message; - }; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.GoogleServiceInfo} message GoogleServiceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoogleServiceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; - return object; - }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @instance - * @returns {Object.} JSON object - */ - GoogleServiceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoogleServiceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GoogleServiceInfo"; - }; - - /** - * GoogleServiceType enum. - * @name google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType - * @enum {number} - * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value - * @property {number} IAP=1 IAP value - * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value - * @property {number} CLOUD_DNS=3 CLOUD_DNS value - * @property {number} GOOGLE_API=4 GOOGLE_API value - * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value - * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value - */ - GoogleServiceInfo.GoogleServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IAP"] = 1; - values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; - values[valuesById[3] = "CLOUD_DNS"] = 3; - values[valuesById[4] = "GOOGLE_API"] = 4; - values[valuesById[5] = "GOOGLE_API_PSC"] = 5; - values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; - return values; - })(); - - return GoogleServiceInfo; - })(); - - v1.ForwardingRuleInfo = (function() { - - /** - * Properties of a ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IForwardingRuleInfo - * @property {string|null} [displayName] ForwardingRuleInfo displayName - * @property {string|null} [uri] ForwardingRuleInfo uri - * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol - * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange - * @property {string|null} [vip] ForwardingRuleInfo vip - * @property {string|null} [target] ForwardingRuleInfo target - * @property {string|null} [networkUri] ForwardingRuleInfo networkUri - * @property {string|null} [region] ForwardingRuleInfo region - * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName - * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget - */ - - /** - * Constructs a new ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ForwardingRuleInfo. - * @implements IForwardingRuleInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set - */ - function ForwardingRuleInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardingRuleInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.displayName = ""; - - /** - * ForwardingRuleInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.uri = ""; - - /** - * ForwardingRuleInfo matchedProtocol. - * @member {string} matchedProtocol - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedProtocol = ""; - - /** - * ForwardingRuleInfo matchedPortRange. - * @member {string} matchedPortRange - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedPortRange = ""; - - /** - * ForwardingRuleInfo vip. - * @member {string} vip - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.vip = ""; - - /** - * ForwardingRuleInfo target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.target = ""; - - /** - * ForwardingRuleInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.networkUri = ""; - - /** - * ForwardingRuleInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.region = ""; - - /** - * ForwardingRuleInfo loadBalancerName. - * @member {string} loadBalancerName - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.loadBalancerName = ""; - - /** - * ForwardingRuleInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * ForwardingRuleInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo instance - */ - ForwardingRuleInfo.create = function create(properties) { - return new ForwardingRuleInfo(properties); - }; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); - if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); - if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.matchedProtocol = reader.string(); - break; - } - case 6: { - message.matchedPortRange = reader.string(); - break; - } - case 4: { - message.vip = reader.string(); - break; - } - case 5: { - message.target = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.loadBalancerName = reader.string(); - break; - } - case 10: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 11: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardingRuleInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardingRuleInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - if (!$util.isString(message.matchedProtocol)) - return "matchedProtocol: string expected"; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - if (!$util.isString(message.matchedPortRange)) - return "matchedPortRange: string expected"; - if (message.vip != null && message.hasOwnProperty("vip")) - if (!$util.isString(message.vip)) - return "vip: string expected"; - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - if (!$util.isString(message.loadBalancerName)) - return "loadBalancerName: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo - */ - ForwardingRuleInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedProtocol != null) - message.matchedProtocol = String(object.matchedProtocol); - if (object.matchedPortRange != null) - message.matchedPortRange = String(object.matchedPortRange); - if (object.vip != null) - message.vip = String(object.vip); - if (object.target != null) - message.target = String(object.target); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - if (object.loadBalancerName != null) - message.loadBalancerName = String(object.loadBalancerName); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.ForwardingRuleInfo} message ForwardingRuleInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardingRuleInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedProtocol = ""; - object.vip = ""; - object.target = ""; - object.matchedPortRange = ""; - object.networkUri = ""; - object.region = ""; - object.loadBalancerName = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - object.matchedProtocol = message.matchedProtocol; - if (message.vip != null && message.hasOwnProperty("vip")) - object.vip = message.vip; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - object.matchedPortRange = message.matchedPortRange; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - object.loadBalancerName = message.loadBalancerName; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardingRuleInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardingRuleInfo"; - }; - - return ForwardingRuleInfo; - })(); - - v1.LoadBalancerInfo = (function() { - - /** - * Properties of a LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILoadBalancerInfo - * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType - * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri - * @property {Array.|null} [backends] LoadBalancerInfo backends - * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType - * @property {string|null} [backendUri] LoadBalancerInfo backendUri - */ - - /** - * Constructs a new LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LoadBalancerInfo. - * @implements ILoadBalancerInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set - */ - function LoadBalancerInfo(properties) { - this.backends = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerInfo loadBalancerType. - * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType} loadBalancerType - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.loadBalancerType = 0; - - /** - * LoadBalancerInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerInfo backends. - * @member {Array.} backends - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backends = $util.emptyArray; - - /** - * LoadBalancerInfo backendType. - * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType} backendType - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendType = 0; - - /** - * LoadBalancerInfo backendUri. - * @member {string} backendUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendUri = ""; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo instance - */ - LoadBalancerInfo.create = function create(properties) { - return new LoadBalancerInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); - if (message.backends != null && message.backends.length) - for (var i = 0; i < message.backends.length; ++i) - $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); - if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); - return writer; - }; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.loadBalancerType = reader.int32(); - break; - } - case 2: { - message.healthCheckUri = reader.string(); - break; - } - case 3: { - if (!(message.backends && message.backends.length)) - message.backends = []; - message.backends.push($root.google.cloud.networkmanagement.v1.LoadBalancerBackend.decode(reader, reader.uint32())); - break; - } - case 4: { - message.backendType = reader.int32(); - break; - } - case 5: { - message.backendUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - switch (message.loadBalancerType) { - default: - return "loadBalancerType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.backends != null && message.hasOwnProperty("backends")) { - if (!Array.isArray(message.backends)) - return "backends: array expected"; - for (var i = 0; i < message.backends.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.verify(message.backends[i]); - if (error) - return "backends." + error; - } - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - switch (message.backendType) { - default: - return "backendType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - if (!$util.isString(message.backendUri)) - return "backendUri: string expected"; - return null; - }; - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo - */ - LoadBalancerInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "INTERNAL_TCP_UDP": - case 1: - message.loadBalancerType = 1; - break; - case "NETWORK_TCP_UDP": - case 2: - message.loadBalancerType = 2; - break; - case "HTTP_PROXY": - case 3: - message.loadBalancerType = 3; - break; - case "TCP_PROXY": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY": - case 5: - message.loadBalancerType = 5; - break; - } - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - if (object.backends) { - if (!Array.isArray(object.backends)) - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: array expected"); - message.backends = []; - for (var i = 0; i < object.backends.length; ++i) { - if (typeof object.backends[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: object expected"); - message.backends[i] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.fromObject(object.backends[i]); - } - } - switch (object.backendType) { - default: - if (typeof object.backendType === "number") { - message.backendType = object.backendType; - break; - } - break; - case "BACKEND_TYPE_UNSPECIFIED": - case 0: - message.backendType = 0; - break; - case "BACKEND_SERVICE": - case 1: - message.backendType = 1; - break; - case "TARGET_POOL": - case 2: - message.backendType = 2; - break; - case "TARGET_INSTANCE": - case 3: - message.backendType = 3; - break; - } - if (object.backendUri != null) - message.backendUri = String(object.backendUri); - return message; - }; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.LoadBalancerInfo} message LoadBalancerInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backends = []; - if (options.defaults) { - object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; - object.healthCheckUri = ""; - object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; - object.backendUri = ""; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.backends && message.backends.length) { - object.backends = []; - for (var j = 0; j < message.backends.length; ++j) - object.backends[j] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.toObject(message.backends[j], options); - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - object.backendUri = message.backendUri; - return object; - }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerInfo"; - }; - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value - * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value - * @property {number} HTTP_PROXY=3 HTTP_PROXY value - * @property {number} TCP_PROXY=4 TCP_PROXY value - * @property {number} SSL_PROXY=5 SSL_PROXY value - */ - LoadBalancerInfo.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; - values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; - values[valuesById[3] = "HTTP_PROXY"] = 3; - values[valuesById[4] = "TCP_PROXY"] = 4; - values[valuesById[5] = "SSL_PROXY"] = 5; - return values; - })(); - - /** - * BackendType enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType - * @enum {number} - * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value - * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value - * @property {number} TARGET_POOL=2 TARGET_POOL value - * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value - */ - LoadBalancerInfo.BackendType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKEND_SERVICE"] = 1; - values[valuesById[2] = "TARGET_POOL"] = 2; - values[valuesById[3] = "TARGET_INSTANCE"] = 3; - return values; - })(); - - return LoadBalancerInfo; - })(); - - v1.LoadBalancerBackend = (function() { - - /** - * Properties of a LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILoadBalancerBackend - * @property {string|null} [displayName] LoadBalancerBackend displayName - * @property {string|null} [uri] LoadBalancerBackend uri - * @property {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState - * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules - * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules - */ - - /** - * Constructs a new LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LoadBalancerBackend. - * @implements ILoadBalancerBackend - * @constructor - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set - */ - function LoadBalancerBackend(properties) { - this.healthCheckAllowingFirewallRules = []; - this.healthCheckBlockingFirewallRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackend displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.displayName = ""; - - /** - * LoadBalancerBackend uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.uri = ""; - - /** - * LoadBalancerBackend healthCheckFirewallState. - * @member {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckFirewallState = 0; - - /** - * LoadBalancerBackend healthCheckAllowingFirewallRules. - * @member {Array.} healthCheckAllowingFirewallRules - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; - - /** - * LoadBalancerBackend healthCheckBlockingFirewallRules. - * @member {Array.} healthCheckBlockingFirewallRules - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend instance - */ - LoadBalancerBackend.create = function create(properties) { - return new LoadBalancerBackend(properties); - }; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); - if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); - if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.healthCheckFirewallState = reader.int32(); - break; - } - case 4: { - if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) - message.healthCheckAllowingFirewallRules = []; - message.healthCheckAllowingFirewallRules.push(reader.string()); - break; - } - case 5: { - if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) - message.healthCheckBlockingFirewallRules = []; - message.healthCheckBlockingFirewallRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackend message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - switch (message.healthCheckFirewallState) { - default: - return "healthCheckFirewallState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { - if (!Array.isArray(message.healthCheckAllowingFirewallRules)) - return "healthCheckAllowingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) - return "healthCheckAllowingFirewallRules: string[] expected"; - } - if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { - if (!Array.isArray(message.healthCheckBlockingFirewallRules)) - return "healthCheckBlockingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) - return "healthCheckBlockingFirewallRules: string[] expected"; - } - return null; - }; - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend - */ - LoadBalancerBackend.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackend) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - switch (object.healthCheckFirewallState) { - default: - if (typeof object.healthCheckFirewallState === "number") { - message.healthCheckFirewallState = object.healthCheckFirewallState; - break; - } - break; - case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallState = 0; - break; - case "CONFIGURED": - case 1: - message.healthCheckFirewallState = 1; - break; - case "MISCONFIGURED": - case 2: - message.healthCheckFirewallState = 2; - break; - } - if (object.healthCheckAllowingFirewallRules) { - if (!Array.isArray(object.healthCheckAllowingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); - message.healthCheckAllowingFirewallRules = []; - for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) - message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); - } - if (object.healthCheckBlockingFirewallRules) { - if (!Array.isArray(object.healthCheckBlockingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); - message.healthCheckBlockingFirewallRules = []; - for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) - message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.LoadBalancerBackend} message LoadBalancerBackend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.healthCheckAllowingFirewallRules = []; - object.healthCheckBlockingFirewallRules = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; - if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { - object.healthCheckAllowingFirewallRules = []; - for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) - object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; - } - if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { - object.healthCheckBlockingFirewallRules = []; - for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) - object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; - } - return object; - }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackend - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackend"; - }; - - /** - * HealthCheckFirewallState enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value - * @property {number} CONFIGURED=1 CONFIGURED value - * @property {number} MISCONFIGURED=2 MISCONFIGURED value - */ - LoadBalancerBackend.HealthCheckFirewallState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIGURED"] = 1; - values[valuesById[2] = "MISCONFIGURED"] = 2; - return values; - })(); - - return LoadBalancerBackend; - })(); - - v1.VpnGatewayInfo = (function() { - - /** - * Properties of a VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IVpnGatewayInfo - * @property {string|null} [displayName] VpnGatewayInfo displayName - * @property {string|null} [uri] VpnGatewayInfo uri - * @property {string|null} [networkUri] VpnGatewayInfo networkUri - * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress - * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri - * @property {string|null} [region] VpnGatewayInfo region - */ - - /** - * Constructs a new VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a VpnGatewayInfo. - * @implements IVpnGatewayInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set - */ - function VpnGatewayInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnGatewayInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.displayName = ""; - - /** - * VpnGatewayInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.uri = ""; - - /** - * VpnGatewayInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.networkUri = ""; - - /** - * VpnGatewayInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.ipAddress = ""; - - /** - * VpnGatewayInfo vpnTunnelUri. - * @member {string} vpnTunnelUri - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.vpnTunnelUri = ""; - - /** - * VpnGatewayInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.region = ""; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo instance - */ - VpnGatewayInfo.create = function create(properties) { - return new VpnGatewayInfo(properties); - }; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 5: { - message.vpnTunnelUri = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnGatewayInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnGatewayInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - if (!$util.isString(message.vpnTunnelUri)) - return "vpnTunnelUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo - */ - VpnGatewayInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.VpnGatewayInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.vpnTunnelUri != null) - message.vpnTunnelUri = String(object.vpnTunnelUri); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.VpnGatewayInfo} message VpnGatewayInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnGatewayInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.ipAddress = ""; - object.vpnTunnelUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - object.vpnTunnelUri = message.vpnTunnelUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - * @returns {Object.} JSON object - */ - VpnGatewayInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnGatewayInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnGatewayInfo"; - }; - - return VpnGatewayInfo; - })(); - - v1.VpnTunnelInfo = (function() { - - /** - * Properties of a VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IVpnTunnelInfo - * @property {string|null} [displayName] VpnTunnelInfo displayName - * @property {string|null} [uri] VpnTunnelInfo uri - * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway - * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway - * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp - * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp - * @property {string|null} [networkUri] VpnTunnelInfo networkUri - * @property {string|null} [region] VpnTunnelInfo region - * @property {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType - */ - - /** - * Constructs a new VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a VpnTunnelInfo. - * @implements IVpnTunnelInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set - */ - function VpnTunnelInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnTunnelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.displayName = ""; - - /** - * VpnTunnelInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.uri = ""; - - /** - * VpnTunnelInfo sourceGateway. - * @member {string} sourceGateway - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGateway = ""; - - /** - * VpnTunnelInfo remoteGateway. - * @member {string} remoteGateway - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGateway = ""; - - /** - * VpnTunnelInfo remoteGatewayIp. - * @member {string} remoteGatewayIp - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGatewayIp = ""; - - /** - * VpnTunnelInfo sourceGatewayIp. - * @member {string} sourceGatewayIp - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGatewayIp = ""; - - /** - * VpnTunnelInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.networkUri = ""; - - /** - * VpnTunnelInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.region = ""; - - /** - * VpnTunnelInfo routingType. - * @member {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType} routingType - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.routingType = 0; - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo instance - */ - VpnTunnelInfo.create = function create(properties) { - return new VpnTunnelInfo(properties); - }; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); - if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); - if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); - if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); - return writer; - }; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.sourceGateway = reader.string(); - break; - } - case 4: { - message.remoteGateway = reader.string(); - break; - } - case 5: { - message.remoteGatewayIp = reader.string(); - break; - } - case 6: { - message.sourceGatewayIp = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.routingType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnTunnelInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnTunnelInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - if (!$util.isString(message.sourceGateway)) - return "sourceGateway: string expected"; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - if (!$util.isString(message.remoteGateway)) - return "remoteGateway: string expected"; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - if (!$util.isString(message.remoteGatewayIp)) - return "remoteGatewayIp: string expected"; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - if (!$util.isString(message.sourceGatewayIp)) - return "sourceGatewayIp: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.routingType != null && message.hasOwnProperty("routingType")) - switch (message.routingType) { - default: - return "routingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo - */ - VpnTunnelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.VpnTunnelInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.sourceGateway != null) - message.sourceGateway = String(object.sourceGateway); - if (object.remoteGateway != null) - message.remoteGateway = String(object.remoteGateway); - if (object.remoteGatewayIp != null) - message.remoteGatewayIp = String(object.remoteGatewayIp); - if (object.sourceGatewayIp != null) - message.sourceGatewayIp = String(object.sourceGatewayIp); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - switch (object.routingType) { - default: - if (typeof object.routingType === "number") { - message.routingType = object.routingType; - break; - } - break; - case "ROUTING_TYPE_UNSPECIFIED": - case 0: - message.routingType = 0; - break; - case "ROUTE_BASED": - case 1: - message.routingType = 1; - break; - case "POLICY_BASED": - case 2: - message.routingType = 2; - break; - case "DYNAMIC": - case 3: - message.routingType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.VpnTunnelInfo} message VpnTunnelInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnTunnelInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.sourceGateway = ""; - object.remoteGateway = ""; - object.remoteGatewayIp = ""; - object.sourceGatewayIp = ""; - object.networkUri = ""; - object.region = ""; - object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - object.sourceGateway = message.sourceGateway; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - object.remoteGateway = message.remoteGateway; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - object.remoteGatewayIp = message.remoteGatewayIp; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - object.sourceGatewayIp = message.sourceGatewayIp; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.routingType != null && message.hasOwnProperty("routingType")) - object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; - return object; - }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - * @returns {Object.} JSON object - */ - VpnTunnelInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnTunnelInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnTunnelInfo"; - }; - - /** - * RoutingType enum. - * @name google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType - * @enum {number} - * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value - * @property {number} ROUTE_BASED=1 ROUTE_BASED value - * @property {number} POLICY_BASED=2 POLICY_BASED value - * @property {number} DYNAMIC=3 DYNAMIC value - */ - VpnTunnelInfo.RoutingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ROUTE_BASED"] = 1; - values[valuesById[2] = "POLICY_BASED"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - return values; - })(); - - return VpnTunnelInfo; - })(); - - v1.EndpointInfo = (function() { - - /** - * Properties of an EndpointInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IEndpointInfo - * @property {string|null} [sourceIp] EndpointInfo sourceIp - * @property {string|null} [destinationIp] EndpointInfo destinationIp - * @property {string|null} [protocol] EndpointInfo protocol - * @property {number|null} [sourcePort] EndpointInfo sourcePort - * @property {number|null} [destinationPort] EndpointInfo destinationPort - * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri - * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri - * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri - */ - - /** - * Constructs a new EndpointInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an EndpointInfo. - * @implements IEndpointInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set - */ - function EndpointInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EndpointInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceIp = ""; - - /** - * EndpointInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationIp = ""; - - /** - * EndpointInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.protocol = ""; - - /** - * EndpointInfo sourcePort. - * @member {number} sourcePort - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourcePort = 0; - - /** - * EndpointInfo destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationPort = 0; - - /** - * EndpointInfo sourceNetworkUri. - * @member {string} sourceNetworkUri - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceNetworkUri = ""; - - /** - * EndpointInfo destinationNetworkUri. - * @member {string} destinationNetworkUri - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationNetworkUri = ""; - - /** - * EndpointInfo sourceAgentUri. - * @member {string} sourceAgentUri - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceAgentUri = ""; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo instance - */ - EndpointInfo.create = function create(properties) { - return new EndpointInfo(properties); - }; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); - if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); - if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); - if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); - return writer; - }; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.destinationIp = reader.string(); - break; - } - case 3: { - message.protocol = reader.string(); - break; - } - case 4: { - message.sourcePort = reader.int32(); - break; - } - case 5: { - message.destinationPort = reader.int32(); - break; - } - case 6: { - message.sourceNetworkUri = reader.string(); - break; - } - case 7: { - message.destinationNetworkUri = reader.string(); - break; - } - case 8: { - message.sourceAgentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EndpointInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EndpointInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isInteger(message.sourcePort)) - return "sourcePort: integer expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - if (!$util.isString(message.sourceNetworkUri)) - return "sourceNetworkUri: string expected"; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - if (!$util.isString(message.destinationNetworkUri)) - return "destinationNetworkUri: string expected"; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - if (!$util.isString(message.sourceAgentUri)) - return "sourceAgentUri: string expected"; - return null; - }; - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo - */ - EndpointInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.EndpointInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.sourcePort != null) - message.sourcePort = object.sourcePort | 0; - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - if (object.sourceNetworkUri != null) - message.sourceNetworkUri = String(object.sourceNetworkUri); - if (object.destinationNetworkUri != null) - message.destinationNetworkUri = String(object.destinationNetworkUri); - if (object.sourceAgentUri != null) - message.sourceAgentUri = String(object.sourceAgentUri); - return message; - }; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.EndpointInfo} message EndpointInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EndpointInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.destinationIp = ""; - object.protocol = ""; - object.sourcePort = 0; - object.destinationPort = 0; - object.sourceNetworkUri = ""; - object.destinationNetworkUri = ""; - object.sourceAgentUri = ""; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - object.sourceNetworkUri = message.sourceNetworkUri; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - object.destinationNetworkUri = message.destinationNetworkUri; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - object.sourceAgentUri = message.sourceAgentUri; - return object; - }; - - /** - * Converts this EndpointInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - * @returns {Object.} JSON object - */ - EndpointInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EndpointInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.EndpointInfo"; - }; - - return EndpointInfo; - })(); - - v1.DeliverInfo = (function() { - - /** - * Properties of a DeliverInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IDeliverInfo - * @property {google.cloud.networkmanagement.v1.DeliverInfo.Target|null} [target] DeliverInfo target - * @property {string|null} [resourceUri] DeliverInfo resourceUri - * @property {string|null} [ipAddress] DeliverInfo ipAddress - * @property {string|null} [storageBucket] DeliverInfo storageBucket - * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget - */ - - /** - * Constructs a new DeliverInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a DeliverInfo. - * @implements IDeliverInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set - */ - function DeliverInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeliverInfo target. - * @member {google.cloud.networkmanagement.v1.DeliverInfo.Target} target - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.target = 0; - - /** - * DeliverInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.resourceUri = ""; - - /** - * DeliverInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.ipAddress = ""; - - /** - * DeliverInfo storageBucket. - * @member {string} storageBucket - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.storageBucket = ""; - - /** - * DeliverInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo instance - */ - DeliverInfo.create = function create(properties) { - return new DeliverInfo(properties); - }; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.storageBucket = reader.string(); - break; - } - case 5: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeliverInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeliverInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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: - case 15: - case 16: - case 17: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - if (!$util.isString(message.storageBucket)) - return "storageBucket: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo - */ - DeliverInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.DeliverInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "INSTANCE": - case 1: - message.target = 1; - break; - case "INTERNET": - case 2: - message.target = 2; - break; - case "GOOGLE_API": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "CLOUD_SQL_INSTANCE": - case 5: - message.target = 5; - break; - case "PSC_PUBLISHED_SERVICE": - case 6: - message.target = 6; - break; - case "PSC_GOOGLE_API": - case 7: - message.target = 7; - break; - case "PSC_VPC_SC": - case 8: - message.target = 8; - break; - case "SERVERLESS_NEG": - case 9: - message.target = 9; - break; - case "STORAGE_BUCKET": - case 10: - message.target = 10; - break; - case "PRIVATE_NETWORK": - case 11: - message.target = 11; - break; - case "CLOUD_FUNCTION": - case 12: - message.target = 12; - break; - case "APP_ENGINE_VERSION": - case 13: - message.target = 13; - break; - case "CLOUD_RUN_REVISION": - case 14: - message.target = 14; - break; - case "GOOGLE_MANAGED_SERVICE": - case 15: - message.target = 15; - break; - case "REDIS_INSTANCE": - case 16: - message.target = 16; - break; - case "REDIS_CLUSTER": - case 17: - message.target = 17; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.storageBucket != null) - message.storageBucket = String(object.storageBucket); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.DeliverInfo} message DeliverInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeliverInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - object.storageBucket = ""; - object.pscGoogleApiTarget = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - object.storageBucket = message.storageBucket; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this DeliverInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - * @returns {Object.} JSON object - */ - DeliverInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeliverInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeliverInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1.DeliverInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} INTERNET=2 INTERNET value - * @property {number} GOOGLE_API=3 GOOGLE_API value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value - * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value - * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value - * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value - * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value - * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value - * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value - * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value - * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value - * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value - * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value - * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value - * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value - */ - DeliverInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "INTERNET"] = 2; - values[valuesById[3] = "GOOGLE_API"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; - values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; - values[valuesById[7] = "PSC_GOOGLE_API"] = 7; - values[valuesById[8] = "PSC_VPC_SC"] = 8; - values[valuesById[9] = "SERVERLESS_NEG"] = 9; - values[valuesById[10] = "STORAGE_BUCKET"] = 10; - values[valuesById[11] = "PRIVATE_NETWORK"] = 11; - values[valuesById[12] = "CLOUD_FUNCTION"] = 12; - values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; - values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; - values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; - values[valuesById[16] = "REDIS_INSTANCE"] = 16; - values[valuesById[17] = "REDIS_CLUSTER"] = 17; - return values; - })(); - - return DeliverInfo; - })(); - - v1.ForwardInfo = (function() { - - /** - * Properties of a ForwardInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IForwardInfo - * @property {google.cloud.networkmanagement.v1.ForwardInfo.Target|null} [target] ForwardInfo target - * @property {string|null} [resourceUri] ForwardInfo resourceUri - * @property {string|null} [ipAddress] ForwardInfo ipAddress - */ - - /** - * Constructs a new ForwardInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ForwardInfo. - * @implements IForwardInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set - */ - function ForwardInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardInfo target. - * @member {google.cloud.networkmanagement.v1.ForwardInfo.Target} target - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.target = 0; - - /** - * ForwardInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.resourceUri = ""; - - /** - * ForwardInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.ipAddress = ""; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo instance - */ - ForwardInfo.create = function create(properties) { - return new ForwardInfo(properties); - }; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - return null; - }; - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo - */ - ForwardInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "PEERING_VPC": - case 1: - message.target = 1; - break; - case "VPN_GATEWAY": - case 2: - message.target = 2; - break; - case "INTERCONNECT": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": - case 5: - message.target = 5; - break; - case "CLOUD_SQL_INSTANCE": - case 6: - message.target = 6; - break; - case "ANOTHER_PROJECT": - case 7: - message.target = 7; - break; - case "NCC_HUB": - case 8: - message.target = 8; - break; - case "ROUTER_APPLIANCE": - case 9: - message.target = 9; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - return message; - }; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.ForwardInfo} message ForwardInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this ForwardInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1.ForwardInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} PEERING_VPC=1 PEERING_VPC value - * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value - * @property {number} INTERCONNECT=3 INTERCONNECT value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value - * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value - * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value - * @property {number} NCC_HUB=8 NCC_HUB value - * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value - */ - ForwardInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "PEERING_VPC"] = 1; - values[valuesById[2] = "VPN_GATEWAY"] = 2; - values[valuesById[3] = "INTERCONNECT"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; - values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; - values[valuesById[7] = "ANOTHER_PROJECT"] = 7; - values[valuesById[8] = "NCC_HUB"] = 8; - values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; - return values; - })(); - - return ForwardInfo; - })(); - - v1.AbortInfo = (function() { - - /** - * Properties of an AbortInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IAbortInfo - * @property {google.cloud.networkmanagement.v1.AbortInfo.Cause|null} [cause] AbortInfo cause - * @property {string|null} [resourceUri] AbortInfo resourceUri - * @property {string|null} [ipAddress] AbortInfo ipAddress - * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission - */ - - /** - * Constructs a new AbortInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an AbortInfo. - * @implements IAbortInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set - */ - function AbortInfo(properties) { - this.projectsMissingPermission = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AbortInfo cause. - * @member {google.cloud.networkmanagement.v1.AbortInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.cause = 0; - - /** - * AbortInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.resourceUri = ""; - - /** - * AbortInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.ipAddress = ""; - - /** - * AbortInfo projectsMissingPermission. - * @member {Array.} projectsMissingPermission - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo instance - */ - AbortInfo.create = function create(properties) { - return new AbortInfo(properties); - }; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 3: { - if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) - message.projectsMissingPermission = []; - message.projectsMissingPermission.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AbortInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AbortInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 3: - case 7: - case 8: - case 11: - case 12: - case 13: - case 14: - case 2: - case 32: - case 23: - case 4: - case 28: - case 29: - case 36: - case 5: - case 6: - case 9: - case 10: - case 15: - case 16: - case 17: - case 18: - case 24: - case 25: - case 26: - case 27: - case 19: - case 20: - case 34: - case 35: - case 21: - case 22: - case 30: - case 31: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { - if (!Array.isArray(message.projectsMissingPermission)) - return "projectsMissingPermission: array expected"; - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - if (!$util.isString(message.projectsMissingPermission[i])) - return "projectsMissingPermission: string[] expected"; - } - return null; - }; - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo - */ - AbortInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.AbortInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_NETWORK": - case 1: - message.cause = 1; - break; - case "UNKNOWN_PROJECT": - case 3: - message.cause = 3; - break; - case "NO_EXTERNAL_IP": - case 7: - message.cause = 7; - break; - case "UNINTENDED_DESTINATION": - case 8: - message.cause = 8; - break; - case "SOURCE_ENDPOINT_NOT_FOUND": - case 11: - message.cause = 11; - break; - case "MISMATCHED_SOURCE_NETWORK": - case 12: - message.cause = 12; - break; - case "DESTINATION_ENDPOINT_NOT_FOUND": - case 13: - message.cause = 13; - break; - case "MISMATCHED_DESTINATION_NETWORK": - case 14: - message.cause = 14; - break; - case "UNKNOWN_IP": - case 2: - message.cause = 2; - break; - case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": - case 32: - message.cause = 32; - break; - case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": - case 23: - message.cause = 23; - break; - case "PERMISSION_DENIED": - case 4: - message.cause = 4; - break; - case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": - case 28: - message.cause = 28; - break; - case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": - case 29: - message.cause = 29; - break; - case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": - case 36: - message.cause = 36; - break; - case "NO_SOURCE_LOCATION": - case 5: - message.cause = 5; - break; - case "INVALID_ARGUMENT": - case 6: - message.cause = 6; - break; - case "TRACE_TOO_LONG": - case 9: - message.cause = 9; - break; - case "INTERNAL_ERROR": - case 10: - message.cause = 10; - break; - case "UNSUPPORTED": - case 15: - message.cause = 15; - break; - case "MISMATCHED_IP_VERSION": - case 16: - message.cause = 16; - break; - case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": - case 17: - message.cause = 17; - break; - case "RESOURCE_CONFIG_NOT_FOUND": - case 18: - message.cause = 18; - break; - case "VM_INSTANCE_CONFIG_NOT_FOUND": - case 24: - message.cause = 24; - break; - case "NETWORK_CONFIG_NOT_FOUND": - case 25: - message.cause = 25; - break; - case "FIREWALL_CONFIG_NOT_FOUND": - case 26: - message.cause = 26; - break; - case "ROUTE_CONFIG_NOT_FOUND": - case 27: - message.cause = 27; - break; - case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": - case 19: - message.cause = 19; - break; - case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": - case 20: - message.cause = 20; - break; - case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": - case 34: - message.cause = 34; - break; - case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": - case 35: - message.cause = 35; - break; - case "SOURCE_FORWARDING_RULE_UNSUPPORTED": - case 21: - message.cause = 21; - break; - case "NON_ROUTABLE_IP_ADDRESS": - case 22: - message.cause = 22; - break; - case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": - case 30: - message.cause = 30; - break; - case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": - case 31: - message.cause = 31; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.projectsMissingPermission) { - if (!Array.isArray(object.projectsMissingPermission)) - throw TypeError(".google.cloud.networkmanagement.v1.AbortInfo.projectsMissingPermission: array expected"); - message.projectsMissingPermission = []; - for (var i = 0; i < object.projectsMissingPermission.length; ++i) - message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); - } - return message; - }; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.AbortInfo} message AbortInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AbortInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.projectsMissingPermission = []; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.projectsMissingPermission && message.projectsMissingPermission.length) { - object.projectsMissingPermission = []; - for (var j = 0; j < message.projectsMissingPermission.length; ++j) - object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this AbortInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - * @returns {Object.} JSON object - */ - AbortInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AbortInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AbortInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1.AbortInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value - * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value - * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value - * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value - * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value - * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value - * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value - * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value - * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value - * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value - * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value - * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value - * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value - * @property {number} UNSUPPORTED=15 UNSUPPORTED value - * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value - * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value - * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value - * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value - * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value - * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value - * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value - * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value - * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value - * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value - * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value - * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value - * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value - * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value - * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value - */ - AbortInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; - values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; - values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; - values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; - values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; - values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; - values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; - values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; - values[valuesById[2] = "UNKNOWN_IP"] = 2; - values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; - values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; - values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; - values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; - values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; - values[valuesById[6] = "INVALID_ARGUMENT"] = 6; - values[valuesById[9] = "TRACE_TOO_LONG"] = 9; - values[valuesById[10] = "INTERNAL_ERROR"] = 10; - values[valuesById[15] = "UNSUPPORTED"] = 15; - values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; - values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; - values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; - values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; - values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; - values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; - values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; - values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; - values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; - values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; - values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; - values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; - values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; - values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; - values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; - return values; - })(); - - return AbortInfo; - })(); - - v1.DropInfo = (function() { - - /** - * Properties of a DropInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IDropInfo - * @property {google.cloud.networkmanagement.v1.DropInfo.Cause|null} [cause] DropInfo cause - * @property {string|null} [resourceUri] DropInfo resourceUri - * @property {string|null} [sourceIp] DropInfo sourceIp - * @property {string|null} [destinationIp] DropInfo destinationIp - * @property {string|null} [region] DropInfo region - */ - - /** - * Constructs a new DropInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a DropInfo. - * @implements IDropInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set - */ - function DropInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DropInfo cause. - * @member {google.cloud.networkmanagement.v1.DropInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.cause = 0; - - /** - * DropInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.resourceUri = ""; - - /** - * DropInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.sourceIp = ""; - - /** - * DropInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.destinationIp = ""; - - /** - * DropInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.region = ""; - - /** - * Creates a new DropInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo instance - */ - DropInfo.create = function create(properties) { - return new DropInfo(properties); - }; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); - return writer; - }; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DropInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.sourceIp = reader.string(); - break; - } - case 4: { - message.destinationIp = reader.string(); - break; - } - case 5: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DropInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DropInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 42: - case 43: - case 49: - case 50: - case 51: - case 52: - case 53: - case 44: - case 45: - case 46: - case 7: - case 8: - case 47: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 27: - case 28: - case 68: - case 69: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 38: - case 36: - case 21: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 63: - case 22: - case 23: - case 24: - case 60: - case 61: - case 25: - case 26: - case 41: - case 48: - case 54: - case 58: - case 57: - case 64: - case 55: - case 56: - case 29: - case 37: - case 39: - case 40: - case 59: - case 62: - case 65: - case 66: - case 67: - case 70: - case 71: - case 72: - case 73: - case 74: - case 78: - case 75: - case 76: - case 77: - case 79: - case 80: - case 81: - case 82: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo - */ - DropInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.DropInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.DropInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_EXTERNAL_ADDRESS": - case 1: - message.cause = 1; - break; - case "FOREIGN_IP_DISALLOWED": - case 2: - message.cause = 2; - break; - case "FIREWALL_RULE": - case 3: - message.cause = 3; - break; - case "NO_ROUTE": - case 4: - message.cause = 4; - break; - case "ROUTE_BLACKHOLE": - case 5: - message.cause = 5; - break; - case "ROUTE_WRONG_NETWORK": - case 6: - message.cause = 6; - break; - case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": - case 42: - message.cause = 42; - break; - case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": - case 43: - message.cause = 43; - break; - case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": - case 49: - message.cause = 49; - break; - case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": - case 50: - message.cause = 50; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": - case 51: - message.cause = 51; - break; - case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": - case 52: - message.cause = 52; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": - case 53: - message.cause = 53; - break; - case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": - case 44: - message.cause = 44; - break; - case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": - case 45: - message.cause = 45; - break; - case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": - case 46: - message.cause = 46; - break; - case "PRIVATE_TRAFFIC_TO_INTERNET": - case 7: - message.cause = 7; - break; - case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": - case 8: - message.cause = 8; - break; - case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": - case 47: - message.cause = 47; - break; - case "NO_EXTERNAL_ADDRESS": - case 9: - message.cause = 9; - break; - case "UNKNOWN_INTERNAL_ADDRESS": - case 10: - message.cause = 10; - break; - case "FORWARDING_RULE_MISMATCH": - case 11: - message.cause = 11; - break; - case "FORWARDING_RULE_NO_INSTANCES": - case 12: - message.cause = 12; - break; - case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": - case 13: - message.cause = 13; - break; - case "INSTANCE_NOT_RUNNING": - case 14: - message.cause = 14; - break; - case "GKE_CLUSTER_NOT_RUNNING": - case 27: - message.cause = 27; - break; - case "CLOUD_SQL_INSTANCE_NOT_RUNNING": - case 28: - message.cause = 28; - break; - case "REDIS_INSTANCE_NOT_RUNNING": - case 68: - message.cause = 68; - break; - case "REDIS_CLUSTER_NOT_RUNNING": - case 69: - message.cause = 69; - break; - case "TRAFFIC_TYPE_BLOCKED": - case 15: - message.cause = 15; - break; - case "GKE_MASTER_UNAUTHORIZED_ACCESS": - case 16: - message.cause = 16; - break; - case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": - case 17: - message.cause = 17; - break; - case "DROPPED_INSIDE_GKE_SERVICE": - case 18: - message.cause = 18; - break; - case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": - case 19: - message.cause = 19; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PEERING": - case 20: - message.cause = 20; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": - case 38: - message.cause = 38; - break; - case "GKE_PSC_ENDPOINT_MISSING": - case 36: - message.cause = 36; - break; - case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": - case 21: - message.cause = 21; - break; - case "GKE_CONTROL_PLANE_REGION_MISMATCH": - case 30: - message.cause = 30; - break; - case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": - case 31: - message.cause = 31; - break; - case "GKE_CONTROL_PLANE_NO_ROUTE": - case 32: - message.cause = 32; - break; - case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": - case 33: - message.cause = 33; - break; - case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": - case 34: - message.cause = 34; - break; - case "CLOUD_SQL_INSTANCE_NO_ROUTE": - case 35: - message.cause = 35; - break; - case "CLOUD_SQL_CONNECTOR_REQUIRED": - case 63: - message.cause = 63; - break; - case "CLOUD_FUNCTION_NOT_ACTIVE": - case 22: - message.cause = 22; - break; - case "VPC_CONNECTOR_NOT_SET": - case 23: - message.cause = 23; - break; - case "VPC_CONNECTOR_NOT_RUNNING": - case 24: - message.cause = 24; - break; - case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": - case 60: - message.cause = 60; - break; - case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": - case 61: - message.cause = 61; - break; - case "FORWARDING_RULE_REGION_MISMATCH": - case 25: - message.cause = 25; - break; - case "PSC_CONNECTION_NOT_ACCEPTED": - case 26: - message.cause = 26; - break; - case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": - case 41: - message.cause = 41; - break; - case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": - case 48: - message.cause = 48; - break; - case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": - case 54: - message.cause = 54; - break; - case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": - case 58: - message.cause = 58; - break; - case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": - case 57: - message.cause = 57; - break; - case "PSC_TRANSITIVITY_NOT_PROPAGATED": - case 64: - message.cause = 64; - break; - case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": - case 55: - message.cause = 55; - break; - case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": - case 56: - message.cause = 56; - break; - case "CLOUD_RUN_REVISION_NOT_READY": - case 29: - message.cause = 29; - break; - case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": - case 37: - message.cause = 37; - break; - case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": - case 39: - message.cause = 39; - break; - case "CLOUD_NAT_NO_ADDRESSES": - case 40: - message.cause = 40; - break; - case "ROUTING_LOOP": - case 59: - message.cause = 59; - break; - case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": - case 62: - message.cause = 62; - break; - case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": - case 65: - message.cause = 65; - break; - case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": - case 66: - message.cause = 66; - break; - case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": - case 67: - message.cause = 67; - break; - case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": - case 70: - message.cause = 70; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PORT": - case 71: - message.cause = 71; - break; - case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": - case 72: - message.cause = 72; - break; - case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": - case 73: - message.cause = 73; - break; - case "REDIS_INSTANCE_NO_EXTERNAL_IP": - case 74: - message.cause = 74; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": - case 78: - message.cause = 78; - break; - case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": - case 75: - message.cause = 75; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PORT": - case 76: - message.cause = 76; - break; - case "REDIS_CLUSTER_NO_EXTERNAL_IP": - case 77: - message.cause = 77; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": - case 79: - message.cause = 79; - break; - case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": - case 80: - message.cause = 80; - break; - case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": - case 81: - message.cause = 81; - break; - case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": - case 82: - message.cause = 82; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.DropInfo} message DropInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DropInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.sourceIp = ""; - object.destinationIp = ""; - object.region = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this DropInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - * @returns {Object.} JSON object - */ - DropInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DropInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DropInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1.DropInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value - * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value - * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value - * @property {number} NO_ROUTE=4 NO_ROUTE value - * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value - * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value - * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value - * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value - * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value - * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value - * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value - * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value - * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value - * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value - * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value - * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value - * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value - * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value - * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value - * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value - * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value - * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value - * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value - * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value - * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value - * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value - * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value - * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value - * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value - * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value - * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value - * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value - * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value - * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value - * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value - * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value - * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value - * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value - * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value - * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value - * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value - * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value - * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value - * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value - * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value - * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value - * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value - * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value - * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value - * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value - * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value - * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value - * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value - * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value - * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value - * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value - * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value - * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value - * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value - * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value - * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value - * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value - * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value - * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value - * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value - * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value - * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value - * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value - * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value - */ - DropInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; - values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; - values[valuesById[3] = "FIREWALL_RULE"] = 3; - values[valuesById[4] = "NO_ROUTE"] = 4; - values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; - values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; - values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; - values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; - values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; - values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; - values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; - values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; - values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; - values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; - values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; - values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; - values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; - values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; - values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; - values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; - values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; - values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; - values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; - values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; - values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; - values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; - values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; - values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; - values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; - values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; - values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; - values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; - values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; - values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; - values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; - values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; - values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; - values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; - values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; - values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; - values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; - values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; - values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; - values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; - values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; - values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; - values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; - values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; - values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; - values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; - values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; - values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; - values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; - values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; - values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; - values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; - values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; - values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; - values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; - values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; - values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; - values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; - values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; - values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; - values[valuesById[59] = "ROUTING_LOOP"] = 59; - values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; - values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; - values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; - values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; - values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; - values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; - values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; - values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; - values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; - values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; - values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; - values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; - values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; - values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; - values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; - values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; - values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; - return values; - })(); - - return DropInfo; - })(); - - v1.GKEMasterInfo = (function() { - - /** - * Properties of a GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IGKEMasterInfo - * @property {string|null} [clusterUri] GKEMasterInfo clusterUri - * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri - * @property {string|null} [internalIp] GKEMasterInfo internalIp - * @property {string|null} [externalIp] GKEMasterInfo externalIp - */ - - /** - * Constructs a new GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a GKEMasterInfo. - * @implements IGKEMasterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set - */ - function GKEMasterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GKEMasterInfo clusterUri. - * @member {string} clusterUri - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterUri = ""; - - /** - * GKEMasterInfo clusterNetworkUri. - * @member {string} clusterNetworkUri - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterNetworkUri = ""; - - /** - * GKEMasterInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.internalIp = ""; - - /** - * GKEMasterInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.externalIp = ""; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo instance - */ - GKEMasterInfo.create = function create(properties) { - return new GKEMasterInfo(properties); - }; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); - if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - return writer; - }; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.clusterUri = reader.string(); - break; - } - case 4: { - message.clusterNetworkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GKEMasterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GKEMasterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - if (!$util.isString(message.clusterUri)) - return "clusterUri: string expected"; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - if (!$util.isString(message.clusterNetworkUri)) - return "clusterNetworkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - return null; - }; - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo - */ - GKEMasterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.GKEMasterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); - if (object.clusterUri != null) - message.clusterUri = String(object.clusterUri); - if (object.clusterNetworkUri != null) - message.clusterNetworkUri = String(object.clusterNetworkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - return message; - }; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.GKEMasterInfo} message GKEMasterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GKEMasterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterUri = ""; - object.clusterNetworkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - } - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - object.clusterUri = message.clusterUri; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - object.clusterNetworkUri = message.clusterNetworkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - return object; - }; - - /** - * Converts this GKEMasterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - * @returns {Object.} JSON object - */ - GKEMasterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GKEMasterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GKEMasterInfo"; - }; - - return GKEMasterInfo; - })(); - - v1.CloudSQLInstanceInfo = (function() { - - /** - * Properties of a CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICloudSQLInstanceInfo - * @property {string|null} [displayName] CloudSQLInstanceInfo displayName - * @property {string|null} [uri] CloudSQLInstanceInfo uri - * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri - * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp - * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp - * @property {string|null} [region] CloudSQLInstanceInfo region - */ - - /** - * Constructs a new CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CloudSQLInstanceInfo. - * @implements ICloudSQLInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set - */ - function CloudSQLInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudSQLInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.displayName = ""; - - /** - * CloudSQLInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.uri = ""; - - /** - * CloudSQLInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.networkUri = ""; - - /** - * CloudSQLInstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.internalIp = ""; - - /** - * CloudSQLInstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.externalIp = ""; - - /** - * CloudSQLInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.region = ""; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance - */ - CloudSQLInstanceInfo.create = function create(properties) { - return new CloudSQLInstanceInfo(properties); - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); - return writer; - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudSQLInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - */ - CloudSQLInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudSQLInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudSQLInstanceInfo"; - }; - - return CloudSQLInstanceInfo; - })(); - - v1.RedisInstanceInfo = (function() { - - /** - * Properties of a RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRedisInstanceInfo - * @property {string|null} [displayName] RedisInstanceInfo displayName - * @property {string|null} [uri] RedisInstanceInfo uri - * @property {string|null} [networkUri] RedisInstanceInfo networkUri - * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp - * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp - * @property {string|null} [region] RedisInstanceInfo region - */ - - /** - * Constructs a new RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RedisInstanceInfo. - * @implements IRedisInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set - */ - function RedisInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.displayName = ""; - - /** - * RedisInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.uri = ""; - - /** - * RedisInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.networkUri = ""; - - /** - * RedisInstanceInfo primaryEndpointIp. - * @member {string} primaryEndpointIp - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.primaryEndpointIp = ""; - - /** - * RedisInstanceInfo readEndpointIp. - * @member {string} readEndpointIp - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.readEndpointIp = ""; - - /** - * RedisInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.region = ""; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo instance - */ - RedisInstanceInfo.create = function create(properties) { - return new RedisInstanceInfo(properties); - }; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); - if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.primaryEndpointIp = reader.string(); - break; - } - case 5: { - message.readEndpointIp = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - if (!$util.isString(message.primaryEndpointIp)) - return "primaryEndpointIp: string expected"; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - if (!$util.isString(message.readEndpointIp)) - return "readEndpointIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo - */ - RedisInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RedisInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.primaryEndpointIp != null) - message.primaryEndpointIp = String(object.primaryEndpointIp); - if (object.readEndpointIp != null) - message.readEndpointIp = String(object.readEndpointIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.RedisInstanceInfo} message RedisInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.primaryEndpointIp = ""; - object.readEndpointIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - object.primaryEndpointIp = message.primaryEndpointIp; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - object.readEndpointIp = message.readEndpointIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - RedisInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisInstanceInfo"; - }; - - return RedisInstanceInfo; - })(); - - v1.RedisClusterInfo = (function() { - - /** - * Properties of a RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRedisClusterInfo - * @property {string|null} [displayName] RedisClusterInfo displayName - * @property {string|null} [uri] RedisClusterInfo uri - * @property {string|null} [networkUri] RedisClusterInfo networkUri - * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress - * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress - * @property {string|null} [location] RedisClusterInfo location - */ - - /** - * Constructs a new RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RedisClusterInfo. - * @implements IRedisClusterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set - */ - function RedisClusterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisClusterInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.displayName = ""; - - /** - * RedisClusterInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.uri = ""; - - /** - * RedisClusterInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.networkUri = ""; - - /** - * RedisClusterInfo discoveryEndpointIpAddress. - * @member {string} discoveryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; - - /** - * RedisClusterInfo secondaryEndpointIpAddress. - * @member {string} secondaryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; - - /** - * RedisClusterInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.location = ""; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo instance - */ - RedisClusterInfo.create = function create(properties) { - return new RedisClusterInfo(properties); - }; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); - if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); - return writer; - }; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.discoveryEndpointIpAddress = reader.string(); - break; - } - case 5: { - message.secondaryEndpointIpAddress = reader.string(); - break; - } - case 6: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisClusterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisClusterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - if (!$util.isString(message.discoveryEndpointIpAddress)) - return "discoveryEndpointIpAddress: string expected"; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - if (!$util.isString(message.secondaryEndpointIpAddress)) - return "secondaryEndpointIpAddress: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo - */ - RedisClusterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RedisClusterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.discoveryEndpointIpAddress != null) - message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); - if (object.secondaryEndpointIpAddress != null) - message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.RedisClusterInfo} message RedisClusterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisClusterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.discoveryEndpointIpAddress = ""; - object.secondaryEndpointIpAddress = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this RedisClusterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - * @returns {Object.} JSON object - */ - RedisClusterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisClusterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisClusterInfo"; - }; - - return RedisClusterInfo; - })(); - - v1.CloudFunctionInfo = (function() { - - /** - * Properties of a CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICloudFunctionInfo - * @property {string|null} [displayName] CloudFunctionInfo displayName - * @property {string|null} [uri] CloudFunctionInfo uri - * @property {string|null} [location] CloudFunctionInfo location - * @property {number|Long|null} [versionId] CloudFunctionInfo versionId - */ - - /** - * Constructs a new CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CloudFunctionInfo. - * @implements ICloudFunctionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set - */ - function CloudFunctionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.displayName = ""; - - /** - * CloudFunctionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.uri = ""; - - /** - * CloudFunctionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.location = ""; - - /** - * CloudFunctionInfo versionId. - * @member {number|Long} versionId - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo instance - */ - CloudFunctionInfo.create = function create(properties) { - return new CloudFunctionInfo(properties); - }; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); - return writer; - }; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - case 4: { - message.versionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) - return "versionId: integer|Long expected"; - return null; - }; - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo - */ - CloudFunctionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CloudFunctionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.versionId != null) - if ($util.Long) - (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; - else if (typeof object.versionId === "string") - message.versionId = parseInt(object.versionId, 10); - else if (typeof object.versionId === "number") - message.versionId = object.versionId; - else if (typeof object.versionId === "object") - message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.CloudFunctionInfo} message CloudFunctionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionId = options.longs === String ? "0" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (typeof message.versionId === "number") - object.versionId = options.longs === String ? String(message.versionId) : message.versionId; - else - object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; - return object; - }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudFunctionInfo"; - }; - - return CloudFunctionInfo; - })(); - - v1.CloudRunRevisionInfo = (function() { - - /** - * Properties of a CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICloudRunRevisionInfo - * @property {string|null} [displayName] CloudRunRevisionInfo displayName - * @property {string|null} [uri] CloudRunRevisionInfo uri - * @property {string|null} [location] CloudRunRevisionInfo location - * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri - */ - - /** - * Constructs a new CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CloudRunRevisionInfo. - * @implements ICloudRunRevisionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set - */ - function CloudRunRevisionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.displayName = ""; - - /** - * CloudRunRevisionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.uri = ""; - - /** - * CloudRunRevisionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.location = ""; - - /** - * CloudRunRevisionInfo serviceUri. - * @member {string} serviceUri - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.serviceUri = ""; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo instance - */ - CloudRunRevisionInfo.create = function create(properties) { - return new CloudRunRevisionInfo(properties); - }; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - case 5: { - message.serviceUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - if (!$util.isString(message.serviceUri)) - return "serviceUri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo - */ - CloudRunRevisionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.serviceUri != null) - message.serviceUri = String(object.serviceUri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} message CloudRunRevisionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - object.serviceUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - object.serviceUri = message.serviceUri; - return object; - }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudRunRevisionInfo"; - }; - - return CloudRunRevisionInfo; - })(); - - v1.AppEngineVersionInfo = (function() { - - /** - * Properties of an AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IAppEngineVersionInfo - * @property {string|null} [displayName] AppEngineVersionInfo displayName - * @property {string|null} [uri] AppEngineVersionInfo uri - * @property {string|null} [runtime] AppEngineVersionInfo runtime - * @property {string|null} [environment] AppEngineVersionInfo environment - */ - - /** - * Constructs a new AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an AppEngineVersionInfo. - * @implements IAppEngineVersionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set - */ - function AppEngineVersionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.displayName = ""; - - /** - * AppEngineVersionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.uri = ""; - - /** - * AppEngineVersionInfo runtime. - * @member {string} runtime - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.runtime = ""; - - /** - * AppEngineVersionInfo environment. - * @member {string} environment - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.environment = ""; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo instance - */ - AppEngineVersionInfo.create = function create(properties) { - return new AppEngineVersionInfo(properties); - }; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.runtime = reader.string(); - break; - } - case 4: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.runtime != null && message.hasOwnProperty("runtime")) - if (!$util.isString(message.runtime)) - return "runtime: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo - */ - AppEngineVersionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.runtime != null) - message.runtime = String(object.runtime); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.AppEngineVersionInfo} message AppEngineVersionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.runtime = ""; - object.environment = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.runtime != null && message.hasOwnProperty("runtime")) - object.runtime = message.runtime; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AppEngineVersionInfo"; - }; - - return AppEngineVersionInfo; - })(); - - v1.VpcConnectorInfo = (function() { - - /** - * Properties of a VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IVpcConnectorInfo - * @property {string|null} [displayName] VpcConnectorInfo displayName - * @property {string|null} [uri] VpcConnectorInfo uri - * @property {string|null} [location] VpcConnectorInfo location - */ - - /** - * Constructs a new VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a VpcConnectorInfo. - * @implements IVpcConnectorInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set - */ - function VpcConnectorInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpcConnectorInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.displayName = ""; - - /** - * VpcConnectorInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.uri = ""; - - /** - * VpcConnectorInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.location = ""; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo instance - */ - VpcConnectorInfo.create = function create(properties) { - return new VpcConnectorInfo(properties); - }; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - return writer; - }; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcConnectorInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcConnectorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo - */ - VpcConnectorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.VpcConnectorInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.VpcConnectorInfo} message VpcConnectorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcConnectorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - * @returns {Object.} JSON object - */ - VpcConnectorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcConnectorInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpcConnectorInfo"; - }; - - return VpcConnectorInfo; - })(); - - v1.NatInfo = (function() { - - /** - * Properties of a NatInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface INatInfo - * @property {google.cloud.networkmanagement.v1.NatInfo.Type|null} [type] NatInfo type - * @property {string|null} [protocol] NatInfo protocol - * @property {string|null} [networkUri] NatInfo networkUri - * @property {string|null} [oldSourceIp] NatInfo oldSourceIp - * @property {string|null} [newSourceIp] NatInfo newSourceIp - * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp - * @property {string|null} [newDestinationIp] NatInfo newDestinationIp - * @property {number|null} [oldSourcePort] NatInfo oldSourcePort - * @property {number|null} [newSourcePort] NatInfo newSourcePort - * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort - * @property {number|null} [newDestinationPort] NatInfo newDestinationPort - * @property {string|null} [routerUri] NatInfo routerUri - * @property {string|null} [natGatewayName] NatInfo natGatewayName - */ - - /** - * Constructs a new NatInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a NatInfo. - * @implements INatInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set - */ - function NatInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NatInfo type. - * @member {google.cloud.networkmanagement.v1.NatInfo.Type} type - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.type = 0; - - /** - * NatInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.protocol = ""; - - /** - * NatInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.networkUri = ""; - - /** - * NatInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourceIp = ""; - - /** - * NatInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newSourceIp = ""; - - /** - * NatInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationIp = ""; - - /** - * NatInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationIp = ""; - - /** - * NatInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourcePort = 0; - - /** - * NatInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newSourcePort = 0; - - /** - * NatInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationPort = 0; - - /** - * NatInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationPort = 0; - - /** - * NatInfo routerUri. - * @member {string} routerUri - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.routerUri = ""; - - /** - * NatInfo natGatewayName. - * @member {string} natGatewayName - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.natGatewayName = ""; - - /** - * Creates a new NatInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo instance - */ - NatInfo.create = function create(properties) { - return new NatInfo(properties); - }; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); - if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); - if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); - return writer; - }; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NatInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.protocol = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.oldSourceIp = reader.string(); - break; - } - case 5: { - message.newSourceIp = reader.string(); - break; - } - case 6: { - message.oldDestinationIp = reader.string(); - break; - } - case 7: { - message.newDestinationIp = reader.string(); - break; - } - case 8: { - message.oldSourcePort = reader.int32(); - break; - } - case 9: { - message.newSourcePort = reader.int32(); - break; - } - case 10: { - message.oldDestinationPort = reader.int32(); - break; - } - case 11: { - message.newDestinationPort = reader.int32(); - break; - } - case 12: { - message.routerUri = reader.string(); - break; - } - case 13: { - message.natGatewayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NatInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NatInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - if (!$util.isString(message.routerUri)) - return "routerUri: string expected"; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - if (!$util.isString(message.natGatewayName)) - return "natGatewayName: string expected"; - return null; - }; - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo - */ - NatInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.NatInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.NatInfo(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INTERNAL_TO_EXTERNAL": - case 1: - message.type = 1; - break; - case "EXTERNAL_TO_INTERNAL": - case 2: - message.type = 2; - break; - case "CLOUD_NAT": - case 3: - message.type = 3; - break; - case "PRIVATE_SERVICE_CONNECT": - case 4: - message.type = 4; - break; - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.routerUri != null) - message.routerUri = String(object.routerUri); - if (object.natGatewayName != null) - message.natGatewayName = String(object.natGatewayName); - return message; - }; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.NatInfo} message NatInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NatInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.protocol = ""; - object.networkUri = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.routerUri = ""; - object.natGatewayName = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] : message.type; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - object.routerUri = message.routerUri; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - object.natGatewayName = message.natGatewayName; - return object; - }; - - /** - * Converts this NatInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - * @returns {Object.} JSON object - */ - NatInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NatInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NatInfo"; - }; - - /** - * Type enum. - * @name google.cloud.networkmanagement.v1.NatInfo.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value - * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value - * @property {number} CLOUD_NAT=3 CLOUD_NAT value - * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value - */ - NatInfo.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; - values[valuesById[3] = "CLOUD_NAT"] = 3; - values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; - return values; - })(); - - return NatInfo; - })(); - - v1.ProxyConnectionInfo = (function() { - - /** - * Properties of a ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IProxyConnectionInfo - * @property {string|null} [protocol] ProxyConnectionInfo protocol - * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp - * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp - * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp - * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp - * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort - * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort - * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort - * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort - * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri - * @property {string|null} [networkUri] ProxyConnectionInfo networkUri - */ - - /** - * Constructs a new ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ProxyConnectionInfo. - * @implements IProxyConnectionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set - */ - function ProxyConnectionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProxyConnectionInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.protocol = ""; - - /** - * ProxyConnectionInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourceIp = ""; - - /** - * ProxyConnectionInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourceIp = ""; - - /** - * ProxyConnectionInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationIp = ""; - - /** - * ProxyConnectionInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationIp = ""; - - /** - * ProxyConnectionInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourcePort = 0; - - /** - * ProxyConnectionInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourcePort = 0; - - /** - * ProxyConnectionInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationPort = 0; - - /** - * ProxyConnectionInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationPort = 0; - - /** - * ProxyConnectionInfo subnetUri. - * @member {string} subnetUri - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.subnetUri = ""; - - /** - * ProxyConnectionInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.networkUri = ""; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo instance - */ - ProxyConnectionInfo.create = function create(properties) { - return new ProxyConnectionInfo(properties); - }; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); - if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); - return writer; - }; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.protocol = reader.string(); - break; - } - case 2: { - message.oldSourceIp = reader.string(); - break; - } - case 3: { - message.newSourceIp = reader.string(); - break; - } - case 4: { - message.oldDestinationIp = reader.string(); - break; - } - case 5: { - message.newDestinationIp = reader.string(); - break; - } - case 6: { - message.oldSourcePort = reader.int32(); - break; - } - case 7: { - message.newSourcePort = reader.int32(); - break; - } - case 8: { - message.oldDestinationPort = reader.int32(); - break; - } - case 9: { - message.newDestinationPort = reader.int32(); - break; - } - case 10: { - message.subnetUri = reader.string(); - break; - } - case 11: { - message.networkUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProxyConnectionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProxyConnectionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - if (!$util.isString(message.subnetUri)) - return "subnetUri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - return null; - }; - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo - */ - ProxyConnectionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.subnetUri != null) - message.subnetUri = String(object.subnetUri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - return message; - }; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ProxyConnectionInfo} message ProxyConnectionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProxyConnectionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.protocol = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.subnetUri = ""; - object.networkUri = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - object.subnetUri = message.subnetUri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - return object; - }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - * @returns {Object.} JSON object - */ - ProxyConnectionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProxyConnectionInfo"; - }; - - return ProxyConnectionInfo; - })(); - - v1.LoadBalancerBackendInfo = (function() { - - /** - * Properties of a LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILoadBalancerBackendInfo - * @property {string|null} [name] LoadBalancerBackendInfo name - * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri - * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri - * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri - * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri - * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri - * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget - * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri - * @property {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState - */ - - /** - * Constructs a new LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LoadBalancerBackendInfo. - * @implements ILoadBalancerBackendInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set - */ - function LoadBalancerBackendInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackendInfo name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.name = ""; - - /** - * LoadBalancerBackendInfo instanceUri. - * @member {string} instanceUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceUri = ""; - - /** - * LoadBalancerBackendInfo backendServiceUri. - * @member {string} backendServiceUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendServiceUri = ""; - - /** - * LoadBalancerBackendInfo instanceGroupUri. - * @member {string} instanceGroupUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; - - /** - * LoadBalancerBackendInfo networkEndpointGroupUri. - * @member {string} networkEndpointGroupUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; - - /** - * LoadBalancerBackendInfo backendBucketUri. - * @member {string} backendBucketUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendBucketUri = ""; - - /** - * LoadBalancerBackendInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * LoadBalancerBackendInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; - - /** - * LoadBalancerBackendInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerBackendInfo healthCheckFirewallsConfigState. - * @member {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance - */ - LoadBalancerBackendInfo.create = function create(properties) { - return new LoadBalancerBackendInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); - if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); - if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); - if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); - if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); - if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.instanceUri = reader.string(); - break; - } - case 3: { - message.backendServiceUri = reader.string(); - break; - } - case 4: { - message.instanceGroupUri = reader.string(); - break; - } - case 5: { - message.networkEndpointGroupUri = reader.string(); - break; - } - case 8: { - message.backendBucketUri = reader.string(); - break; - } - case 9: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 10: { - message.pscGoogleApiTarget = reader.string(); - break; - } - case 6: { - message.healthCheckUri = reader.string(); - break; - } - case 7: { - message.healthCheckFirewallsConfigState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackendInfo.verify = function verify(message) { - if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) - if (!$util.isString(message.instanceUri)) - return "instanceUri: string expected"; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - if (!$util.isString(message.backendServiceUri)) - return "backendServiceUri: string expected"; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - if (!$util.isString(message.instanceGroupUri)) - return "instanceGroupUri: string expected"; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - if (!$util.isString(message.networkEndpointGroupUri)) - return "networkEndpointGroupUri: string expected"; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - if (!$util.isString(message.backendBucketUri)) - return "backendBucketUri: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - switch (message.healthCheckFirewallsConfigState) { - default: - return "healthCheckFirewallsConfigState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - */ - LoadBalancerBackendInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.instanceUri != null) - message.instanceUri = String(object.instanceUri); - if (object.backendServiceUri != null) - message.backendServiceUri = String(object.backendServiceUri); - if (object.instanceGroupUri != null) - message.instanceGroupUri = String(object.instanceGroupUri); - if (object.networkEndpointGroupUri != null) - message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); - if (object.backendBucketUri != null) - message.backendBucketUri = String(object.backendBucketUri); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - switch (object.healthCheckFirewallsConfigState) { - default: - if (typeof object.healthCheckFirewallsConfigState === "number") { - message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; - break; - } - break; - case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallsConfigState = 0; - break; - case "FIREWALLS_CONFIGURED": - case 1: - message.healthCheckFirewallsConfigState = 1; - break; - case "FIREWALLS_PARTIALLY_CONFIGURED": - case 2: - message.healthCheckFirewallsConfigState = 2; - break; - case "FIREWALLS_NOT_CONFIGURED": - case 3: - message.healthCheckFirewallsConfigState = 3; - break; - case "FIREWALLS_UNSUPPORTED": - case 4: - message.healthCheckFirewallsConfigState = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackendInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.instanceUri = ""; - object.backendServiceUri = ""; - object.instanceGroupUri = ""; - object.networkEndpointGroupUri = ""; - object.healthCheckUri = ""; - object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; - object.backendBucketUri = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) - object.instanceUri = message.instanceUri; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - object.backendServiceUri = message.backendServiceUri; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - object.instanceGroupUri = message.instanceGroupUri; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - object.networkEndpointGroupUri = message.networkEndpointGroupUri; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - object.backendBucketUri = message.backendBucketUri; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackendInfo"; - }; - - /** - * HealthCheckFirewallsConfigState enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value - * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value - * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value - * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value - * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value - */ - LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; - values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; - values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; - values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; - return values; - })(); - - return LoadBalancerBackendInfo; - })(); - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value - * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value - * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value - * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value - * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value - * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value - * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value - * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value - * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value - * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value - */ - v1.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; - values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; - values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; - values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; - values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; - values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; - values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; - values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; - values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; - values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; - return values; - })(); - - v1.StorageBucketInfo = (function() { - - /** - * Properties of a StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IStorageBucketInfo - * @property {string|null} [bucket] StorageBucketInfo bucket - */ - - /** - * Constructs a new StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a StorageBucketInfo. - * @implements IStorageBucketInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set - */ - function StorageBucketInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageBucketInfo bucket. - * @member {string} bucket - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @instance - */ - StorageBucketInfo.prototype.bucket = ""; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo instance - */ - StorageBucketInfo.create = function create(properties) { - return new StorageBucketInfo(properties); - }; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - return writer; - }; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageBucketInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageBucketInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - return null; - }; - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo - */ - StorageBucketInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.StorageBucketInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); - if (object.bucket != null) - message.bucket = String(object.bucket); - return message; - }; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.StorageBucketInfo} message StorageBucketInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageBucketInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bucket = ""; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - return object; - }; - - /** - * Converts this StorageBucketInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @instance - * @returns {Object.} JSON object - */ - StorageBucketInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageBucketInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.StorageBucketInfo"; - }; - - return StorageBucketInfo; - })(); - - v1.ServerlessNegInfo = (function() { - - /** - * Properties of a ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IServerlessNegInfo - * @property {string|null} [negUri] ServerlessNegInfo negUri - */ - - /** - * Constructs a new ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ServerlessNegInfo. - * @implements IServerlessNegInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set - */ - function ServerlessNegInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerlessNegInfo negUri. - * @member {string} negUri - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @instance - */ - ServerlessNegInfo.prototype.negUri = ""; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo instance - */ - ServerlessNegInfo.create = function create(properties) { - return new ServerlessNegInfo(properties); - }; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); - return writer; - }; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.negUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerlessNegInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerlessNegInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.negUri != null && message.hasOwnProperty("negUri")) - if (!$util.isString(message.negUri)) - return "negUri: string expected"; - return null; - }; - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo - */ - ServerlessNegInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ServerlessNegInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); - if (object.negUri != null) - message.negUri = String(object.negUri); - return message; - }; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.ServerlessNegInfo} message ServerlessNegInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerlessNegInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.negUri = ""; - if (message.negUri != null && message.hasOwnProperty("negUri")) - object.negUri = message.negUri; - return object; - }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @instance - * @returns {Object.} JSON object - */ - ServerlessNegInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerlessNegInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ServerlessNegInfo"; - }; - - return ServerlessNegInfo; - })(); - - v1.ReachabilityService = (function() { - - /** - * Constructs a new ReachabilityService service. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ReachabilityService - * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; - - /** - * Creates new ReachabilityService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. - */ - ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef ListConnectivityTestsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse - */ - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { - return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, request, callback); - }, "name", { value: "ListConnectivityTests" }); - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef GetConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} [response] ConnectivityTest - */ - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { - return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1.ConnectivityTest, request, callback); - }, "name", { value: "GetConnectivityTest" }); - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef CreateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { - return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConnectivityTest" }); - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef UpdateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { - return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateConnectivityTest" }); - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef RerunConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { - return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RerunConnectivityTest" }); - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef DeleteConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { - return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConnectivityTest" }); - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ReachabilityService; - })(); - - v1.ListConnectivityTestsRequest = (function() { - - /** - * Properties of a ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IListConnectivityTestsRequest - * @property {string|null} [parent] ListConnectivityTestsRequest parent - * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize - * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken - * @property {string|null} [filter] ListConnectivityTestsRequest filter - * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy - */ - - /** - * Constructs a new ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ListConnectivityTestsRequest. - * @implements IListConnectivityTestsRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set - */ - function ListConnectivityTestsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListConnectivityTestsRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.parent = ""; - - /** - * ListConnectivityTestsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageSize = 0; - - /** - * ListConnectivityTestsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageToken = ""; - - /** - * ListConnectivityTestsRequest filter. - * @member {string} filter - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.filter = ""; - - /** - * ListConnectivityTestsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance - */ - ListConnectivityTestsRequest.create = function create(properties) { - return new ListConnectivityTestsRequest(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - */ - ListConnectivityTestsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsRequest"; - }; - - return ListConnectivityTestsRequest; - })(); - - v1.ListConnectivityTestsResponse = (function() { - - /** - * Properties of a ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1 - * @interface IListConnectivityTestsResponse - * @property {Array.|null} [resources] ListConnectivityTestsResponse resources - * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable - */ - - /** - * Constructs a new ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ListConnectivityTestsResponse. - * @implements IListConnectivityTestsResponse - * @constructor - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set - */ - function ListConnectivityTestsResponse(properties) { - this.resources = []; - 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]]; - } - - /** - * ListConnectivityTestsResponse resources. - * @member {Array.} resources - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; - - /** - * ListConnectivityTestsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.nextPageToken = ""; - - /** - * ListConnectivityTestsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance - */ - ListConnectivityTestsResponse.create = function create(properties) { - return new ListConnectivityTestsResponse(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.networkmanagement.v1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resources[i]); - if (error) - return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - */ - ListConnectivityTestsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"; - }; - - return ListConnectivityTestsResponse; - })(); - - v1.GetConnectivityTestRequest = (function() { - - /** - * Properties of a GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IGetConnectivityTestRequest - * @property {string|null} [name] GetConnectivityTestRequest name - */ - - /** - * Constructs a new GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a GetConnectivityTestRequest. - * @implements IGetConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set - */ - function GetConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @instance - */ - GetConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest instance - */ - GetConnectivityTestRequest.create = function create(properties) { - return new GetConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encode = function encode(message, writer) { - 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); - 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetConnectivityTestRequest.verify = function verify(message) { - if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest - */ - GetConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} message GetConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - GetConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GetConnectivityTestRequest"; - }; - - return GetConnectivityTestRequest; - })(); - - v1.CreateConnectivityTestRequest = (function() { - - /** - * Properties of a CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICreateConnectivityTestRequest - * @property {string|null} [parent] CreateConnectivityTestRequest parent - * @property {string|null} [testId] CreateConnectivityTestRequest testId - * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource - */ - - /** - * Constructs a new CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CreateConnectivityTestRequest. - * @implements ICreateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set - */ - function CreateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateConnectivityTestRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.parent = ""; - - /** - * CreateConnectivityTestRequest testId. - * @member {string} testId - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.testId = ""; - - /** - * CreateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance - */ - CreateConnectivityTestRequest.create = function create(properties) { - return new CreateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.testId = reader.string(); - break; - } - case 3: { - message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) - if (!$util.isString(message.testId)) - return "testId: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - */ - CreateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.testId != null) - message.testId = String(object.testId); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.testId = ""; - object.resource = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.testId != null && message.hasOwnProperty("testId")) - object.testId = message.testId; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CreateConnectivityTestRequest"; - }; - - return CreateConnectivityTestRequest; - })(); - - v1.UpdateConnectivityTestRequest = (function() { - - /** - * Properties of an UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IUpdateConnectivityTestRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask - * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource - */ - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an UpdateConnectivityTestRequest. - * @implements IUpdateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set - */ - function UpdateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateConnectivityTestRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.updateMask = null; - - /** - * UpdateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance - */ - UpdateConnectivityTestRequest.create = function create(properties) { - return new UpdateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); - 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.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - */ - UpdateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.resource = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest"; - }; - - return UpdateConnectivityTestRequest; - })(); - - v1.DeleteConnectivityTestRequest = (function() { - - /** - * Properties of a DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IDeleteConnectivityTestRequest - * @property {string|null} [name] DeleteConnectivityTestRequest name - */ - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a DeleteConnectivityTestRequest. - * @implements IDeleteConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set - */ - function DeleteConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @instance - */ - DeleteConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance - */ - DeleteConnectivityTestRequest.create = function create(properties) { - return new DeleteConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encode = function encode(message, writer) { - 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); - 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConnectivityTestRequest.verify = function verify(message) { - if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - */ - DeleteConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest"; - }; - - return DeleteConnectivityTestRequest; - })(); - - v1.RerunConnectivityTestRequest = (function() { - - /** - * Properties of a RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRerunConnectivityTestRequest - * @property {string|null} [name] RerunConnectivityTestRequest name - */ - - /** - * Constructs a new RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RerunConnectivityTestRequest. - * @implements IRerunConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set - */ - function RerunConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RerunConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @instance - */ - RerunConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance - */ - RerunConnectivityTestRequest.create = function create(properties) { - return new RerunConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encode = function encode(message, writer) { - 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); - 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RerunConnectivityTestRequest.verify = function verify(message) { - if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - */ - RerunConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RerunConnectivityTestRequest"; - }; - - return RerunConnectivityTestRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.networkmanagement.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} [statusDetail] OperationMetadata statusDetail - * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusDetail = ""; - - /** - * OperationMetadata cancelRequested. - * @member {boolean} cancelRequested - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.cancelRequested = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); - if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusDetail = reader.string(); - break; - } - case 6: { - message.cancelRequested = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - 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.networkmanagement.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - if (typeof message.cancelRequested !== "boolean") - return "cancelRequested: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: 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.networkmanagement.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.networkmanagement.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.cancelRequested != null) - message.cancelRequested = Boolean(object.cancelRequested); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusDetail = ""; - object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - object.cancelRequested = message.cancelRequested; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - return v1; - })(); - - return networkmanagement; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - 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; - })(); - - 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.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; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - 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; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - 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"]); - } - 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.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.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.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - google.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-networkmanagement/v1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json deleted file mode 100644 index ba8311bc60f..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json +++ /dev/null @@ -1,4271 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "networkmanagement": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.NetworkManagement.V1", - "go_package": "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb", - "java_multiple_files": true, - "java_outer_classname": "ReachabilityServiceProto", - "java_package": "com.google.cloud.networkmanagement.v1", - "php_namespace": "Google\\Cloud\\NetworkManagement\\V1", - "ruby_package": "Google::Cloud::NetworkManagement::V1" - }, - "nested": { - "ConnectivityTest": { - "options": { - "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", - "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "source": { - "type": "Endpoint", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destination": { - "type": "Endpoint", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "protocol": { - "type": "string", - "id": 5 - }, - "relatedProjects": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reachabilityDetails": { - "type": "ReachabilityDetails", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "probingDetails": { - "type": "ProbingDetails", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bypassFirewallChecks": { - "type": "bool", - "id": 17 - } - } - }, - "Endpoint": { - "oneofs": { - "_forwardingRuleTarget": { - "oneof": [ - "forwardingRuleTarget" - ] - }, - "_loadBalancerId": { - "oneof": [ - "loadBalancerId" - ] - }, - "_loadBalancerType": { - "oneof": [ - "loadBalancerType" - ] - } - }, - "fields": { - "ipAddress": { - "type": "string", - "id": 1 - }, - "port": { - "type": "int32", - "id": 2 - }, - "instance": { - "type": "string", - "id": 3 - }, - "forwardingRule": { - "type": "string", - "id": 13 - }, - "forwardingRuleTarget": { - "type": "ForwardingRuleTarget", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "gkeMasterCluster": { - "type": "string", - "id": 7 - }, - "cloudSqlInstance": { - "type": "string", - "id": 8 - }, - "redisInstance": { - "type": "string", - "id": 17 - }, - "redisCluster": { - "type": "string", - "id": 18 - }, - "cloudFunction": { - "type": "CloudFunctionEndpoint", - "id": 10 - }, - "appEngineVersion": { - "type": "AppEngineVersionEndpoint", - "id": 11 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionEndpoint", - "id": 12 - }, - "network": { - "type": "string", - "id": 4 - }, - "networkType": { - "type": "NetworkType", - "id": 5 - }, - "projectId": { - "type": "string", - "id": 6 - } - }, - "nested": { - "NetworkType": { - "values": { - "NETWORK_TYPE_UNSPECIFIED": 0, - "GCP_NETWORK": 1, - "NON_GCP_NETWORK": 2 - } - }, - "ForwardingRuleTarget": { - "values": { - "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "LOAD_BALANCER": 2, - "VPN_GATEWAY": 3, - "PSC": 4 - } - }, - "CloudFunctionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "AppEngineVersionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "CloudRunRevisionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - } - } - }, - "ReachabilityDetails": { - "fields": { - "result": { - "type": "Result", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "traces": { - "rule": "repeated", - "type": "Trace", - "id": 5 - } - }, - "nested": { - "Result": { - "values": { - "RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "AMBIGUOUS": 4, - "UNDETERMINED": 5 - } - } - } - }, - "LatencyPercentile": { - "fields": { - "percent": { - "type": "int32", - "id": 1 - }, - "latencyMicros": { - "type": "int64", - "id": 2 - } - } - }, - "LatencyDistribution": { - "fields": { - "latencyPercentiles": { - "rule": "repeated", - "type": "LatencyPercentile", - "id": 1 - } - } - }, - "ProbingDetails": { - "fields": { - "result": { - "type": "ProbingResult", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "abortCause": { - "type": "ProbingAbortCause", - "id": 4 - }, - "sentProbeCount": { - "type": "int32", - "id": 5 - }, - "successfulProbeCount": { - "type": "int32", - "id": 6 - }, - "endpointInfo": { - "type": "EndpointInfo", - "id": 7 - }, - "probingLatency": { - "type": "LatencyDistribution", - "id": 8 - }, - "destinationEgressLocation": { - "type": "EdgeLocation", - "id": 9 - } - }, - "nested": { - "ProbingResult": { - "values": { - "PROBING_RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "REACHABILITY_INCONSISTENT": 3, - "UNDETERMINED": 4 - } - }, - "ProbingAbortCause": { - "values": { - "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, - "PERMISSION_DENIED": 1, - "NO_SOURCE_LOCATION": 2 - } - }, - "EdgeLocation": { - "fields": { - "metropolitanArea": { - "type": "string", - "id": 1 - } - } - } - } - }, - "Trace": { - "fields": { - "endpointInfo": { - "type": "EndpointInfo", - "id": 1 - }, - "steps": { - "rule": "repeated", - "type": "Step", - "id": 2 - }, - "forwardTraceId": { - "type": "int32", - "id": 4 - } - } - }, - "Step": { - "oneofs": { - "stepInfo": { - "oneof": [ - "instance", - "firewall", - "route", - "endpoint", - "googleService", - "forwardingRule", - "vpnGateway", - "vpnTunnel", - "vpcConnector", - "deliver", - "forward", - "abort", - "drop", - "loadBalancer", - "network", - "gkeMaster", - "cloudSqlInstance", - "redisInstance", - "redisCluster", - "cloudFunction", - "appEngineVersion", - "cloudRunRevision", - "nat", - "proxyConnection", - "loadBalancerBackendInfo", - "storageBucket", - "serverlessNeg" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - }, - "causesDrop": { - "type": "bool", - "id": 3 - }, - "projectId": { - "type": "string", - "id": 4 - }, - "instance": { - "type": "InstanceInfo", - "id": 5 - }, - "firewall": { - "type": "FirewallInfo", - "id": 6 - }, - "route": { - "type": "RouteInfo", - "id": 7 - }, - "endpoint": { - "type": "EndpointInfo", - "id": 8 - }, - "googleService": { - "type": "GoogleServiceInfo", - "id": 24 - }, - "forwardingRule": { - "type": "ForwardingRuleInfo", - "id": 9 - }, - "vpnGateway": { - "type": "VpnGatewayInfo", - "id": 10 - }, - "vpnTunnel": { - "type": "VpnTunnelInfo", - "id": 11 - }, - "vpcConnector": { - "type": "VpcConnectorInfo", - "id": 21 - }, - "deliver": { - "type": "DeliverInfo", - "id": 12 - }, - "forward": { - "type": "ForwardInfo", - "id": 13 - }, - "abort": { - "type": "AbortInfo", - "id": 14 - }, - "drop": { - "type": "DropInfo", - "id": 15 - }, - "loadBalancer": { - "type": "LoadBalancerInfo", - "id": 16, - "options": { - "deprecated": true - } - }, - "network": { - "type": "NetworkInfo", - "id": 17 - }, - "gkeMaster": { - "type": "GKEMasterInfo", - "id": 18 - }, - "cloudSqlInstance": { - "type": "CloudSQLInstanceInfo", - "id": 19 - }, - "redisInstance": { - "type": "RedisInstanceInfo", - "id": 30 - }, - "redisCluster": { - "type": "RedisClusterInfo", - "id": 31 - }, - "cloudFunction": { - "type": "CloudFunctionInfo", - "id": 20 - }, - "appEngineVersion": { - "type": "AppEngineVersionInfo", - "id": 22 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionInfo", - "id": 23 - }, - "nat": { - "type": "NatInfo", - "id": 25 - }, - "proxyConnection": { - "type": "ProxyConnectionInfo", - "id": 26 - }, - "loadBalancerBackendInfo": { - "type": "LoadBalancerBackendInfo", - "id": 27 - }, - "storageBucket": { - "type": "StorageBucketInfo", - "id": 28 - }, - "serverlessNeg": { - "type": "ServerlessNegInfo", - "id": 29 - } - }, - "nested": { - "State": { - "valuesOptions": { - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { - "deprecated": true - }, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { - "deprecated": true - } - }, - "values": { - "STATE_UNSPECIFIED": 0, - "START_FROM_INSTANCE": 1, - "START_FROM_INTERNET": 2, - "START_FROM_GOOGLE_SERVICE": 27, - "START_FROM_PRIVATE_NETWORK": 3, - "START_FROM_GKE_MASTER": 21, - "START_FROM_CLOUD_SQL_INSTANCE": 22, - "START_FROM_REDIS_INSTANCE": 32, - "START_FROM_REDIS_CLUSTER": 33, - "START_FROM_CLOUD_FUNCTION": 23, - "START_FROM_APP_ENGINE_VERSION": 25, - "START_FROM_CLOUD_RUN_REVISION": 26, - "START_FROM_STORAGE_BUCKET": 29, - "START_FROM_PSC_PUBLISHED_SERVICE": 30, - "START_FROM_SERVERLESS_NEG": 31, - "APPLY_INGRESS_FIREWALL_RULE": 4, - "APPLY_EGRESS_FIREWALL_RULE": 5, - "APPLY_ROUTE": 6, - "APPLY_FORWARDING_RULE": 7, - "ANALYZE_LOAD_BALANCER_BACKEND": 28, - "SPOOFING_APPROVED": 8, - "ARRIVE_AT_INSTANCE": 9, - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, - "ARRIVE_AT_VPN_GATEWAY": 12, - "ARRIVE_AT_VPN_TUNNEL": 13, - "ARRIVE_AT_VPC_CONNECTOR": 24, - "NAT": 14, - "PROXY_CONNECTION": 15, - "DELIVER": 16, - "DROP": 17, - "FORWARD": 18, - "ABORT": 19, - "VIEWER_PERMISSION_MISSING": 20 - } - } - } - }, - "InstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "interface": { - "type": "string", - "id": 3 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "networkTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "serviceAccount": { - "type": "string", - "id": 8, - "options": { - "deprecated": true - } - }, - "pscNetworkAttachmentUri": { - "type": "string", - "id": 9 - } - } - }, - "NetworkInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedSubnetUri": { - "type": "string", - "id": 5 - }, - "matchedIpRange": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "FirewallInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "direction": { - "type": "string", - "id": 3 - }, - "action": { - "type": "string", - "id": 4 - }, - "priority": { - "type": "int32", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 6 - }, - "targetTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "targetServiceAccounts": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "policy": { - "type": "string", - "id": 9 - }, - "policyUri": { - "type": "string", - "id": 11 - }, - "firewallRuleType": { - "type": "FirewallRuleType", - "id": 10 - } - }, - "nested": { - "FirewallRuleType": { - "values": { - "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, - "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, - "VPC_FIREWALL_RULE": 2, - "IMPLIED_VPC_FIREWALL_RULE": 3, - "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, - "NETWORK_FIREWALL_POLICY_RULE": 5, - "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, - "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, - "TRACKING_STATE": 101 - } - } - } - }, - "RouteInfo": { - "oneofs": { - "_nccHubUri": { - "oneof": [ - "nccHubUri" - ] - }, - "_nccSpokeUri": { - "oneof": [ - "nccSpokeUri" - ] - }, - "_advertisedRouteSourceRouterUri": { - "oneof": [ - "advertisedRouteSourceRouterUri" - ] - }, - "_advertisedRouteNextHopUri": { - "oneof": [ - "advertisedRouteNextHopUri" - ] - } - }, - "fields": { - "routeType": { - "type": "RouteType", - "id": 8 - }, - "nextHopType": { - "type": "NextHopType", - "id": 9 - }, - "routeScope": { - "type": "RouteScope", - "id": 14 - }, - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "region": { - "type": "string", - "id": 19 - }, - "destIpRange": { - "type": "string", - "id": 3 - }, - "nextHop": { - "type": "string", - "id": 4 - }, - "networkUri": { - "type": "string", - "id": 5 - }, - "priority": { - "type": "int32", - "id": 6 - }, - "instanceTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "srcIpRange": { - "type": "string", - "id": 10 - }, - "destPortRanges": { - "rule": "repeated", - "type": "string", - "id": 11 - }, - "srcPortRanges": { - "rule": "repeated", - "type": "string", - "id": 12 - }, - "protocols": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "nccHubUri": { - "type": "string", - "id": 15, - "options": { - "proto3_optional": true - } - }, - "nccSpokeUri": { - "type": "string", - "id": 16, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteSourceRouterUri": { - "type": "string", - "id": 17, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteNextHopUri": { - "type": "string", - "id": 18, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "RouteType": { - "values": { - "ROUTE_TYPE_UNSPECIFIED": 0, - "SUBNET": 1, - "STATIC": 2, - "DYNAMIC": 3, - "PEERING_SUBNET": 4, - "PEERING_STATIC": 5, - "PEERING_DYNAMIC": 6, - "POLICY_BASED": 7, - "ADVERTISED": 101 - } - }, - "NextHopType": { - "values": { - "NEXT_HOP_TYPE_UNSPECIFIED": 0, - "NEXT_HOP_IP": 1, - "NEXT_HOP_INSTANCE": 2, - "NEXT_HOP_NETWORK": 3, - "NEXT_HOP_PEERING": 4, - "NEXT_HOP_INTERCONNECT": 5, - "NEXT_HOP_VPN_TUNNEL": 6, - "NEXT_HOP_VPN_GATEWAY": 7, - "NEXT_HOP_INTERNET_GATEWAY": 8, - "NEXT_HOP_BLACKHOLE": 9, - "NEXT_HOP_ILB": 10, - "NEXT_HOP_ROUTER_APPLIANCE": 11, - "NEXT_HOP_NCC_HUB": 12 - } - }, - "RouteScope": { - "values": { - "ROUTE_SCOPE_UNSPECIFIED": 0, - "NETWORK": 1, - "NCC_HUB": 2 - } - } - } - }, - "GoogleServiceInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "googleServiceType": { - "type": "GoogleServiceType", - "id": 2 - } - }, - "nested": { - "GoogleServiceType": { - "values": { - "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, - "IAP": 1, - "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, - "CLOUD_DNS": 3, - "GOOGLE_API": 4, - "GOOGLE_API_PSC": 5, - "GOOGLE_API_VPC_SC": 6 - } - } - } - }, - "ForwardingRuleInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedProtocol": { - "type": "string", - "id": 3 - }, - "matchedPortRange": { - "type": "string", - "id": 6 - }, - "vip": { - "type": "string", - "id": 4 - }, - "target": { - "type": "string", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "loadBalancerName": { - "type": "string", - "id": 9 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 10 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerInfo": { - "fields": { - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 1 - }, - "healthCheckUri": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "backends": { - "rule": "repeated", - "type": "LoadBalancerBackend", - "id": 3 - }, - "backendType": { - "type": "BackendType", - "id": 4 - }, - "backendUri": { - "type": "string", - "id": 5 - } - }, - "nested": { - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "INTERNAL_TCP_UDP": 1, - "NETWORK_TCP_UDP": 2, - "HTTP_PROXY": 3, - "TCP_PROXY": 4, - "SSL_PROXY": 5 - } - }, - "BackendType": { - "values": { - "BACKEND_TYPE_UNSPECIFIED": 0, - "BACKEND_SERVICE": 1, - "TARGET_POOL": 2, - "TARGET_INSTANCE": 3 - } - } - } - }, - "LoadBalancerBackend": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "healthCheckFirewallState": { - "type": "HealthCheckFirewallState", - "id": 3 - }, - "healthCheckAllowingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "healthCheckBlockingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "HealthCheckFirewallState": { - "values": { - "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, - "CONFIGURED": 1, - "MISCONFIGURED": 2 - } - } - } - }, - "VpnGatewayInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "ipAddress": { - "type": "string", - "id": 4 - }, - "vpnTunnelUri": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "VpnTunnelInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "sourceGateway": { - "type": "string", - "id": 3 - }, - "remoteGateway": { - "type": "string", - "id": 4 - }, - "remoteGatewayIp": { - "type": "string", - "id": 5 - }, - "sourceGatewayIp": { - "type": "string", - "id": 6 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "routingType": { - "type": "RoutingType", - "id": 9 - } - }, - "nested": { - "RoutingType": { - "values": { - "ROUTING_TYPE_UNSPECIFIED": 0, - "ROUTE_BASED": 1, - "POLICY_BASED": 2, - "DYNAMIC": 3 - } - } - } - }, - "EndpointInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "destinationIp": { - "type": "string", - "id": 2 - }, - "protocol": { - "type": "string", - "id": 3 - }, - "sourcePort": { - "type": "int32", - "id": 4 - }, - "destinationPort": { - "type": "int32", - "id": 5 - }, - "sourceNetworkUri": { - "type": "string", - "id": 6 - }, - "destinationNetworkUri": { - "type": "string", - "id": 7 - }, - "sourceAgentUri": { - "type": "string", - "id": 8 - } - } - }, - "DeliverInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "storageBucket": { - "type": "string", - "id": 4 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Target": { - "values": { - "TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "INTERNET": 2, - "GOOGLE_API": 3, - "GKE_MASTER": 4, - "CLOUD_SQL_INSTANCE": 5, - "PSC_PUBLISHED_SERVICE": 6, - "PSC_GOOGLE_API": 7, - "PSC_VPC_SC": 8, - "SERVERLESS_NEG": 9, - "STORAGE_BUCKET": 10, - "PRIVATE_NETWORK": 11, - "CLOUD_FUNCTION": 12, - "APP_ENGINE_VERSION": 13, - "CLOUD_RUN_REVISION": 14, - "GOOGLE_MANAGED_SERVICE": 15, - "REDIS_INSTANCE": 16, - "REDIS_CLUSTER": 17 - } - } - } - }, - "ForwardInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - } - }, - "nested": { - "Target": { - "valuesOptions": { - "GKE_MASTER": { - "deprecated": true - }, - "CLOUD_SQL_INSTANCE": { - "deprecated": true - } - }, - "values": { - "TARGET_UNSPECIFIED": 0, - "PEERING_VPC": 1, - "VPN_GATEWAY": 2, - "INTERCONNECT": 3, - "GKE_MASTER": 4, - "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, - "CLOUD_SQL_INSTANCE": 6, - "ANOTHER_PROJECT": 7, - "NCC_HUB": 8, - "ROUTER_APPLIANCE": 9 - } - } - } - }, - "AbortInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "projectsMissingPermission": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Cause": { - "valuesOptions": { - "UNKNOWN_NETWORK": { - "deprecated": true - }, - "UNKNOWN_PROJECT": { - "deprecated": true - }, - "NO_EXTERNAL_IP": { - "deprecated": true - }, - "UNINTENDED_DESTINATION": { - "deprecated": true - }, - "SOURCE_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_SOURCE_NETWORK": { - "deprecated": true - }, - "DESTINATION_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_DESTINATION_NETWORK": { - "deprecated": true - } - }, - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_NETWORK": 1, - "UNKNOWN_PROJECT": 3, - "NO_EXTERNAL_IP": 7, - "UNINTENDED_DESTINATION": 8, - "SOURCE_ENDPOINT_NOT_FOUND": 11, - "MISMATCHED_SOURCE_NETWORK": 12, - "DESTINATION_ENDPOINT_NOT_FOUND": 13, - "MISMATCHED_DESTINATION_NETWORK": 14, - "UNKNOWN_IP": 2, - "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, - "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, - "PERMISSION_DENIED": 4, - "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, - "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, - "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, - "NO_SOURCE_LOCATION": 5, - "INVALID_ARGUMENT": 6, - "TRACE_TOO_LONG": 9, - "INTERNAL_ERROR": 10, - "UNSUPPORTED": 15, - "MISMATCHED_IP_VERSION": 16, - "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, - "RESOURCE_CONFIG_NOT_FOUND": 18, - "VM_INSTANCE_CONFIG_NOT_FOUND": 24, - "NETWORK_CONFIG_NOT_FOUND": 25, - "FIREWALL_CONFIG_NOT_FOUND": 26, - "ROUTE_CONFIG_NOT_FOUND": 27, - "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, - "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, - "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, - "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, - "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, - "NON_ROUTABLE_IP_ADDRESS": 22, - "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, - "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 - } - } - } - }, - "DropInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "sourceIp": { - "type": "string", - "id": 3 - }, - "destinationIp": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Cause": { - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_EXTERNAL_ADDRESS": 1, - "FOREIGN_IP_DISALLOWED": 2, - "FIREWALL_RULE": 3, - "NO_ROUTE": 4, - "ROUTE_BLACKHOLE": 5, - "ROUTE_WRONG_NETWORK": 6, - "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, - "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, - "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, - "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, - "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, - "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, - "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, - "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, - "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, - "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, - "PRIVATE_TRAFFIC_TO_INTERNET": 7, - "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, - "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, - "NO_EXTERNAL_ADDRESS": 9, - "UNKNOWN_INTERNAL_ADDRESS": 10, - "FORWARDING_RULE_MISMATCH": 11, - "FORWARDING_RULE_NO_INSTANCES": 12, - "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, - "INSTANCE_NOT_RUNNING": 14, - "GKE_CLUSTER_NOT_RUNNING": 27, - "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, - "REDIS_INSTANCE_NOT_RUNNING": 68, - "REDIS_CLUSTER_NOT_RUNNING": 69, - "TRAFFIC_TYPE_BLOCKED": 15, - "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, - "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, - "DROPPED_INSIDE_GKE_SERVICE": 18, - "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, - "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, - "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, - "GKE_PSC_ENDPOINT_MISSING": 36, - "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, - "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, - "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, - "GKE_CONTROL_PLANE_NO_ROUTE": 32, - "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, - "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, - "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, - "CLOUD_SQL_CONNECTOR_REQUIRED": 63, - "CLOUD_FUNCTION_NOT_ACTIVE": 22, - "VPC_CONNECTOR_NOT_SET": 23, - "VPC_CONNECTOR_NOT_RUNNING": 24, - "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, - "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, - "FORWARDING_RULE_REGION_MISMATCH": 25, - "PSC_CONNECTION_NOT_ACCEPTED": 26, - "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, - "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, - "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, - "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, - "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, - "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, - "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, - "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, - "CLOUD_RUN_REVISION_NOT_READY": 29, - "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, - "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, - "CLOUD_NAT_NO_ADDRESSES": 40, - "ROUTING_LOOP": 59, - "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, - "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, - "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, - "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, - "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, - "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, - "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, - "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, - "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, - "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, - "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, - "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, - "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, - "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, - "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, - "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, - "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82 - } - } - } - }, - "GKEMasterInfo": { - "fields": { - "clusterUri": { - "type": "string", - "id": 2 - }, - "clusterNetworkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - } - } - }, - "CloudSQLInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "region": { - "type": "string", - "id": 7 - } - } - }, - "RedisInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "primaryEndpointIp": { - "type": "string", - "id": 4 - }, - "readEndpointIp": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "RedisClusterInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "discoveryEndpointIpAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "secondaryEndpointIpAddress": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "location": { - "type": "string", - "id": 6 - } - } - }, - "CloudFunctionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - }, - "versionId": { - "type": "int64", - "id": 4 - } - } - }, - "CloudRunRevisionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 4 - }, - "serviceUri": { - "type": "string", - "id": 5 - } - } - }, - "AppEngineVersionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "runtime": { - "type": "string", - "id": 3 - }, - "environment": { - "type": "string", - "id": 4 - } - } - }, - "VpcConnectorInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - } - } - }, - "NatInfo": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "protocol": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "oldSourceIp": { - "type": "string", - "id": 4 - }, - "newSourceIp": { - "type": "string", - "id": 5 - }, - "oldDestinationIp": { - "type": "string", - "id": 6 - }, - "newDestinationIp": { - "type": "string", - "id": 7 - }, - "oldSourcePort": { - "type": "int32", - "id": 8 - }, - "newSourcePort": { - "type": "int32", - "id": 9 - }, - "oldDestinationPort": { - "type": "int32", - "id": 10 - }, - "newDestinationPort": { - "type": "int32", - "id": 11 - }, - "routerUri": { - "type": "string", - "id": 12 - }, - "natGatewayName": { - "type": "string", - "id": 13 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "INTERNAL_TO_EXTERNAL": 1, - "EXTERNAL_TO_INTERNAL": 2, - "CLOUD_NAT": 3, - "PRIVATE_SERVICE_CONNECT": 4 - } - } - } - }, - "ProxyConnectionInfo": { - "fields": { - "protocol": { - "type": "string", - "id": 1 - }, - "oldSourceIp": { - "type": "string", - "id": 2 - }, - "newSourceIp": { - "type": "string", - "id": 3 - }, - "oldDestinationIp": { - "type": "string", - "id": 4 - }, - "newDestinationIp": { - "type": "string", - "id": 5 - }, - "oldSourcePort": { - "type": "int32", - "id": 6 - }, - "newSourcePort": { - "type": "int32", - "id": 7 - }, - "oldDestinationPort": { - "type": "int32", - "id": 8 - }, - "newDestinationPort": { - "type": "int32", - "id": 9 - }, - "subnetUri": { - "type": "string", - "id": 10 - }, - "networkUri": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerBackendInfo": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "instanceUri": { - "type": "string", - "id": 2 - }, - "backendServiceUri": { - "type": "string", - "id": 3 - }, - "instanceGroupUri": { - "type": "string", - "id": 4 - }, - "networkEndpointGroupUri": { - "type": "string", - "id": 5 - }, - "backendBucketUri": { - "type": "string", - "id": 8 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 9 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 10 - }, - "healthCheckUri": { - "type": "string", - "id": 6 - }, - "healthCheckFirewallsConfigState": { - "type": "HealthCheckFirewallsConfigState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "HealthCheckFirewallsConfigState": { - "values": { - "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, - "FIREWALLS_CONFIGURED": 1, - "FIREWALLS_PARTIALLY_CONFIGURED": 2, - "FIREWALLS_NOT_CONFIGURED": 3, - "FIREWALLS_UNSUPPORTED": 4 - } - } - } - }, - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "HTTPS_ADVANCED_LOAD_BALANCER": 1, - "HTTPS_LOAD_BALANCER": 2, - "REGIONAL_HTTPS_LOAD_BALANCER": 3, - "INTERNAL_HTTPS_LOAD_BALANCER": 4, - "SSL_PROXY_LOAD_BALANCER": 5, - "TCP_PROXY_LOAD_BALANCER": 6, - "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, - "NETWORK_LOAD_BALANCER": 8, - "LEGACY_NETWORK_LOAD_BALANCER": 9, - "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 - } - }, - "StorageBucketInfo": { - "fields": { - "bucket": { - "type": "string", - "id": 1 - } - } - }, - "ServerlessNegInfo": { - "fields": { - "negUri": { - "type": "string", - "id": 1 - } - } - }, - "ReachabilityService": { - "options": { - "(google.api.default_host)": "networkmanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListConnectivityTests": { - "requestType": "ListConnectivityTestsRequest", - "responseType": "ListConnectivityTestsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/global}/connectivityTests", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/global}/connectivityTests" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetConnectivityTest": { - "requestType": "GetConnectivityTestRequest", - "responseType": "ConnectivityTest", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/global/connectivityTests/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/global/connectivityTests/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateConnectivityTest": { - "requestType": "CreateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/global}/connectivityTests", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "parent,test_id,resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/global}/connectivityTests", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "parent,test_id,resource" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateConnectivityTest": { - "requestType": "UpdateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "update_mask,resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "update_mask,resource" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RerunConnectivityTest": { - "requestType": "RerunConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteConnectivityTest": { - "requestType": "DeleteConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/global/connectivityTests/*}", - "(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/global/connectivityTests/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "ListConnectivityTestsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListConnectivityTestsResponse": { - "fields": { - "resources": { - "rule": "repeated", - "type": "ConnectivityTest", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "CreateConnectivityTestRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "testId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateConnectivityTestRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "RerunConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "target": { - "type": "string", - "id": 3 - }, - "verb": { - "type": "string", - "id": 4 - }, - "statusDetail": { - "type": "string", - "id": 5 - }, - "cancelRequested": { - "type": "bool", - "id": 6 - }, - "apiVersion": { - "type": "string", - "id": 7 - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - } - } - }, - "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 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "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-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js deleted file mode 100644 index cbd3d9c9f0e..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js +++ /dev/null @@ -1,79 +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, testId, resource) { - // [START networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - */ - // const testId = 'abc123' - /** - * Required. A `ConnectivityTest` resource - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callCreateConnectivityTest() { - // Construct request - const request = { - parent, - testId, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.createConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js deleted file mode 100644 index 7cd83e08556..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callDeleteConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.deleteConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js deleted file mode 100644 index 36f308151bf..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callGetConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await networkmanagementClient.getConnectivityTest(request); - console.log(response); - } - - callGetConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js deleted file mode 100644 index 11366d5248a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.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(parent) { - // [START networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Number of `ConnectivityTests` to return. - */ - // const pageSize = 1234 - /** - * Page token from an earlier query, as returned in `next_page_token`. - */ - // const pageToken = 'abc123' - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callListConnectivityTests() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = networkmanagementClient.listConnectivityTestsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListConnectivityTests(); - // [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js deleted file mode 100644 index e279d602dd1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callRerunConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.rerunConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRerunConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js deleted file mode 100644 index 808714b00bb..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js +++ /dev/null @@ -1,68 +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, resource) { - // [START networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. Only fields specified in update_mask are updated. - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callUpdateConnectivityTest() { - // Construct request - const request = { - updateMask, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.updateConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json deleted file mode 100644 index 9c56c9e9913..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-networkmanagement", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.networkmanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async", - "title": "ReachabilityService listConnectivityTests Sample", - "origin": "API_DEFINITION", - "description": " Lists all Connectivity Tests owned by a project.", - "canonical": true, - "file": "reachability_service.list_connectivity_tests.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", - "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.networkmanagement.v1.ListConnectivityTestsResponse", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async", - "title": "ReachabilityService getConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific Connectivity Test.", - "canonical": true, - "file": "reachability_service.get_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.networkmanagement.v1.ConnectivityTest", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async", - "title": "ReachabilityService createConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", - "canonical": true, - "file": "reachability_service.create_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "test_id", - "type": "TYPE_STRING" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async", - "title": "ReachabilityService updateConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", - "canonical": true, - "file": "reachability_service.update_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async", - "title": "ReachabilityService rerunConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", - "canonical": true, - "file": "reachability_service.rerun_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async", - "title": "ReachabilityService deleteConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific `ConnectivityTest`.", - "canonical": true, - "file": "reachability_service.delete_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts deleted file mode 100644 index 88c81931ccf..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 ReachabilityServiceClient = v1.ReachabilityServiceClient; -type ReachabilityServiceClient = v1.ReachabilityServiceClient; -export {v1, ReachabilityServiceClient}; -export default {v1, ReachabilityServiceClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 0a5d92ed4df..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.networkmanagement.v1", - "libraryPackage": "@google-cloud/network-management", - "services": { - "ReachabilityService": { - "clients": { - "grpc": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts deleted file mode 100644 index 5d88a6370d7..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from './reachability_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts deleted file mode 100644 index f7fc6ca3bf5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts +++ /dev/null @@ -1,1595 +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/reachability_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './reachability_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The Reachability service in the Google Cloud Network Management API provides - * services that analyze the reachability within a single Google Virtual Private - * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - * networks, or between VPC networks and internet hosts. A reachability analysis - * is based on Google Cloud network configurations. - * - * You can use the analysis results to verify these configurations and - * to troubleshoot connectivity issues. - * @class - * @memberof v1 - */ -export class ReachabilityServiceClient { - 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; - reachabilityServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ReachabilityServiceClient. - * - * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; - 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 = 'networkmanagement.' + 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 = { - connectivityTestPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/global/connectivityTests/{test}' - ), - 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 = { - listConnectivityTests: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') - }; - - 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/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/global}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; - const createConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - const updateConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; - const updateConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - const rerunConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; - const rerunConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - const deleteConnectivityTestResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), - createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), - updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), - updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), - rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), - rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), - deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), - deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.networkmanagement.v1.ReachabilityService', 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.reachabilityServiceStub) { - return this.reachabilityServiceStub; - } - - // Put together the "service stub" for - // google.cloud.networkmanagement.v1.ReachabilityService. - this.reachabilityServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1.ReachabilityService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.networkmanagement.v1.ReachabilityService, - 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 reachabilityServiceStubMethods = - ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; - for (const methodName of reachabilityServiceStubMethods) { - const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; - } - - /** - * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. - * 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/reachability_service.get_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async - */ - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|undefined, {}|undefined - ]>; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - callback: Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); - } - -/** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param {string} request.testId - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource - * Required. A `ConnectivityTest` 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 - * 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/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async - */ - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - 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.createConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createConnectivityTest()`. - * @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/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async - */ - async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for more details. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource - * Required. Only fields specified in update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - 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({ - 'resource.name': request.resource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateConnectivityTest()`. - * @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/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async - */ - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - 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.rerunConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `rerunConnectivityTest()`. - * @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/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async - */ - async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific `ConnectivityTest`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - 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.deleteConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteConnectivityTest()`. - * @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/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all Connectivity Tests owned by a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. - * 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse - ]>; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>, - callback?: PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTestsStream( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.createStream( - this.innerApiCalls.listConnectivityTests as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listConnectivityTests`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. 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/reachability_service.list_connectivity_tests.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async - */ - listConnectivityTestsAsync( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.asyncIterate( - this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. - * - * @param {string} project - * @param {string} test - * @returns {string} Resource name string. - */ - connectivityTestPath(project:string,test:string) { - return this.pathTemplates.connectivityTestPathTemplate.render({ - project: project, - test: test, - }); - } - - /** - * Parse the project from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; - } - - /** - * Parse the test from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the test. - */ - matchTestFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; - } - - /** - * 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.reachabilityServiceStub && !this._terminated) { - return this.reachabilityServiceStub.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-networkmanagement/v1/src/v1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json deleted file mode 100644 index 6fcdab96cf2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1.ReachabilityService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListConnectivityTests": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RerunConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json deleted file mode 100644 index d84c76feae1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "../../protos/google/cloud/networkmanagement/v1/connectivity_test.proto", - "../../protos/google/cloud/networkmanagement/v1/reachability.proto", - "../../protos/google/cloud/networkmanagement/v1/trace.proto" -] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index ef3e3b070ae..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 networkmanagement = require('@google-cloud/network-management'); - -function main() { - const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index d3182081b86..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from '@google-cloud/network-management'; - -// check that the client class type name can be used -function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const reachabilityServiceClient = new ReachabilityServiceClient(); - doStuffWithReachabilityServiceClient(reachabilityServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/test/gapic_reachability_service_v1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts deleted file mode 100644 index 35e3ba63eb8..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts +++ /dev/null @@ -1,2018 +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 reachabilityserviceModule 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.ReachabilityServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); - 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 = reachabilityserviceModule.v1.ReachabilityServiceClient.servicePath; - assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = reachabilityserviceModule.v1.ReachabilityServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = reachabilityserviceModule.v1.ReachabilityServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - await client.initialize(); - assert(client.reachabilityServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.reachabilityServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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('getConnectivityTest', () => { - it('invokes getConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); - const [response] = await client.getConnectivityTest(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConnectivityTest( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with closed client', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConnectivityTest(request), expectedError); - }); - }); - - describe('createConnectivityTest', () => { - it('invokes createConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createConnectivityTest( - 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.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateConnectivityTest', () => { - it('invokes updateConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateConnectivityTest( - 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.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('rerunConnectivityTest', () => { - it('invokes rerunConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.rerunConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rerunConnectivityTest( - 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.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.rerunConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.rerunConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRerunConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRerunConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteConnectivityTest', () => { - it('invokes deleteConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteConnectivityTest( - 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.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listConnectivityTests', () => { - it('invokes listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectivityTests(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listConnectivityTests( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listConnectivityTests(request), expectedError); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTestsStream without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { - 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.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listConnectivityTestsStream with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; - const iterable = client.listConnectivityTestsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectivityTestsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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('connectivityTest', () => { - const fakePath = "/rendered/path/connectivityTest"; - const expectedParameters = { - project: "projectValue", - test: "testValue", - }; - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectivityTestPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectivityTestPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectivityTestPath', () => { - const result = client.connectivityTestPath("projectValue", "testValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectivityTestName', () => { - const result = client.matchProjectFromConnectivityTestName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTestFromConnectivityTestName', () => { - const result = client.matchTestFromConnectivityTestName(fakePath); - assert.strictEqual(result, "testValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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-networkmanagement/v1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js deleted file mode 100644 index d975be0ab73..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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: 'ReachabilityService', - filename: './reachability-service.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js deleted file mode 100644 index 22d92e8132c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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/network-management', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md deleted file mode 100644 index 90c3778ad46..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md +++ /dev/null @@ -1 +0,0 @@ -Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json deleted file mode 100644 index d6594c83107..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@google-cloud/network-management", - "version": "0.1.0", - "description": "Networkmanagement client for Node.js", - "repository": "googleapis/nodejs-networkmanagement", - "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 networkmanagement", - "networkmanagement", - "reachability service", - "vpc flow logs service" - ], - "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-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto deleted file mode 100644 index a001077d66c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ /dev/null @@ -1,422 +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.networkmanagement.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1beta1/trace.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TestOuterClass"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// A Connectivity Test for a network reachability analysis. -message ConnectivityTest { - option (google.api.resource) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - pattern: "projects/{project}/locations/global/connectivityTests/{test}" - }; - - // Identifier. Unique name of the resource using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The user-supplied description of the Connectivity Test. - // Maximum of 512 characters. - string description = 2; - - // Required. Source specification of the Connectivity Test. - // - // You can use a combination of source IP address, virtual machine - // (VM) instance, or Compute Engine network to uniquely identify - // the source location. - // - // Examples: - // If the source IP address is an internal IP address within a Google Cloud - // Virtual Private Cloud (VPC) network, then you must also specify the VPC - // network. Otherwise, specify the VM instance, which already contains its - // internal IP address and VPC network information. - // - // If the source of the test is within an on-premises network, then you must - // provide the destination VPC network. - // - // If the source endpoint is a Compute Engine VM instance with multiple - // network interfaces, the instance itself is not sufficient to identify the - // endpoint. So, you must also specify the source IP address or VPC network. - // - // A reachability analysis proceeds even if the source location is - // ambiguous. However, the test result may include endpoints that you don't - // intend to test. - Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination specification of the Connectivity Test. - // - // You can use a combination of destination IP address, Compute Engine - // VM instance, or VPC network to uniquely identify the destination - // location. - // - // Even if the destination IP address is not unique, the source IP - // location is unique. Usually, the analysis can infer the destination - // endpoint from route information. - // - // If the destination you specify is a VM instance and the instance has - // multiple network interfaces, then you must also specify either - // a destination IP address or VPC network to identify the destination - // interface. - // - // A reachability analysis proceeds even if the destination location is - // ambiguous. However, the result can include endpoints that you don't - // intend to test. - Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; - - // IP Protocol of the test. When not provided, "TCP" is assumed. - string protocol = 5; - - // Other projects that may be relevant for reachability analysis. - // This is applicable to scenarios where a test can cross project boundaries. - repeated string related_projects = 6; - - // Output only. The display name of a Connectivity Test. - string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user-provided metadata. - map labels = 8; - - // Output only. The time the test was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the test's configuration was updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The reachability details of this test from the latest run. - // The details are updated when creating a new test, updating an - // existing test, or triggering a one-time rerun of an existing test. - ReachabilityDetails reachability_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The probing details of this test from the latest run, present - // for applicable tests only. The details are updated when creating a new - // test, updating an existing test, or triggering a one-time rerun of an - // existing test. - ProbingDetails probing_details = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether the test should skip firewall checking. - // If not provided, we assume false. - bool bypass_firewall_checks = 17; -} - -// Source or destination of the Connectivity Test. -message Endpoint { - // The type definition of an endpoint's network. Use one of the - // following choices: - enum NetworkType { - // Default type if unspecified. - NETWORK_TYPE_UNSPECIFIED = 0; - - // A network hosted within Google Cloud. - // To receive more detailed output, specify the URI for the source or - // destination network. - GCP_NETWORK = 1; - - // A network hosted outside of Google Cloud. - // This can be an on-premises network, or a network hosted by another cloud - // provider. - NON_GCP_NETWORK = 2; - } - - // Type of the target of a forwarding rule. - enum ForwardingRuleTarget { - // Forwarding rule target is unknown. - FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - - // Compute Engine instance for protocol forwarding. - INSTANCE = 1; - - // Load Balancer. The specific type can be found from [load_balancer_type] - // [google.cloud.networkmanagement.v1beta1.Endpoint.load_balancer_type]. - LOAD_BALANCER = 2; - - // Classic Cloud VPN Gateway. - VPN_GATEWAY = 3; - - // Forwarding Rule is a Private Service Connect endpoint. - PSC = 4; - } - - // Wrapper for Cloud Function attributes. - message CloudFunctionEndpoint { - // A [Cloud Function](https://cloud.google.com/functions) name. - string uri = 1; - } - - // Wrapper for the App Engine service version attributes. - message AppEngineVersionEndpoint { - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - // name. - string uri = 1; - } - - // Wrapper for Cloud Run revision attributes. - message CloudRunRevisionEndpoint { - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - // URI. The format is: - // projects/{project}/locations/{location}/revisions/{revision} - string uri = 1; - } - - // The IP address of the endpoint, which can be an external or internal IP. - string ip_address = 1; - - // The IP protocol port of the endpoint. - // Only applicable when protocol is TCP or UDP. - int32 port = 2; - - // A Compute Engine instance URI. - string instance = 3; - - // A forwarding rule and its corresponding IP address represent the frontend - // configuration of a Google Cloud load balancer. Forwarding rules are also - // used for protocol forwarding, Private Service Connect and other network - // services to provide forwarding information in the control plane. Format: - // projects/{project}/global/forwardingRules/{id} or - // projects/{project}/regions/{region}/forwardingRules/{id} - string forwarding_rule = 13; - - // Output only. Specifies the type of the target of the forwarding rule. - optional ForwardingRuleTarget forwarding_rule_target = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the load balancer the forwarding rule points to. Empty - // for forwarding rules not related to load balancers. - optional string load_balancer_id = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Type of the load balancer the forwarding rule points to. - optional LoadBalancerType load_balancer_type = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A cluster URI for [Google Kubernetes Engine cluster control - // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - string gke_master_cluster = 7; - - // DNS endpoint of [Google Kubernetes Engine cluster control - // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - // Requires gke_master_cluster to be set, can't be used simultaneoulsly with - // ip_address or network. Applicable only to destination endpoint. - string fqdn = 19; - - // A [Cloud SQL](https://cloud.google.com/sql) instance URI. - string cloud_sql_instance = 8; - - // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - // URI. - string redis_instance = 17; - - // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - // URI. - string redis_cluster = 18; - - // A [Cloud Function](https://cloud.google.com/functions). - CloudFunctionEndpoint cloud_function = 10; - - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - AppEngineVersionEndpoint app_engine_version = 11; - - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - CloudRunRevisionEndpoint cloud_run_revision = 12; - - // A Compute Engine network URI. - string network = 4; - - // Type of the network where the endpoint is located. - // Applicable only to source endpoint, as destination network type can be - // inferred from the source. - NetworkType network_type = 5; - - // Project ID where the endpoint is located. - // The Project ID can be derived from the URI if you provide a VM instance or - // network URI. - // The following are two cases where you must provide the project ID: - // 1. Only the IP address is specified, and the IP address is within a Google - // Cloud project. - // 2. When you are using Shared VPC and the IP address that you provide is - // from the service project. In this case, the network that the IP address - // resides in is defined in the host project. - string project_id = 6; -} - -// Results of the configuration analysis from the last run of the test. -message ReachabilityDetails { - // The overall result of the test's configuration analysis. - enum Result { - // No result was specified. - RESULT_UNSPECIFIED = 0; - - // Possible scenarios are: - // - // * The configuration analysis determined that a packet originating from - // the source is expected to reach the destination. - // * The analysis didn't complete because the user lacks permission for - // some of the resources in the trace. However, at the time the user's - // permission became insufficient, the trace had been successful so far. - REACHABLE = 1; - - // A packet originating from the source is expected to be dropped before - // reaching the destination. - UNREACHABLE = 2; - - // The source and destination endpoints do not uniquely identify - // the test location in the network, and the reachability result contains - // multiple traces. For some traces, a packet could be delivered, and for - // others, it would not be. This result is also assigned to - // configuration analysis of return path if on its own it should be - // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. - AMBIGUOUS = 4; - - // The configuration analysis did not complete. Possible reasons are: - // - // * A permissions error occurred--for example, the user might not have - // read permission for all of the resources named in the test. - // * An internal error occurred. - // * The analyzer received an invalid or unsupported argument or was unable - // to identify a known endpoint. - UNDETERMINED = 5; - } - - // The overall result of the test's configuration analysis. - Result result = 1; - - // The time of the configuration analysis. - google.protobuf.Timestamp verify_time = 2; - - // The details of a failure or a cancellation of reachability analysis. - google.rpc.Status error = 3; - - // Result may contain a list of traces if a test has multiple possible - // paths in the network, such as when destination endpoint is a load balancer - // with multiple backends. - repeated Trace traces = 5; -} - -// Latency percentile rank and value. -message LatencyPercentile { - // Percentage of samples this data point applies to. - int32 percent = 1; - - // percent-th percentile of latency observed, in microseconds. - // Fraction of percent/100 of samples have latency lower or - // equal to the value of this field. - int64 latency_micros = 2; -} - -// Describes measured latency distribution. -message LatencyDistribution { - // Representative latency percentiles. - repeated LatencyPercentile latency_percentiles = 1; -} - -// Results of active probing from the last run of the test. -message ProbingDetails { - // Overall probing result of the test. - enum ProbingResult { - // No result was specified. - PROBING_RESULT_UNSPECIFIED = 0; - - // At least 95% of packets reached the destination. - REACHABLE = 1; - - // No packets reached the destination. - UNREACHABLE = 2; - - // Less than 95% of packets reached the destination. - REACHABILITY_INCONSISTENT = 3; - - // Reachability could not be determined. Possible reasons are: - // * The user lacks permission to access some of the network resources - // required to run the test. - // * No valid source endpoint could be derived from the request. - // * An internal error occurred. - UNDETERMINED = 4; - } - - // Abort cause types. - enum ProbingAbortCause { - // No reason was specified. - PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - - // The user lacks permission to access some of the - // network resources required to run the test. - PERMISSION_DENIED = 1; - - // No valid source endpoint could be derived from the request. - NO_SOURCE_LOCATION = 2; - } - - // Representation of a network edge location as per - // https://cloud.google.com/vpc/docs/edge-locations. - message EdgeLocation { - // Name of the metropolitan area. - string metropolitan_area = 1; - } - - // The overall result of active probing. - ProbingResult result = 1; - - // The time that reachability was assessed through active probing. - google.protobuf.Timestamp verify_time = 2; - - // Details about an internal failure or the cancellation of active probing. - google.rpc.Status error = 3; - - // The reason probing was aborted. - ProbingAbortCause abort_cause = 4; - - // Number of probes sent. - int32 sent_probe_count = 5; - - // Number of probes that reached the destination. - int32 successful_probe_count = 6; - - // The source and destination endpoints derived from the test input and used - // for active probing. - EndpointInfo endpoint_info = 7; - - // Latency as measured by active probing in one direction: - // from the source to the destination endpoint. - LatencyDistribution probing_latency = 8; - - // The EdgeLocation from which a packet destined for/originating from the - // internet will egress/ingress the Google network. - // This will only be populated for a connectivity test which has an internet - // destination/source address. - // The absence of this field *must not* be used as an indication that the - // destination/source is part of the Google network. - EdgeLocation destination_egress_location = 9; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto deleted file mode 100644 index d888696545b..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto +++ /dev/null @@ -1,304 +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.networkmanagement.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1beta1/connectivity_test.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "ReachabilityServiceProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// The Reachability service in Google Cloud Network Management API - -// The Reachability service in the Google Cloud Network Management API provides -// services that analyze the reachability within a single Google Virtual Private -// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises -// networks, or between VPC networks and internet hosts. A reachability analysis -// is based on Google Cloud network configurations. -// -// You can use the analysis results to verify these configurations and -// to troubleshoot connectivity issues. -service ReachabilityService { - option (google.api.default_host) = "networkmanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all Connectivity Tests owned by a project. - rpc ListConnectivityTests(ListConnectivityTestsRequest) - returns (ListConnectivityTestsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - }; - } - - // Gets the details of a specific Connectivity Test. - rpc GetConnectivityTest(GetConnectivityTestRequest) - returns (ConnectivityTest) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - }; - } - - // Creates a new Connectivity Test. - // After you create a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, containing non-existent resources in the network, or you - // don't have read permissions to the network configurations of listed - // projects), then the reachability result returns a value of `UNKNOWN`. - // - // If the endpoint specifications in `ConnectivityTest` are - // incomplete, the reachability result returns a value of - // AMBIGUOUS. For more information, - // see the Connectivity Test documentation. - rpc CreateConnectivityTest(CreateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - body: "resource" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Updates the configuration of an existing `ConnectivityTest`. - // After you update a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // The Reachability state in the test resource is updated with the new result. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, they contain non-existent resources in the network, or the - // user does not have read permissions to the network configurations of - // listed projects), then the reachability result returns a value of - // UNKNOWN. - // - // If the endpoint specifications in `ConnectivityTest` are incomplete, the - // reachability result returns a value of `AMBIGUOUS`. See the documentation - // in `ConnectivityTest` for more details. - rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}" - body: "resource" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Rerun an existing `ConnectivityTest`. - // After the user triggers the rerun, the reachability analysis is performed - // as part of the long running operation, which completes when the analysis - // completes. - // - // Even though the test configuration remains the same, the reachability - // result may change due to underlying network configuration changes. - // - // If the endpoint specifications in `ConnectivityTest` become invalid (for - // example, specified resources are deleted in the network, or you lost - // read permissions to the network configurations of listed projects), then - // the reachability result returns a value of `UNKNOWN`. - rpc RerunConnectivityTest(RerunConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a specific `ConnectivityTest`. - rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } -} - -// Request for the `ListConnectivityTests` method. -message ListConnectivityTestsRequest { - // Required. The parent resource of the Connectivity Tests: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Number of `ConnectivityTests` to return. - int32 page_size = 2; - - // Page token from an earlier query, as returned in `next_page_token`. - string page_token = 3; - - // Lists the `ConnectivityTests` that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form ` ` where operators: `<`, `>`, - // `<=`, - // `>=`, - // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - // roughly synonymous with equality). can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/proj-1/locations/global/connectivityTests/test-1 - // - // - Filter by labels: - // - Resources that have a key called `foo` - // labels.foo:* - // - Resources that have a key called `foo` whose value is `bar` - // labels.foo = bar - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -// Response for the `ListConnectivityTests` method. -message ListConnectivityTestsResponse { - // List of Connectivity Tests. - repeated ConnectivityTest resources = 1; - - // Page token to fetch the next set of Connectivity Tests. - string next_page_token = 2; - - // Locations that could not be reached (when querying all locations with `-`). - repeated string unreachable = 3; -} - -// Request for the `GetConnectivityTest` method. -message GetConnectivityTestRequest { - // Required. `ConnectivityTest` resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `CreateConnectivityTest` method. -message CreateConnectivityTestRequest { - // Required. The parent resource of the Connectivity Test to create: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The logical name of the Connectivity Test in your project - // with the following restrictions: - // - // * Must contain only lowercase letters, numbers, and hyphens. - // * Must start with a letter. - // * Must be between 1-40 characters. - // * Must end with a number or a letter. - // * Must be unique within the customer project - string test_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A `ConnectivityTest` resource - ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `UpdateConnectivityTest` method. -message UpdateConnectivityTestRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `DeleteConnectivityTest` method. -message DeleteConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `RerunConnectivityTest` method. -message RerunConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Metadata describing an [Operation][google.longrunning.Operation] -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Target of the operation - for example - // projects/project-1/locations/global/connectivityTests/test-1 - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // Human-readable status of the operation, if any. - string status_detail = 5; - - // Specifies if cancellation was requested for the operation. - bool cancel_requested = 6; - - // API version. - string api_version = 7; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto deleted file mode 100644 index b8169361686..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto +++ /dev/null @@ -1,1876 +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.networkmanagement.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TraceProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// Trace represents one simulated packet forwarding path. -// -// * Each trace contains multiple ordered steps. -// * Each step is in a particular state with associated configuration. -// * State is categorized as final or non-final states. -// * Each final state has a reason associated. -// * Each trace must end with a final state (the last step). -// ``` -// |---------------------Trace----------------------| -// Step1(State) Step2(State) --- StepN(State(final)) -// ``` -message Trace { - // Derived from the source and destination endpoints definition specified by - // user request, and validated by the data plane model. - // If there are multiple traces starting from different source locations, then - // the endpoint_info may be different between traces. - EndpointInfo endpoint_info = 1; - - // A trace of a test contains multiple steps from the initial state to the - // final state (delivered, dropped, forwarded, or aborted). - // - // The steps are ordered by the processing sequence within the simulated - // network state machine. It is critical to preserve the order of the steps - // and avoid reordering or sorting them. - repeated Step steps = 2; - - // ID of trace. For forward traces, this ID is unique for each trace. For - // return traces, it matches ID of associated forward trace. A single forward - // trace can be associated with none, one or more than one return trace. - int32 forward_trace_id = 4; -} - -// A simulated forwarding path is composed of multiple steps. -// Each step has a well-defined state and an associated configuration. -message Step { - // Type of states that are defined in the network state machine. - // Each step in the packet trace is in a specific state. - enum State { - // Unspecified state. - STATE_UNSPECIFIED = 0; - - // Initial state: packet originating from a Compute Engine instance. - // An InstanceInfo is populated with starting instance information. - START_FROM_INSTANCE = 1; - - // Initial state: packet originating from the internet. - // The endpoint information is populated. - START_FROM_INTERNET = 2; - - // Initial state: packet originating from a Google service. - // The google_service information is populated. - START_FROM_GOOGLE_SERVICE = 27; - - // Initial state: packet originating from a VPC or on-premises network - // with internal source IP. - // If the source is a VPC network visible to the user, a NetworkInfo - // is populated with details of the network. - START_FROM_PRIVATE_NETWORK = 3; - - // Initial state: packet originating from a Google Kubernetes Engine cluster - // master. A GKEMasterInfo is populated with starting instance information. - START_FROM_GKE_MASTER = 21; - - // Initial state: packet originating from a Cloud SQL instance. - // A CloudSQLInstanceInfo is populated with starting instance information. - START_FROM_CLOUD_SQL_INSTANCE = 22; - - // Initial state: packet originating from a Redis instance. - // A RedisInstanceInfo is populated with starting instance information. - START_FROM_REDIS_INSTANCE = 32; - - // Initial state: packet originating from a Redis Cluster. - // A RedisClusterInfo is populated with starting Cluster information. - START_FROM_REDIS_CLUSTER = 33; - - // Initial state: packet originating from a Cloud Function. - // A CloudFunctionInfo is populated with starting function information. - START_FROM_CLOUD_FUNCTION = 23; - - // Initial state: packet originating from an App Engine service version. - // An AppEngineVersionInfo is populated with starting version information. - START_FROM_APP_ENGINE_VERSION = 25; - - // Initial state: packet originating from a Cloud Run revision. - // A CloudRunRevisionInfo is populated with starting revision information. - START_FROM_CLOUD_RUN_REVISION = 26; - - // Initial state: packet originating from a Storage Bucket. Used only for - // return traces. - // The storage_bucket information is populated. - START_FROM_STORAGE_BUCKET = 29; - - // Initial state: packet originating from a published service that uses - // Private Service Connect. Used only for return traces. - START_FROM_PSC_PUBLISHED_SERVICE = 30; - - // Initial state: packet originating from a serverless network endpoint - // group backend. Used only for return traces. - // The serverless_neg information is populated. - START_FROM_SERVERLESS_NEG = 31; - - // Config checking state: verify ingress firewall rule. - APPLY_INGRESS_FIREWALL_RULE = 4; - - // Config checking state: verify egress firewall rule. - APPLY_EGRESS_FIREWALL_RULE = 5; - - // Config checking state: verify route. - APPLY_ROUTE = 6; - - // Config checking state: match forwarding rule. - APPLY_FORWARDING_RULE = 7; - - // Config checking state: verify load balancer backend configuration. - ANALYZE_LOAD_BALANCER_BACKEND = 28; - - // Config checking state: packet sent or received under foreign IP - // address and allowed. - SPOOFING_APPROVED = 8; - - // Forwarding state: arriving at a Compute Engine instance. - ARRIVE_AT_INSTANCE = 9; - - // Forwarding state: arriving at a Compute Engine internal load balancer. - // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not - // used in new tests. - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; - - // Forwarding state: arriving at a Compute Engine external load balancer. - // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not - // used in new tests. - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; - - // Forwarding state: arriving at a Cloud VPN gateway. - ARRIVE_AT_VPN_GATEWAY = 12; - - // Forwarding state: arriving at a Cloud VPN tunnel. - ARRIVE_AT_VPN_TUNNEL = 13; - - // Forwarding state: arriving at a VPC connector. - ARRIVE_AT_VPC_CONNECTOR = 24; - - // Transition state: packet header translated. - NAT = 14; - - // Transition state: original connection is terminated and a new proxied - // connection is initiated. - PROXY_CONNECTION = 15; - - // Final state: packet could be delivered. - DELIVER = 16; - - // Final state: packet could be dropped. - DROP = 17; - - // Final state: packet could be forwarded to a network with an unknown - // configuration. - FORWARD = 18; - - // Final state: analysis is aborted. - ABORT = 19; - - // Special state: viewer of the test result does not have permission to - // see the configuration in this step. - VIEWER_PERMISSION_MISSING = 20; - } - - // A description of the step. Usually this is a summary of the state. - string description = 1; - - // Each step is in one of the pre-defined states. - State state = 2; - - // This is a step that leads to the final state Drop. - bool causes_drop = 3; - - // Project ID that contains the configuration this step is validating. - string project_id = 4; - - // Configuration or metadata associated with each step. - // The configuration is filtered based on viewer's permission. If a viewer - // has no permission to view the configuration in this step, for non-final - // states a special state is populated (VIEWER_PERMISSION_MISSING), and for - // final state the configuration is cleared. - oneof step_info { - // Display information of a Compute Engine instance. - InstanceInfo instance = 5; - - // Display information of a Compute Engine firewall rule. - FirewallInfo firewall = 6; - - // Display information of a Compute Engine route. - RouteInfo route = 7; - - // Display information of the source and destination under analysis. - // The endpoint information in an intermediate state may differ with the - // initial input, as it might be modified by state like NAT, - // or Connection Proxy. - EndpointInfo endpoint = 8; - - // Display information of a Google service - GoogleServiceInfo google_service = 24; - - // Display information of a Compute Engine forwarding rule. - ForwardingRuleInfo forwarding_rule = 9; - - // Display information of a Compute Engine VPN gateway. - VpnGatewayInfo vpn_gateway = 10; - - // Display information of a Compute Engine VPN tunnel. - VpnTunnelInfo vpn_tunnel = 11; - - // Display information of a VPC connector. - VpcConnectorInfo vpc_connector = 21; - - // Display information of the final state "deliver" and reason. - DeliverInfo deliver = 12; - - // Display information of the final state "forward" and reason. - ForwardInfo forward = 13; - - // Display information of the final state "abort" and reason. - AbortInfo abort = 14; - - // Display information of the final state "drop" and reason. - DropInfo drop = 15; - - // Display information of the load balancers. Deprecated in favor of the - // `load_balancer_backend_info` field, not used in new tests. - LoadBalancerInfo load_balancer = 16 [deprecated = true]; - - // Display information of a Google Cloud network. - NetworkInfo network = 17; - - // Display information of a Google Kubernetes Engine cluster master. - GKEMasterInfo gke_master = 18; - - // Display information of a Cloud SQL instance. - CloudSQLInstanceInfo cloud_sql_instance = 19; - - // Display information of a Redis Instance. - RedisInstanceInfo redis_instance = 30; - - // Display information of a Redis Cluster. - RedisClusterInfo redis_cluster = 31; - - // Display information of a Cloud Function. - CloudFunctionInfo cloud_function = 20; - - // Display information of an App Engine service version. - AppEngineVersionInfo app_engine_version = 22; - - // Display information of a Cloud Run revision. - CloudRunRevisionInfo cloud_run_revision = 23; - - // Display information of a NAT. - NatInfo nat = 25; - - // Display information of a ProxyConnection. - ProxyConnectionInfo proxy_connection = 26; - - // Display information of a specific load balancer backend. - LoadBalancerBackendInfo load_balancer_backend_info = 27; - - // Display information of a Storage Bucket. Used only for return traces. - StorageBucketInfo storage_bucket = 28; - - // Display information of a Serverless network endpoint group backend. Used - // only for return traces. - ServerlessNegInfo serverless_neg = 29; - } -} - -// For display only. Metadata associated with a Compute Engine instance. -message InstanceInfo { - // Name of a Compute Engine instance. - string display_name = 1; - - // URI of a Compute Engine instance. - string uri = 2; - - // Name of the network interface of a Compute Engine instance. - string interface = 3; - - // URI of a Compute Engine network. - string network_uri = 4; - - // Internal IP address of the network interface. - string internal_ip = 5; - - // External IP address of the network interface. - string external_ip = 6; - - // Network tags configured on the instance. - repeated string network_tags = 7; - - // Service account authorized for the instance. - string service_account = 8 [deprecated = true]; - - // URI of the PSC network attachment the NIC is attached to (if relevant). - string psc_network_attachment_uri = 9; -} - -// For display only. Metadata associated with a Compute Engine network. -// Next ID: 7 -message NetworkInfo { - // Name of a Compute Engine network. - string display_name = 1; - - // URI of a Compute Engine network. - string uri = 2; - - // URI of the subnet matching the source IP address of the test. - string matched_subnet_uri = 5; - - // The IP range of the subnet matching the source IP address of the test. - string matched_ip_range = 4; - - // The region of the subnet matching the source IP address of the test. - string region = 6; -} - -// For display only. Metadata associated with a VPC firewall rule, an implied -// VPC firewall rule, or a firewall policy rule. -message FirewallInfo { - // The firewall rule's type. - enum FirewallRuleType { - // Unspecified type. - FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - - // Hierarchical firewall policy rule. For details, see - // [Hierarchical firewall policies - // overview](https://cloud.google.com/vpc/docs/firewall-policies). - HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - - // VPC firewall rule. For details, see - // [VPC firewall rules - // overview](https://cloud.google.com/vpc/docs/firewalls). - VPC_FIREWALL_RULE = 2; - - // Implied VPC firewall rule. For details, see - // [Implied - // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - IMPLIED_VPC_FIREWALL_RULE = 3; - - // Implicit firewall rules that are managed by serverless VPC access to - // allow ingress access. They are not visible in the Google Cloud console. - // For details, see [VPC connector's implicit - // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; - - // Global network firewall policy rule. - // For details, see [Network firewall - // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - NETWORK_FIREWALL_POLICY_RULE = 5; - - // Regional network firewall policy rule. - // For details, see [Regional network firewall - // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; - - // Firewall policy rule containing attributes not yet supported in - // Connectivity tests. Firewall analysis is skipped if such a rule can - // potentially be matched. Please see the [list of unsupported - // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). - UNSUPPORTED_FIREWALL_POLICY_RULE = 100; - - // Tracking state for response traffic created when request traffic goes - // through allow firewall rule. - // For details, see [firewall rules - // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) - TRACKING_STATE = 101; - } - - // The display name of the firewall rule. This field might be empty for - // firewall policy rules. - string display_name = 1; - - // The URI of the firewall rule. This field is not applicable to implied - // VPC firewall rules. - string uri = 2; - - // Possible values: INGRESS, EGRESS - string direction = 3; - - // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - string action = 4; - - // The priority of the firewall rule. - int32 priority = 5; - - // The URI of the VPC network that the firewall rule is associated with. - // This field is not applicable to hierarchical firewall policy rules. - string network_uri = 6; - - // The target tags defined by the VPC firewall rule. This field is not - // applicable to firewall policy rules. - repeated string target_tags = 7; - - // The target service accounts specified by the firewall rule. - repeated string target_service_accounts = 8; - - // The name of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy = 9; - - // The URI of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy_uri = 11; - - // The firewall rule's type. - FirewallRuleType firewall_rule_type = 10; -} - -// For display only. Metadata associated with a Compute Engine route. -message RouteInfo { - // Type of route: - enum RouteType { - // Unspecified type. Default value. - ROUTE_TYPE_UNSPECIFIED = 0; - - // Route is a subnet route automatically created by the system. - SUBNET = 1; - - // Static route created by the user, including the default route to the - // internet. - STATIC = 2; - - // Dynamic route exchanged between BGP peers. - DYNAMIC = 3; - - // A subnet route received from peering network. - PEERING_SUBNET = 4; - - // A static route received from peering network. - PEERING_STATIC = 5; - - // A dynamic route received from peering network. - PEERING_DYNAMIC = 6; - - // Policy based route. - POLICY_BASED = 7; - - // Advertised route. Synthetic route which is used to transition from the - // StartFromPrivateNetwork state in Connectivity tests. - ADVERTISED = 101; - } - - // Type of next hop: - enum NextHopType { - // Unspecified type. Default value. - NEXT_HOP_TYPE_UNSPECIFIED = 0; - - // Next hop is an IP address. - NEXT_HOP_IP = 1; - - // Next hop is a Compute Engine instance. - NEXT_HOP_INSTANCE = 2; - - // Next hop is a VPC network gateway. - NEXT_HOP_NETWORK = 3; - - // Next hop is a peering VPC. - NEXT_HOP_PEERING = 4; - - // Next hop is an interconnect. - NEXT_HOP_INTERCONNECT = 5; - - // Next hop is a VPN tunnel. - NEXT_HOP_VPN_TUNNEL = 6; - - // Next hop is a VPN gateway. This scenario only happens when tracing - // connectivity from an on-premises network to Google Cloud through a VPN. - // The analysis simulates a packet departing from the on-premises network - // through a VPN tunnel and arriving at a Cloud VPN gateway. - NEXT_HOP_VPN_GATEWAY = 7; - - // Next hop is an internet gateway. - NEXT_HOP_INTERNET_GATEWAY = 8; - - // Next hop is blackhole; that is, the next hop either does not exist or is - // not running. - NEXT_HOP_BLACKHOLE = 9; - - // Next hop is the forwarding rule of an Internal Load Balancer. - NEXT_HOP_ILB = 10; - - // Next hop is a - // [router appliance - // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - NEXT_HOP_ROUTER_APPLIANCE = 11; - - // Next hop is an NCC hub. - NEXT_HOP_NCC_HUB = 12; - } - - // Indicates where routes are applicable. - enum RouteScope { - // Unspecified scope. Default value. - ROUTE_SCOPE_UNSPECIFIED = 0; - - // Route is applicable to packets in Network. - NETWORK = 1; - - // Route is applicable to packets using NCC Hub's routing table. - NCC_HUB = 2; - } - - // Type of route. - RouteType route_type = 8; - - // Type of next hop. - NextHopType next_hop_type = 9; - - // Indicates where route is applicable. - RouteScope route_scope = 14; - - // Name of a route. - string display_name = 1; - - // URI of a route (if applicable). - string uri = 2; - - // Region of the route (if applicable). - string region = 19; - - // Destination IP range of the route. - string dest_ip_range = 3; - - // Next hop of the route. - string next_hop = 4; - - // URI of a Compute Engine network. NETWORK routes only. - string network_uri = 5; - - // Priority of the route. - int32 priority = 6; - - // Instance tags of the route. - repeated string instance_tags = 7; - - // Source IP address range of the route. Policy based routes only. - string src_ip_range = 10; - - // Destination port ranges of the route. Policy based routes only. - repeated string dest_port_ranges = 11; - - // Source port ranges of the route. Policy based routes only. - repeated string src_port_ranges = 12; - - // Protocols of the route. Policy based routes only. - repeated string protocols = 13; - - // URI of a NCC Hub. NCC_HUB routes only. - optional string ncc_hub_uri = 15; - - // URI of a NCC Spoke. NCC_HUB routes only. - optional string ncc_spoke_uri = 16; - - // For advertised dynamic routes, the URI of the Cloud Router that advertised - // the corresponding IP prefix. - optional string advertised_route_source_router_uri = 17; - - // For advertised routes, the URI of their next hop, i.e. the URI of the - // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - // the advertised prefix is advertised through, or URI of the source peered - // network. - optional string advertised_route_next_hop_uri = 18; -} - -// For display only. Details of a Google Service sending packets to a -// VPC network. Although the source IP might be a publicly routable address, -// some Google Services use special routes within Google production -// infrastructure to reach Compute Engine Instances. -// https://cloud.google.com/vpc/docs/routes#special_return_paths -message GoogleServiceInfo { - // Recognized type of a Google Service. - enum GoogleServiceType { - // Unspecified Google Service. - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; - - // Identity aware proxy. - // https://cloud.google.com/iap/docs/using-tcp-forwarding - IAP = 1; - - // One of two services sharing IP ranges: - // * Load Balancer proxy - // * Centralized Health Check prober - // https://cloud.google.com/load-balancing/docs/firewall-rules - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; - - // Connectivity from Cloud DNS to forwarding targets or alternate name - // servers that use private routing. - // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - // https://cloud.google.com/dns/docs/policies#firewall-rules - CLOUD_DNS = 3; - - // private.googleapis.com and restricted.googleapis.com - GOOGLE_API = 4; - - // Google API via Private Service Connect. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_PSC = 5; - - // Google API via VPC Service Controls. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_VPC_SC = 6; - } - - // Source IP address. - string source_ip = 1; - - // Recognized type of a Google Service. - GoogleServiceType google_service_type = 2; -} - -// For display only. Metadata associated with a Compute Engine forwarding rule. -message ForwardingRuleInfo { - // Name of the forwarding rule. - string display_name = 1; - - // URI of the forwarding rule. - string uri = 2; - - // Protocol defined in the forwarding rule that matches the packet. - string matched_protocol = 3; - - // Port range defined in the forwarding rule that matches the packet. - string matched_port_range = 6; - - // VIP of the forwarding rule. - string vip = 4; - - // Target type of the forwarding rule. - string target = 5; - - // Network URI. - string network_uri = 7; - - // Region of the forwarding rule. Set only for regional forwarding rules. - string region = 8; - - // Name of the load balancer the forwarding rule belongs to. Empty for - // forwarding rules not related to load balancers (like PSC forwarding rules). - string load_balancer_name = 9; - - // URI of the PSC service attachment this forwarding rule targets (if - // applicable). - string psc_service_attachment_uri = 10; - - // PSC Google API target this forwarding rule targets (if applicable). - string psc_google_api_target = 11; -} - -// For display only. Metadata associated with a load balancer. -message LoadBalancerInfo { - // The type definition for a load balancer: - enum LoadBalancerType { - // Type is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Internal TCP/UDP load balancer. - INTERNAL_TCP_UDP = 1; - - // Network TCP/UDP load balancer. - NETWORK_TCP_UDP = 2; - - // HTTP(S) proxy load balancer. - HTTP_PROXY = 3; - - // TCP proxy load balancer. - TCP_PROXY = 4; - - // SSL proxy load balancer. - SSL_PROXY = 5; - } - - // The type definition for a load balancer backend configuration: - enum BackendType { - // Type is unspecified. - BACKEND_TYPE_UNSPECIFIED = 0; - - // Backend Service as the load balancer's backend. - BACKEND_SERVICE = 1; - - // Target Pool as the load balancer's backend. - TARGET_POOL = 2; - - // Target Instance as the load balancer's backend. - TARGET_INSTANCE = 3; - } - - // Type of the load balancer. - LoadBalancerType load_balancer_type = 1; - - // URI of the health check for the load balancer. Deprecated and no longer - // populated as different load balancer backends might have different health - // checks. - string health_check_uri = 2 [deprecated = true]; - - // Information for the loadbalancer backends. - repeated LoadBalancerBackend backends = 3; - - // Type of load balancer's backend configuration. - BackendType backend_type = 4; - - // Backend configuration URI. - string backend_uri = 5; -} - -// For display only. Metadata associated with a specific load balancer backend. -message LoadBalancerBackend { - // State of a health check firewall configuration: - enum HealthCheckFirewallState { - // State is unspecified. Default state if not populated. - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - - // There are configured firewall rules to allow health check probes to the - // backend. - CONFIGURED = 1; - - // There are firewall rules configured to allow partial health check ranges - // or block all health check ranges. - // If a health check probe is sent from denied IP ranges, - // the health check to the backend will fail. Then, the backend will be - // marked unhealthy and will not receive traffic sent to the load balancer. - MISCONFIGURED = 2; - } - - // Name of a Compute Engine instance or network endpoint. - string display_name = 1; - - // URI of a Compute Engine instance or network endpoint. - string uri = 2; - - // State of the health check firewall configuration. - HealthCheckFirewallState health_check_firewall_state = 3; - - // A list of firewall rule URIs allowing probes from health check IP ranges. - repeated string health_check_allowing_firewall_rules = 4; - - // A list of firewall rule URIs blocking probes from health check IP ranges. - repeated string health_check_blocking_firewall_rules = 5; -} - -// For display only. Metadata associated with a Compute Engine VPN gateway. -message VpnGatewayInfo { - // Name of a VPN gateway. - string display_name = 1; - - // URI of a VPN gateway. - string uri = 2; - - // URI of a Compute Engine network where the VPN gateway is configured. - string network_uri = 3; - - // IP address of the VPN gateway. - string ip_address = 4; - - // A VPN tunnel that is associated with this VPN gateway. - // There may be multiple VPN tunnels configured on a VPN gateway, and only - // the one relevant to the test is displayed. - string vpn_tunnel_uri = 5; - - // Name of a Google Cloud region where this VPN gateway is configured. - string region = 6; -} - -// For display only. Metadata associated with a Compute Engine VPN tunnel. -message VpnTunnelInfo { - // Types of VPN routing policy. For details, refer to [Networks and Tunnel - // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). - enum RoutingType { - // Unspecified type. Default value. - ROUTING_TYPE_UNSPECIFIED = 0; - - // Route based VPN. - ROUTE_BASED = 1; - - // Policy based routing. - POLICY_BASED = 2; - - // Dynamic (BGP) routing. - DYNAMIC = 3; - } - - // Name of a VPN tunnel. - string display_name = 1; - - // URI of a VPN tunnel. - string uri = 2; - - // URI of the VPN gateway at local end of the tunnel. - string source_gateway = 3; - - // URI of a VPN gateway at remote end of the tunnel. - string remote_gateway = 4; - - // Remote VPN gateway's IP address. - string remote_gateway_ip = 5; - - // Local VPN gateway's IP address. - string source_gateway_ip = 6; - - // URI of a Compute Engine network where the VPN tunnel is configured. - string network_uri = 7; - - // Name of a Google Cloud region where this VPN tunnel is configured. - string region = 8; - - // Type of the routing policy. - RoutingType routing_type = 9; -} - -// For display only. The specification of the endpoints for the test. -// EndpointInfo is derived from source and destination Endpoint and validated -// by the backend data plane model. -message EndpointInfo { - // Source IP address. - string source_ip = 1; - - // Destination IP address. - string destination_ip = 2; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 3; - - // Source port. Only valid when protocol is TCP or UDP. - int32 source_port = 4; - - // Destination port. Only valid when protocol is TCP or UDP. - int32 destination_port = 5; - - // URI of the network where this packet originates from. - string source_network_uri = 6; - - // URI of the network where this packet is sent to. - string destination_network_uri = 7; - - // URI of the source telemetry agent this packet originates from. - string source_agent_uri = 8; -} - -// Details of the final state "deliver" and associated resource. -message DeliverInfo { - // Deliver target types: - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Target is a Compute Engine instance. - INSTANCE = 1; - - // Target is the internet. - INTERNET = 2; - - // Target is a Google API. - GOOGLE_API = 3; - - // Target is a Google Kubernetes Engine cluster master. - GKE_MASTER = 4; - - // Target is a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 5; - - // Target is a published service that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - PSC_PUBLISHED_SERVICE = 6; - - // Target is Google APIs that use [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_GOOGLE_API = 7; - - // Target is a VPC-SC that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_VPC_SC = 8; - - // Target is a serverless network endpoint group. - SERVERLESS_NEG = 9; - - // Target is a Cloud Storage bucket. - STORAGE_BUCKET = 10; - - // Target is a private network. Used only for return traces. - PRIVATE_NETWORK = 11; - - // Target is a Cloud Function. Used only for return traces. - CLOUD_FUNCTION = 12; - - // Target is a App Engine service version. Used only for return traces. - APP_ENGINE_VERSION = 13; - - // Target is a Cloud Run revision. Used only for return traces. - CLOUD_RUN_REVISION = 14; - - // Target is a Google-managed service. Used only for return traces. - GOOGLE_MANAGED_SERVICE = 15; - - // Target is a Redis Instance. - REDIS_INSTANCE = 16; - - // Target is a Redis Cluster. - REDIS_CLUSTER = 17; - } - - // Target type where the packet is delivered to. - Target target = 1; - - // URI of the resource that the packet is delivered to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the Cloud Storage Bucket the packet is delivered to (if - // applicable). - string storage_bucket = 4; - - // PSC Google API target the packet is delivered to (if applicable). - string psc_google_api_target = 5; -} - -// Details of the final state "forward" and associated resource. -message ForwardInfo { - // Forward target types. - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Forwarded to a VPC peering network. - PEERING_VPC = 1; - - // Forwarded to a Cloud VPN gateway. - VPN_GATEWAY = 2; - - // Forwarded to a Cloud Interconnect connection. - INTERCONNECT = 3; - - // Forwarded to a Google Kubernetes Engine Container cluster master. - GKE_MASTER = 4 [deprecated = true]; - - // Forwarded to the next hop of a custom route imported from a peering VPC. - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - - // Forwarded to a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 6 [deprecated = true]; - - // Forwarded to a VPC network in another project. - ANOTHER_PROJECT = 7; - - // Forwarded to an NCC Hub. - NCC_HUB = 8; - - // Forwarded to a router appliance. - ROUTER_APPLIANCE = 9; - } - - // Target type where this packet is forwarded to. - Target target = 1; - - // URI of the resource that the packet is forwarded to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; -} - -// Details of the final state "abort" and associated resource. -message AbortInfo { - // Abort cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Aborted due to unknown network. Deprecated, not used in the new tests. - UNKNOWN_NETWORK = 1 [deprecated = true]; - - // Aborted because no project information can be derived from the test - // input. Deprecated, not used in the new tests. - UNKNOWN_PROJECT = 3 [deprecated = true]; - - // Aborted because traffic is sent from a public IP to an instance without - // an external IP. Deprecated, not used in the new tests. - NO_EXTERNAL_IP = 7 [deprecated = true]; - - // Aborted because none of the traces matches destination information - // specified in the input test request. Deprecated, not used in the new - // tests. - UNINTENDED_DESTINATION = 8 [deprecated = true]; - - // Aborted because the source endpoint could not be found. Deprecated, not - // used in the new tests. - SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; - - // Aborted because the source network does not match the source endpoint. - // Deprecated, not used in the new tests. - MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; - - // Aborted because the destination endpoint could not be found. Deprecated, - // not used in the new tests. - DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; - - // Aborted because the destination network does not match the destination - // endpoint. Deprecated, not used in the new tests. - MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; - - // Aborted because no endpoint with the packet's destination IP address is - // found. - UNKNOWN_IP = 2; - - // Aborted because no endpoint with the packet's destination IP is found in - // the Google-managed project. - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; - - // Aborted because the source IP address doesn't belong to any of the - // subnets of the source VPC network. - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - - // Aborted because user lacks permission to access all or part of the - // network configurations required to run the test. - PERMISSION_DENIED = 4; - - // Aborted because user lacks permission to access Cloud NAT configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - - // Aborted because user lacks permission to access Network endpoint group - // endpoint configs required to run the test. - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - - // Aborted because user lacks permission to access Cloud Router configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; - - // Aborted because no valid source or destination endpoint is derived from - // the input test request. - NO_SOURCE_LOCATION = 5; - - // Aborted because the source or destination endpoint specified in - // the request is invalid. Some examples: - // - The request might contain malformed resource URI, project ID, or IP - // address. - // - The request might contain inconsistent information (for example, the - // request might include both the instance and the network, but the instance - // might not have a NIC in that network). - INVALID_ARGUMENT = 6; - - // Aborted because the number of steps in the trace exceeds a certain - // limit. It might be caused by a routing loop. - TRACE_TOO_LONG = 9; - - // Aborted due to internal server error. - INTERNAL_ERROR = 10; - - // Aborted because the test scenario is not supported. - UNSUPPORTED = 15; - - // Aborted because the source and destination resources have no common IP - // version. - MISMATCHED_IP_VERSION = 16; - - // Aborted because the connection between the control plane and the node of - // the source cluster is initiated by the node and managed by the - // Konnectivity proxy. - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - - // Aborted because expected resource configuration was missing. - RESOURCE_CONFIG_NOT_FOUND = 18; - - // Aborted because expected VM instance configuration was missing. - VM_INSTANCE_CONFIG_NOT_FOUND = 24; - - // Aborted because expected network configuration was missing. - NETWORK_CONFIG_NOT_FOUND = 25; - - // Aborted because expected firewall configuration was missing. - FIREWALL_CONFIG_NOT_FOUND = 26; - - // Aborted because expected route configuration was missing. - ROUTE_CONFIG_NOT_FOUND = 27; - - // Aborted because a PSC endpoint selection for the Google-managed service - // is ambiguous (several PSC endpoints satisfy test input). - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - - // Aborted because tests with a PSC-based Cloud SQL instance as a source are - // not supported. - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - - // Aborted because tests with a Redis Cluster as a source are not supported. - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; - - // Aborted because tests with a Redis Instance as a source are not - // supported. - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; - - // Aborted because tests with a forwarding rule as a source are not - // supported. - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - - // Aborted because one of the endpoints is a non-routable IP address - // (loopback, link-local, etc). - NON_ROUTABLE_IP_ADDRESS = 22; - - // Aborted due to an unknown issue in the Google-managed project. - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - - // Aborted due to an unsupported configuration of the Google-managed - // project. - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - } - - // Causes that the analysis is aborted. - Cause cause = 1; - - // URI of the resource that caused the abort. - string resource_uri = 2; - - // IP address that caused the abort. - string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // List of project IDs the user specified in the request but lacks access to. - // In this case, analysis is aborted with the PERMISSION_DENIED cause. - repeated string projects_missing_permission = 3; -} - -// Details of the final state "drop" and associated resource. -message DropInfo { - // Drop cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Destination external address cannot be resolved to a known target. If - // the address is used in a Google Cloud project, provide the project ID - // as test input. - UNKNOWN_EXTERNAL_ADDRESS = 1; - - // A Compute Engine instance can only send or receive a packet with a - // foreign IP address if ip_forward is enabled. - FOREIGN_IP_DISALLOWED = 2; - - // Dropped due to a firewall rule, unless allowed due to connection - // tracking. - FIREWALL_RULE = 3; - - // Dropped due to no matching routes. - NO_ROUTE = 4; - - // Dropped due to invalid route. Route's next hop is a blackhole. - ROUTE_BLACKHOLE = 5; - - // Packet is sent to a wrong (unintended) network. Example: you trace a - // packet from VM1:Network1 to VM2:Network2, however, the route configured - // in Network1 sends the packet destined for VM2's IP address to Network3. - ROUTE_WRONG_NETWORK = 6; - - // Route's next hop IP address cannot be resolved to a GCP resource. - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - - // Route's next hop resource is not found. - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - - // Route's next hop instance doesn't have a NIC in the route's network. - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - - // Route's next hop IP address is not a primary IP address of the next hop - // instance. - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - - // Route's next hop forwarding rule doesn't match next hop IP address. - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - - // Route's next hop VPN tunnel is down (does not have valid IKE SAs). - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - - // Route's next hop forwarding rule type is invalid (it's not a forwarding - // rule of the internal passthrough load balancer). - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - - // Packet is sent from the Internet to the private IPv6 address. - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - - // The packet does not match a policy-based VPN tunnel local selector. - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - - // The packet does not match a policy-based VPN tunnel remote selector. - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - - // Packet with internal destination address sent to the internet gateway. - PRIVATE_TRAFFIC_TO_INTERNET = 7; - - // Instance with only an internal IP address tries to access Google API and - // services, but private Google access is not enabled in the subnet. - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - - // Source endpoint tries to access Google API and services through the VPN - // tunnel to another network, but Private Google Access needs to be enabled - // in the source endpoint network. - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - - // Instance with only an internal IP address tries to access external hosts, - // but Cloud NAT is not enabled in the subnet, unless special configurations - // on a VM allow this connection. - NO_EXTERNAL_ADDRESS = 9; - - // Destination internal address cannot be resolved to a known target. If - // this is a shared VPC scenario, verify if the service project ID is - // provided as test input. Otherwise, verify if the IP address is being - // used in the project. - UNKNOWN_INTERNAL_ADDRESS = 10; - - // Forwarding rule's protocol and ports do not match the packet header. - FORWARDING_RULE_MISMATCH = 11; - - // Forwarding rule does not have backends configured. - FORWARDING_RULE_NO_INSTANCES = 12; - - // Firewalls block the health check probes to the backends and cause - // the backends to be unavailable for traffic from the load balancer. - // For more details, see [Health check firewall - // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - - // Packet is sent from or to a Compute Engine instance that is not in a - // running state. - INSTANCE_NOT_RUNNING = 14; - - // Packet sent from or to a GKE cluster that is not in running state. - GKE_CLUSTER_NOT_RUNNING = 27; - - // Packet sent from or to a Cloud SQL instance that is not in running state. - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - - // Packet sent from or to a Redis Instance that is not in running state. - REDIS_INSTANCE_NOT_RUNNING = 68; - - // Packet sent from or to a Redis Cluster that is not in running state. - REDIS_CLUSTER_NOT_RUNNING = 69; - - // The type of traffic is blocked and the user cannot configure a firewall - // rule to enable it. See [Always blocked - // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - // more details. - TRAFFIC_TYPE_BLOCKED = 15; - - // Access to Google Kubernetes Engine cluster master's endpoint is not - // authorized. See [Access to the cluster - // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - // for more details. - GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - - // Access to the Cloud SQL instance endpoint is not authorized. - // See [Authorizing with authorized - // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - // more details. - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - - // Packet was dropped inside Google Kubernetes Engine Service. - DROPPED_INSIDE_GKE_SERVICE = 18; - - // Packet was dropped inside Cloud SQL Service. - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - - // Packet was dropped because there is no peering between the originating - // network and the Google Managed Services Network. - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - - // Packet was dropped because the Google-managed service uses Private - // Service Connect (PSC), but the PSC endpoint is not found in the project. - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - - // Packet was dropped because the GKE cluster uses Private Service Connect - // (PSC), but the PSC endpoint is not found in the project. - GKE_PSC_ENDPOINT_MISSING = 36; - - // Packet was dropped because the Cloud SQL instance has neither a private - // nor a public IP address. - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - - // Packet was dropped because a GKE cluster private endpoint is - // unreachable from a region different from the cluster's region. - GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - - // Packet sent from a public GKE cluster control plane to a private - // IP address. - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - - // Packet was dropped because there is no route from a GKE cluster - // control plane to a destination network. - GKE_CONTROL_PLANE_NO_ROUTE = 32; - - // Packet sent from a Cloud SQL instance to an external IP address is not - // allowed. The Cloud SQL instance is not configured to send packets to - // external IP addresses. - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - - // Packet sent from a Cloud SQL instance with only a public IP address to a - // private IP address. - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - - // Packet was dropped because there is no route from a Cloud SQL - // instance to a destination network. - CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - - // Packet was dropped because the Cloud SQL instance requires all - // connections to use Cloud SQL connectors and to target the Cloud SQL proxy - // port (3307). - CLOUD_SQL_CONNECTOR_REQUIRED = 63; - - // Packet could be dropped because the Cloud Function is not in an active - // status. - CLOUD_FUNCTION_NOT_ACTIVE = 22; - - // Packet could be dropped because no VPC connector is set. - VPC_CONNECTOR_NOT_SET = 23; - - // Packet could be dropped because the VPC connector is not in a running - // state. - VPC_CONNECTOR_NOT_RUNNING = 24; - - // Packet could be dropped because the traffic from the serverless service - // to the VPC connector is not allowed. - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; - - // Packet could be dropped because the health check traffic to the VPC - // connector is not allowed. - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; - - // Packet could be dropped because it was sent from a different region - // to a regional forwarding without global access. - FORWARDING_RULE_REGION_MISMATCH = 25; - - // The Private Service Connect endpoint is in a project that is not approved - // to connect to the service. - PSC_CONNECTION_NOT_ACCEPTED = 26; - - // The packet is sent to the Private Service Connect endpoint over the - // peering, but [it's not - // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule does not have - // global access enabled. - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule has multiple ports - // specified. - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group) targeting a Cloud SQL service attachment, but this - // configuration is not supported. - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - - // No NAT subnets are defined for the PSC service attachment. - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - - // PSC endpoint is accessed via NCC, but PSC transitivity configuration is - // not yet propagated. - PSC_TRANSITIVITY_NOT_PROPAGATED = 64; - - // The packet sent from the hybrid NEG proxy matches a non-dynamic route, - // but such a configuration is not supported. - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - - // The packet sent from the hybrid NEG proxy matches a dynamic route with a - // next hop in a different region, but such a configuration is not - // supported. - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - - // Packet sent from a Cloud Run revision that is not ready. - CLOUD_RUN_REVISION_NOT_READY = 29; - - // Packet was dropped inside Private Service Connect service producer. - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - - // Packet sent to a load balancer, which requires a proxy-only subnet and - // the subnet is not found. - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - - // Packet sent to Cloud Nat without active NAT IPs. - CLOUD_NAT_NO_ADDRESSES = 40; - - // Packet is stuck in a routing loop. - ROUTING_LOOP = 59; - - // Packet is dropped inside a Google-managed service due to being delivered - // in return trace to an endpoint that doesn't match the endpoint the packet - // was sent from in forward trace. Used only for return traces. - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; - - // Packet is dropped due to a load balancer backend instance not having a - // network interface in the network expected by the load balancer. - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; - - // Packet is dropped due to a backend service named port not being defined - // on the instance group level. - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; - - // Packet is dropped due to a destination IP range being part of a Private - // NAT IP range. - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; - - // Generic drop cause for a packet being dropped inside a Redis Instance - // service project. - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Instance. Port 6379 should be used to connect to a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PORT = 71; - - // Packet is dropped due to connecting from PUPI address to a PSA based - // Redis Instance. - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; - - // Packet is dropped due to no route to the destination network. - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; - - // Redis Instance does not have an external IP address. - REDIS_INSTANCE_NO_EXTERNAL_IP = 74; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Instance. Only TCP connections are accepted by a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; - - // Generic drop cause for a packet being dropped inside a Redis Cluster - // service project. - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to - // a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PORT = 76; - - // Redis Cluster does not have an external IP address. - REDIS_CLUSTER_NO_EXTERNAL_IP = 77; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix advertised - // via BGP by the Cloud Router. - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix included to - // the local traffic selector of the VPN tunnel. - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; - - // Packet from the unknown peered network is dropped due to no known route - // from the source network to the destination IP address. - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; - - // Sending packets processed by the Private NAT Gateways to the Private - // Service Connect endpoints is not supported. - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; - } - - // Cause that the packet is dropped. - Cause cause = 1; - - // URI of the resource that caused the drop. - string resource_uri = 2; - - // Source IP address of the dropped packet (if relevant). - string source_ip = 3; - - // Destination IP address of the dropped packet (if relevant). - string destination_ip = 4; - - // Region of the dropped packet (if relevant). - string region = 5; -} - -// For display only. Metadata associated with a Google Kubernetes Engine (GKE) -// cluster master. -message GKEMasterInfo { - // URI of a GKE cluster. - string cluster_uri = 2; - - // URI of a GKE cluster network. - string cluster_network_uri = 4; - - // Internal IP address of a GKE cluster control plane. - string internal_ip = 5; - - // External IP address of a GKE cluster control plane. - string external_ip = 6; - - // DNS endpoint of a GKE cluster control plane. - string dns_endpoint = 7; -} - -// For display only. Metadata associated with a Cloud SQL instance. -message CloudSQLInstanceInfo { - // Name of a Cloud SQL instance. - string display_name = 1; - - // URI of a Cloud SQL instance. - string uri = 2; - - // URI of a Cloud SQL instance network or empty string if the instance does - // not have one. - string network_uri = 4; - - // Internal IP address of a Cloud SQL instance. - string internal_ip = 5; - - // External IP address of a Cloud SQL instance. - string external_ip = 6; - - // Region in which the Cloud SQL instance is running. - string region = 7; -} - -// For display only. Metadata associated with a Cloud Redis Instance. -message RedisInstanceInfo { - // Name of a Cloud Redis Instance. - string display_name = 1; - - // URI of a Cloud Redis Instance. - string uri = 2; - - // URI of a Cloud Redis Instance network. - string network_uri = 3; - - // Primary endpoint IP address of a Cloud Redis Instance. - string primary_endpoint_ip = 4; - - // Read endpoint IP address of a Cloud Redis Instance (if applicable). - string read_endpoint_ip = 5; - - // Region in which the Cloud Redis Instance is defined. - string region = 6; -} - -// For display only. Metadata associated with a Redis Cluster. -message RedisClusterInfo { - // Name of a Redis Cluster. - string display_name = 1; - - // URI of a Redis Cluster in format - // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - string uri = 2; - - // URI of a Redis Cluster network in format - // "projects/{project_id}/global/networks/{network_id}". - string network_uri = 3; - - // Discovery endpoint IP address of a Redis Cluster. - string discovery_endpoint_ip_address = 4 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Secondary endpoint IP address of a Redis Cluster. - string secondary_endpoint_ip_address = 5 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the region in which the Redis Cluster is defined. For example, - // "us-central1". - string location = 6; -} - -// For display only. Metadata associated with a Cloud Function. -message CloudFunctionInfo { - // Name of a Cloud Function. - string display_name = 1; - - // URI of a Cloud Function. - string uri = 2; - - // Location in which the Cloud Function is deployed. - string location = 3; - - // Latest successfully deployed version id of the Cloud Function. - int64 version_id = 4; -} - -// For display only. Metadata associated with a Cloud Run revision. -message CloudRunRevisionInfo { - // Name of a Cloud Run revision. - string display_name = 1; - - // URI of a Cloud Run revision. - string uri = 2; - - // Location in which this revision is deployed. - string location = 4; - - // URI of Cloud Run service this revision belongs to. - string service_uri = 5; -} - -// For display only. Metadata associated with an App Engine version. -message AppEngineVersionInfo { - // Name of an App Engine version. - string display_name = 1; - - // URI of an App Engine version. - string uri = 2; - - // Runtime of the App Engine version. - string runtime = 3; - - // App Engine execution environment for a version. - string environment = 4; -} - -// For display only. Metadata associated with a VPC connector. -message VpcConnectorInfo { - // Name of a VPC connector. - string display_name = 1; - - // URI of a VPC connector. - string uri = 2; - - // Location in which the VPC connector is deployed. - string location = 3; -} - -// For display only. Metadata associated with NAT. -message NatInfo { - // Types of NAT. - enum Type { - // Type is unspecified. - TYPE_UNSPECIFIED = 0; - - // From Compute Engine instance's internal address to external address. - INTERNAL_TO_EXTERNAL = 1; - - // From Compute Engine instance's external address to internal address. - EXTERNAL_TO_INTERNAL = 2; - - // Cloud NAT Gateway. - CLOUD_NAT = 3; - - // Private service connect NAT. - PRIVATE_SERVICE_CONNECT = 4; - } - - // Type of NAT. - Type type = 1; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 2; - - // URI of the network where NAT translation takes place. - string network_uri = 3; - - // Source IP address before NAT translation. - string old_source_ip = 4; - - // Source IP address after NAT translation. - string new_source_ip = 5; - - // Destination IP address before NAT translation. - string old_destination_ip = 6; - - // Destination IP address after NAT translation. - string new_destination_ip = 7; - - // Source port before NAT translation. Only valid when protocol is TCP or UDP. - int32 old_source_port = 8; - - // Source port after NAT translation. Only valid when protocol is TCP or UDP. - int32 new_source_port = 9; - - // Destination port before NAT translation. Only valid when protocol is TCP or - // UDP. - int32 old_destination_port = 10; - - // Destination port after NAT translation. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 11; - - // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - string router_uri = 12; - - // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - string nat_gateway_name = 13; -} - -// For display only. Metadata associated with ProxyConnection. -message ProxyConnectionInfo { - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 1; - - // Source IP address of an original connection. - string old_source_ip = 2; - - // Source IP address of a new connection. - string new_source_ip = 3; - - // Destination IP address of an original connection - string old_destination_ip = 4; - - // Destination IP address of a new connection. - string new_destination_ip = 5; - - // Source port of an original connection. Only valid when protocol is TCP or - // UDP. - int32 old_source_port = 6; - - // Source port of a new connection. Only valid when protocol is TCP or UDP. - int32 new_source_port = 7; - - // Destination port of an original connection. Only valid when protocol is TCP - // or UDP. - int32 old_destination_port = 8; - - // Destination port of a new connection. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 9; - - // Uri of proxy subnet. - string subnet_uri = 10; - - // URI of the network where connection is proxied. - string network_uri = 11; -} - -// For display only. Metadata associated with the load balancer backend. -message LoadBalancerBackendInfo { - // Health check firewalls configuration state enum. - enum HealthCheckFirewallsConfigState { - // Configuration state unspecified. It usually means that the backend has - // no health check attached, or there was an unexpected configuration error - // preventing Connectivity tests from verifying health check configuration. - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - - // Firewall rules (policies) allowing health check traffic from all required - // IP ranges to the backend are configured. - FIREWALLS_CONFIGURED = 1; - - // Firewall rules (policies) allow health check traffic only from a part of - // required IP ranges. - FIREWALLS_PARTIALLY_CONFIGURED = 2; - - // Firewall rules (policies) deny health check traffic from all required - // IP ranges to the backend. - FIREWALLS_NOT_CONFIGURED = 3; - - // The network contains firewall rules of unsupported types, so Connectivity - // tests were not able to verify health check configuration status. Please - // refer to the documentation for the list of unsupported configurations: - // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - FIREWALLS_UNSUPPORTED = 4; - } - - // Display name of the backend. For example, it might be an instance name for - // the instance group backends, or an IP address and port for zonal network - // endpoint group backends. - string name = 1; - - // URI of the backend instance (if applicable). Populated for instance group - // backends, and zonal NEG backends. - string instance_uri = 2; - - // URI of the backend service this backend belongs to (if applicable). - string backend_service_uri = 3; - - // URI of the instance group this backend belongs to (if applicable). - string instance_group_uri = 4; - - // URI of the network endpoint group this backend belongs to (if applicable). - string network_endpoint_group_uri = 5; - - // URI of the backend bucket this backend targets (if applicable). - string backend_bucket_uri = 8; - - // URI of the PSC service attachment this PSC NEG backend targets (if - // applicable). - string psc_service_attachment_uri = 9; - - // PSC Google API target this PSC NEG backend targets (if applicable). - string psc_google_api_target = 10; - - // URI of the health check attached to this backend (if applicable). - string health_check_uri = 6; - - // Output only. Health check firewalls configuration state for the backend. - // This is a result of the static firewall analysis (verifying that health - // check traffic from required IP ranges to the backend is allowed or not). - // The backend might still be unhealthy even if these firewalls are - // configured. Please refer to the documentation for more information: - // https://cloud.google.com/load-balancing/docs/firewall-rules - HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Type of a load balancer. For more information, see [Summary of Google Cloud -// load -// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). -enum LoadBalancerType { - // Forwarding rule points to a different target than a load balancer or a - // load balancer type is unknown. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Global external HTTP(S) load balancer. - HTTPS_ADVANCED_LOAD_BALANCER = 1; - - // Global external HTTP(S) load balancer (classic) - HTTPS_LOAD_BALANCER = 2; - - // Regional external HTTP(S) load balancer. - REGIONAL_HTTPS_LOAD_BALANCER = 3; - - // Internal HTTP(S) load balancer. - INTERNAL_HTTPS_LOAD_BALANCER = 4; - - // External SSL proxy load balancer. - SSL_PROXY_LOAD_BALANCER = 5; - - // External TCP proxy load balancer. - TCP_PROXY_LOAD_BALANCER = 6; - - // Internal regional TCP proxy load balancer. - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - - // External TCP/UDP Network load balancer. - NETWORK_LOAD_BALANCER = 8; - - // Target-pool based external TCP/UDP Network load balancer. - LEGACY_NETWORK_LOAD_BALANCER = 9; - - // Internal TCP/UDP load balancer. - TCP_UDP_INTERNAL_LOAD_BALANCER = 10; -} - -// For display only. Metadata associated with Storage Bucket. -message StorageBucketInfo { - // Cloud Storage Bucket name. - string bucket = 1; -} - -// For display only. Metadata associated with the serverless network endpoint -// group backend. -message ServerlessNegInfo { - // URI of the serverless network endpoint group. - string neg_uri = 1; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto deleted file mode 100644 index bb6d06d3af6..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto +++ /dev/null @@ -1,228 +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.networkmanagement.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1beta1/reachability.proto"; -import "google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "VpcFlowLogsProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// The VPC Flow Logs service in the Google Cloud Network Management API provides -// configurations that generate Flow Logs. The service and the configuration -// resources created using this service are global. -service VpcFlowLogsService { - option (google.api.default_host) = "networkmanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all `VpcFlowLogsConfigs` in a given project. - rpc ListVpcFlowLogsConfigs(ListVpcFlowLogsConfigsRequest) - returns (ListVpcFlowLogsConfigsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific `VpcFlowLogsConfig`. - rpc GetVpcFlowLogsConfig(GetVpcFlowLogsConfigRequest) - returns (VpcFlowLogsConfig) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new `VpcFlowLogsConfig`. - // If a configuration with the exact same settings already exists (even if the - // ID is different), the creation fails. - // Notes: - // 1. Creating a configuration with state=DISABLED will fail. - // 2. The following fields are not considrered as `settings` for the purpose - // of the check mentioned above, therefore - creating another configuration - // with the same fields but different values for the following fields will - // fail as well: - // - name - // - create_time - // - update_time - // - labels - // - description - rpc CreateVpcFlowLogsConfig(CreateVpcFlowLogsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" - body: "vpc_flow_logs_config" - }; - option (google.api.method_signature) = - "parent,vpc_flow_logs_config,vpc_flow_logs_config_id"; - option (google.longrunning.operation_info) = { - response_type: "VpcFlowLogsConfig" - metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }; - } - - // Updates an existing `VpcFlowLogsConfig`. - // If a configuration with the exact same settings already exists (even if the - // ID is different), the creation fails. - // Notes: - // 1. The following fields are not considrered as `settings` for the purpose - // of the check mentioned above, therefore - updating another configuration - // with the same fields but different values for the following fields will - // fail as well: - // - name - // - create_time - // - update_time - // - labels - // - description - rpc UpdateVpcFlowLogsConfig(UpdateVpcFlowLogsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - body: "vpc_flow_logs_config" - }; - option (google.api.method_signature) = "vpc_flow_logs_config,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "VpcFlowLogsConfig" - metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }; - } - - // Deletes a specific `VpcFlowLogsConfig`. - rpc DeleteVpcFlowLogsConfig(DeleteVpcFlowLogsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }; - } -} - -// Request for the `ListVpcFlowLogsConfigs` method. -message ListVpcFlowLogsConfigsRequest { - // Required. The parent resource of the VpcFlowLogsConfig: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; - - // Optional. Number of `VpcFlowLogsConfigs` to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token from an earlier query, as returned in - // `next_page_token`. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - // A filter expression must use the supported [CEL logic operators] - // (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to use to sort the list. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response for the `ListVpcFlowLogsConfigs` method. -message ListVpcFlowLogsConfigsResponse { - // List of VPC Flow Log configurations. - repeated VpcFlowLogsConfig vpc_flow_logs_configs = 1; - - // Page token to fetch the next set of configurations. - string next_page_token = 2; - - // Locations that could not be reached (when querying all locations with `-`). - repeated string unreachable = 3; -} - -// Request for the `GetVpcFlowLogsConfig` method. -message GetVpcFlowLogsConfigRequest { - // Required. `VpcFlowLogsConfig` resource name using the form: - // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; -} - -// Request for the `CreateVpcFlowLogsConfig` method. -message CreateVpcFlowLogsConfigRequest { - // Required. The parent resource of the VPC Flow Logs configuration to create: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; - - // Required. ID of the `VpcFlowLogsConfig`. - string vpc_flow_logs_config_id = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; - - // Required. A `VpcFlowLogsConfig` resource - VpcFlowLogsConfig vpc_flow_logs_config = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `UpdateVpcFlowLogsConfig` method. -message UpdateVpcFlowLogsConfigRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - VpcFlowLogsConfig vpc_flow_logs_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `DeleteVpcFlowLogsConfig` method. -message DeleteVpcFlowLogsConfigRequest { - // Required. `VpcFlowLogsConfig` resource name using the form: - // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto deleted file mode 100644 index 03137065ab0..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto +++ /dev/null @@ -1,152 +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.networkmanagement.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "VpcFlowLogsConfigProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// A configuration to generate VPC Flow Logs. -message VpcFlowLogsConfig { - option (google.api.resource) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - pattern: "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}" - plural: "vpcFlowLogsConfigs" - singular: "vpcFlowLogsConfig" - }; - - // Determines whether this configuration will be generating logs. - // Setting state=DISABLED will pause the log generation for this config. - enum State { - // If not specified, will default to ENABLED. - STATE_UNSPECIFIED = 0; - - // When ENABLED, this configuration will generate logs. - ENABLED = 1; - - // When DISABLED, this configuration will not generate logs. - DISABLED = 2; - } - - // Toggles the aggregation interval for collecting flow logs by 5-tuple. - enum AggregationInterval { - // If not specified, will default to INTERVAL_5_SEC. - AGGREGATION_INTERVAL_UNSPECIFIED = 0; - - // Aggregate logs in 5s intervals. - INTERVAL_5_SEC = 1; - - // Aggregate logs in 30s intervals. - INTERVAL_30_SEC = 2; - - // Aggregate logs in 1m intervals. - INTERVAL_1_MIN = 3; - - // Aggregate logs in 5m intervals. - INTERVAL_5_MIN = 4; - - // Aggregate logs in 10m intervals. - INTERVAL_10_MIN = 5; - - // Aggregate logs in 15m intervals. - INTERVAL_15_MIN = 6; - } - - // Configures which log fields would be included. - enum Metadata { - // If not specified, will default to INCLUDE_ALL_METADATA. - METADATA_UNSPECIFIED = 0; - - // Include all metadata fields. - INCLUDE_ALL_METADATA = 1; - - // Exclude all metadata fields. - EXCLUDE_ALL_METADATA = 2; - - // Include only custom fields (specified in metadata_fields). - CUSTOM_METADATA = 3; - } - - // Identifier. Unique name of the configuration using the form: - // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The user-supplied description of the VPC Flow Logs configuration. - // Maximum of 512 characters. - optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The state of the VPC Flow Log configuration. Default value is - // ENABLED. When creating a new configuration, it must be enabled. - optional State state = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The aggregation interval for the logs. Default value is - // INTERVAL_5_SEC. - optional AggregationInterval aggregation_interval = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The value of the field must be in (0, 1]. The sampling rate of - // VPC Flow Logs where 1.0 means all collected logs are reported. Setting the - // sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, - // use the state field instead. Default value is 1.0. - optional float flow_sampling = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configures whether all, none or a subset of metadata fields - // should be added to the reported VPC flow logs. Default value is - // INCLUDE_ALL_METADATA. - optional Metadata metadata = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Custom metadata fields to include in the reported VPC flow logs. - // Can only be specified if "metadata" was set to CUSTOM_METADATA. - repeated string metadata_fields = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Export filter used to define which VPC Flow Logs should be - // logged. - optional string filter_expr = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Reference to the resource of the config scope. That is, the scope from - // which traffic is logged. The target resource must belong to the same - // project as the configuration. - oneof target_resource { - // Traffic will be logged from the Interconnect Attachment. - // Format: - // projects/{project_id}/regions/{region}/interconnectAttachments/{name} - string interconnect_attachment = 102; - - // Traffic will be logged from the VPN Tunnel. - // Format: projects/{project_id}/regions/{region}/vpnTunnels/{name} - string vpn_tunnel = 103; - } - - // Optional. Resource labels to represent user-provided metadata. - map labels = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time the config was created. - google.protobuf.Timestamp create_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the config was updated. - google.protobuf.Timestamp update_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts deleted file mode 100644 index e4ee0905dff..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts +++ /dev/null @@ -1,15637 +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 networkmanagement. */ - namespace networkmanagement { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a ConnectivityTest. */ - interface IConnectivityTest { - - /** ConnectivityTest name */ - name?: (string|null); - - /** ConnectivityTest description */ - description?: (string|null); - - /** ConnectivityTest source */ - source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest destination */ - destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest protocol */ - protocol?: (string|null); - - /** ConnectivityTest relatedProjects */ - relatedProjects?: (string[]|null); - - /** ConnectivityTest displayName */ - displayName?: (string|null); - - /** ConnectivityTest labels */ - labels?: ({ [k: string]: string }|null); - - /** ConnectivityTest createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails */ - reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails */ - probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks */ - bypassFirewallChecks?: (boolean|null); - } - - /** Represents a ConnectivityTest. */ - class ConnectivityTest implements IConnectivityTest { - - /** - * Constructs a new ConnectivityTest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest); - - /** ConnectivityTest name. */ - public name: string; - - /** ConnectivityTest description. */ - public description: string; - - /** ConnectivityTest source. */ - public source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest destination. */ - public destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest protocol. */ - public protocol: string; - - /** ConnectivityTest relatedProjects. */ - public relatedProjects: string[]; - - /** ConnectivityTest displayName. */ - public displayName: string; - - /** ConnectivityTest labels. */ - public labels: { [k: string]: string }; - - /** ConnectivityTest createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails. */ - public reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails. */ - public probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks. */ - public bypassFirewallChecks: boolean; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectivityTest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Verifies a ConnectivityTest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectivityTest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @param message ConnectivityTest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectivityTest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectivityTest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoint. */ - interface IEndpoint { - - /** Endpoint ipAddress */ - ipAddress?: (string|null); - - /** Endpoint port */ - port?: (number|null); - - /** Endpoint instance */ - instance?: (string|null); - - /** Endpoint forwardingRule */ - forwardingRule?: (string|null); - - /** Endpoint forwardingRuleTarget */ - forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId */ - loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster */ - gkeMasterCluster?: (string|null); - - /** Endpoint fqdn */ - fqdn?: (string|null); - - /** Endpoint cloudSqlInstance */ - cloudSqlInstance?: (string|null); - - /** Endpoint redisInstance */ - redisInstance?: (string|null); - - /** Endpoint redisCluster */ - redisCluster?: (string|null); - - /** Endpoint cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network */ - network?: (string|null); - - /** Endpoint networkType */ - networkType?: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null); - - /** Endpoint projectId */ - projectId?: (string|null); - } - - /** Represents an Endpoint. */ - class Endpoint implements IEndpoint { - - /** - * Constructs a new Endpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint); - - /** Endpoint ipAddress. */ - public ipAddress: string; - - /** Endpoint port. */ - public port: number; - - /** Endpoint instance. */ - public instance: string; - - /** Endpoint forwardingRule. */ - public forwardingRule: string; - - /** Endpoint forwardingRuleTarget. */ - public forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId. */ - public loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType. */ - public loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster. */ - public gkeMasterCluster: string; - - /** Endpoint fqdn. */ - public fqdn: string; - - /** Endpoint cloudSqlInstance. */ - public cloudSqlInstance: string; - - /** Endpoint redisInstance. */ - public redisInstance: string; - - /** Endpoint redisCluster. */ - public redisCluster: string; - - /** Endpoint cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network. */ - public network: string; - - /** Endpoint networkType. */ - public networkType: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType); - - /** Endpoint projectId. */ - public projectId: string; - - /** Endpoint _forwardingRuleTarget. */ - public _forwardingRuleTarget?: "forwardingRuleTarget"; - - /** Endpoint _loadBalancerId. */ - public _loadBalancerId?: "loadBalancerId"; - - /** Endpoint _loadBalancerType. */ - public _loadBalancerType?: "loadBalancerType"; - - /** - * Creates a new Endpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Verifies an Endpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Endpoint { - - /** NetworkType enum. */ - enum NetworkType { - NETWORK_TYPE_UNSPECIFIED = 0, - GCP_NETWORK = 1, - NON_GCP_NETWORK = 2 - } - - /** ForwardingRuleTarget enum. */ - enum ForwardingRuleTarget { - FORWARDING_RULE_TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - LOAD_BALANCER = 2, - VPN_GATEWAY = 3, - PSC = 4 - } - - /** Properties of a CloudFunctionEndpoint. */ - interface ICloudFunctionEndpoint { - - /** CloudFunctionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudFunctionEndpoint. */ - class CloudFunctionEndpoint implements ICloudFunctionEndpoint { - - /** - * Constructs a new CloudFunctionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint); - - /** CloudFunctionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Verifies a CloudFunctionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @param message CloudFunctionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionEndpoint. */ - interface IAppEngineVersionEndpoint { - - /** AppEngineVersionEndpoint uri */ - uri?: (string|null); - } - - /** Represents an AppEngineVersionEndpoint. */ - class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { - - /** - * Constructs a new AppEngineVersionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint); - - /** AppEngineVersionEndpoint uri. */ - public uri: string; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @param message AppEngineVersionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionEndpoint. */ - interface ICloudRunRevisionEndpoint { - - /** CloudRunRevisionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudRunRevisionEndpoint. */ - class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint); - - /** CloudRunRevisionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @param message CloudRunRevisionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ReachabilityDetails. */ - interface IReachabilityDetails { - - /** ReachabilityDetails result */ - result?: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null); - - /** ReachabilityDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error */ - error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces */ - traces?: (google.cloud.networkmanagement.v1beta1.ITrace[]|null); - } - - /** Represents a ReachabilityDetails. */ - class ReachabilityDetails implements IReachabilityDetails { - - /** - * Constructs a new ReachabilityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails); - - /** ReachabilityDetails result. */ - public result: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result); - - /** ReachabilityDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces. */ - public traces: google.cloud.networkmanagement.v1beta1.ITrace[]; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ReachabilityDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Verifies a ReachabilityDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReachabilityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @param message ReachabilityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReachabilityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReachabilityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReachabilityDetails { - - /** Result enum. */ - enum Result { - RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - AMBIGUOUS = 4, - UNDETERMINED = 5 - } - } - - /** Properties of a LatencyPercentile. */ - interface ILatencyPercentile { - - /** LatencyPercentile percent */ - percent?: (number|null); - - /** LatencyPercentile latencyMicros */ - latencyMicros?: (number|Long|string|null); - } - - /** Represents a LatencyPercentile. */ - class LatencyPercentile implements ILatencyPercentile { - - /** - * Constructs a new LatencyPercentile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile); - - /** LatencyPercentile percent. */ - public percent: number; - - /** LatencyPercentile latencyMicros. */ - public latencyMicros: (number|Long|string); - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyPercentile instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Verifies a LatencyPercentile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyPercentile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @param message LatencyPercentile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyPercentile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyPercentile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LatencyDistribution. */ - interface ILatencyDistribution { - - /** LatencyDistribution latencyPercentiles */ - latencyPercentiles?: (google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]|null); - } - - /** Represents a LatencyDistribution. */ - class LatencyDistribution implements ILatencyDistribution { - - /** - * Constructs a new LatencyDistribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution); - - /** LatencyDistribution latencyPercentiles. */ - public latencyPercentiles: google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyDistribution instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Verifies a LatencyDistribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyDistribution - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @param message LatencyDistribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyDistribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyDistribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProbingDetails. */ - interface IProbingDetails { - - /** ProbingDetails result */ - result?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null); - - /** ProbingDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error */ - error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause */ - abortCause?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null); - - /** ProbingDetails sentProbeCount */ - sentProbeCount?: (number|null); - - /** ProbingDetails successfulProbeCount */ - successfulProbeCount?: (number|null); - - /** ProbingDetails endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** ProbingDetails probingLatency */ - probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation */ - destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); - } - - /** Represents a ProbingDetails. */ - class ProbingDetails implements IProbingDetails { - - /** - * Constructs a new ProbingDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails); - - /** ProbingDetails result. */ - public result: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult); - - /** ProbingDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause. */ - public abortCause: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause); - - /** ProbingDetails sentProbeCount. */ - public sentProbeCount: number; - - /** ProbingDetails successfulProbeCount. */ - public successfulProbeCount: number; - - /** ProbingDetails endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** ProbingDetails probingLatency. */ - public probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation. */ - public destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ProbingDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Verifies a ProbingDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProbingDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @param message ProbingDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProbingDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProbingDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProbingDetails { - - /** ProbingResult enum. */ - enum ProbingResult { - PROBING_RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - REACHABILITY_INCONSISTENT = 3, - UNDETERMINED = 4 - } - - /** ProbingAbortCause enum. */ - enum ProbingAbortCause { - PROBING_ABORT_CAUSE_UNSPECIFIED = 0, - PERMISSION_DENIED = 1, - NO_SOURCE_LOCATION = 2 - } - - /** Properties of an EdgeLocation. */ - interface IEdgeLocation { - - /** EdgeLocation metropolitanArea */ - metropolitanArea?: (string|null); - } - - /** Represents an EdgeLocation. */ - class EdgeLocation implements IEdgeLocation { - - /** - * Constructs a new EdgeLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation); - - /** EdgeLocation metropolitanArea. */ - public metropolitanArea: string; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns EdgeLocation instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Verifies an EdgeLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EdgeLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @param message EdgeLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EdgeLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EdgeLocation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Trace. */ - interface ITrace { - - /** Trace endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Trace steps */ - steps?: (google.cloud.networkmanagement.v1beta1.IStep[]|null); - - /** Trace forwardTraceId */ - forwardTraceId?: (number|null); - } - - /** Represents a Trace. */ - class Trace implements ITrace { - - /** - * Constructs a new Trace. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ITrace); - - /** Trace endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Trace steps. */ - public steps: google.cloud.networkmanagement.v1beta1.IStep[]; - - /** Trace forwardTraceId. */ - public forwardTraceId: number; - - /** - * Creates a new Trace instance using the specified properties. - * @param [properties] Properties to set - * @returns Trace instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ITrace): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Verifies a Trace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trace - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @param message Trace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trace - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Step. */ - interface IStep { - - /** Step description */ - description?: (string|null); - - /** Step state */ - state?: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State|null); - - /** Step causesDrop */ - causesDrop?: (boolean|null); - - /** Step projectId */ - projectId?: (string|null); - - /** Step instance */ - instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); - - /** Step firewall */ - firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); - - /** Step route */ - route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); - - /** Step endpoint */ - endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Step googleService */ - googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); - - /** Step forwardingRule */ - forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); - - /** Step vpnGateway */ - vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); - - /** Step vpnTunnel */ - vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); - - /** Step vpcConnector */ - vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); - - /** Step deliver */ - deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); - - /** Step forward */ - forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); - - /** Step abort */ - abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); - - /** Step drop */ - drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); - - /** Step loadBalancer */ - loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); - - /** Step network */ - network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); - - /** Step gkeMaster */ - gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance */ - cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance */ - redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); - - /** Step redisCluster */ - redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); - - /** Step cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); - - /** Step appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); - - /** Step nat */ - nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); - - /** Step proxyConnection */ - proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo */ - loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket */ - storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); - - /** Step serverlessNeg */ - serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); - } - - /** Represents a Step. */ - class Step implements IStep { - - /** - * Constructs a new Step. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IStep); - - /** Step description. */ - public description: string; - - /** Step state. */ - public state: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State); - - /** Step causesDrop. */ - public causesDrop: boolean; - - /** Step projectId. */ - public projectId: string; - - /** Step instance. */ - public instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); - - /** Step firewall. */ - public firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); - - /** Step route. */ - public route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); - - /** Step endpoint. */ - public endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Step googleService. */ - public googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); - - /** Step forwardingRule. */ - public forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); - - /** Step vpnGateway. */ - public vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); - - /** Step vpnTunnel. */ - public vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); - - /** Step vpcConnector. */ - public vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); - - /** Step deliver. */ - public deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); - - /** Step forward. */ - public forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); - - /** Step abort. */ - public abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); - - /** Step drop. */ - public drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); - - /** Step loadBalancer. */ - public loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); - - /** Step network. */ - public network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); - - /** Step gkeMaster. */ - public gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance. */ - public cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance. */ - public redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); - - /** Step redisCluster. */ - public redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); - - /** Step cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); - - /** Step appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); - - /** Step nat. */ - public nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); - - /** Step proxyConnection. */ - public proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo. */ - public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket. */ - public storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); - - /** Step serverlessNeg. */ - public serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); - - /** Step stepInfo. */ - public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); - - /** - * Creates a new Step instance using the specified properties. - * @param [properties] Properties to set - * @returns Step instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IStep): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Step message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Verifies a Step message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Step - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @param message Step - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Step to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Step - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Step { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - START_FROM_INSTANCE = 1, - START_FROM_INTERNET = 2, - START_FROM_GOOGLE_SERVICE = 27, - START_FROM_PRIVATE_NETWORK = 3, - START_FROM_GKE_MASTER = 21, - START_FROM_CLOUD_SQL_INSTANCE = 22, - START_FROM_REDIS_INSTANCE = 32, - START_FROM_REDIS_CLUSTER = 33, - START_FROM_CLOUD_FUNCTION = 23, - START_FROM_APP_ENGINE_VERSION = 25, - START_FROM_CLOUD_RUN_REVISION = 26, - START_FROM_STORAGE_BUCKET = 29, - START_FROM_PSC_PUBLISHED_SERVICE = 30, - START_FROM_SERVERLESS_NEG = 31, - APPLY_INGRESS_FIREWALL_RULE = 4, - APPLY_EGRESS_FIREWALL_RULE = 5, - APPLY_ROUTE = 6, - APPLY_FORWARDING_RULE = 7, - ANALYZE_LOAD_BALANCER_BACKEND = 28, - SPOOFING_APPROVED = 8, - ARRIVE_AT_INSTANCE = 9, - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, - ARRIVE_AT_VPN_GATEWAY = 12, - ARRIVE_AT_VPN_TUNNEL = 13, - ARRIVE_AT_VPC_CONNECTOR = 24, - NAT = 14, - PROXY_CONNECTION = 15, - DELIVER = 16, - DROP = 17, - FORWARD = 18, - ABORT = 19, - VIEWER_PERMISSION_MISSING = 20 - } - } - - /** Properties of an InstanceInfo. */ - interface IInstanceInfo { - - /** InstanceInfo displayName */ - displayName?: (string|null); - - /** InstanceInfo uri */ - uri?: (string|null); - - /** InstanceInfo interface */ - "interface"?: (string|null); - - /** InstanceInfo networkUri */ - networkUri?: (string|null); - - /** InstanceInfo internalIp */ - internalIp?: (string|null); - - /** InstanceInfo externalIp */ - externalIp?: (string|null); - - /** InstanceInfo networkTags */ - networkTags?: (string[]|null); - - /** InstanceInfo serviceAccount */ - serviceAccount?: (string|null); - - /** InstanceInfo pscNetworkAttachmentUri */ - pscNetworkAttachmentUri?: (string|null); - } - - /** Represents an InstanceInfo. */ - class InstanceInfo implements IInstanceInfo { - - /** - * Constructs a new InstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo); - - /** InstanceInfo displayName. */ - public displayName: string; - - /** InstanceInfo uri. */ - public uri: string; - - /** InstanceInfo interface. */ - public interface: string; - - /** InstanceInfo networkUri. */ - public networkUri: string; - - /** InstanceInfo internalIp. */ - public internalIp: string; - - /** InstanceInfo externalIp. */ - public externalIp: string; - - /** InstanceInfo networkTags. */ - public networkTags: string[]; - - /** InstanceInfo serviceAccount. */ - public serviceAccount: string; - - /** InstanceInfo pscNetworkAttachmentUri. */ - public pscNetworkAttachmentUri: string; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Verifies an InstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @param message InstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInfo. */ - interface INetworkInfo { - - /** NetworkInfo displayName */ - displayName?: (string|null); - - /** NetworkInfo uri */ - uri?: (string|null); - - /** NetworkInfo matchedSubnetUri */ - matchedSubnetUri?: (string|null); - - /** NetworkInfo matchedIpRange */ - matchedIpRange?: (string|null); - - /** NetworkInfo region */ - region?: (string|null); - } - - /** Represents a NetworkInfo. */ - class NetworkInfo implements INetworkInfo { - - /** - * Constructs a new NetworkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo); - - /** NetworkInfo displayName. */ - public displayName: string; - - /** NetworkInfo uri. */ - public uri: string; - - /** NetworkInfo matchedSubnetUri. */ - public matchedSubnetUri: string; - - /** NetworkInfo matchedIpRange. */ - public matchedIpRange: string; - - /** NetworkInfo region. */ - public region: string; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Verifies a NetworkInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @param message NetworkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FirewallInfo. */ - interface IFirewallInfo { - - /** FirewallInfo displayName */ - displayName?: (string|null); - - /** FirewallInfo uri */ - uri?: (string|null); - - /** FirewallInfo direction */ - direction?: (string|null); - - /** FirewallInfo action */ - action?: (string|null); - - /** FirewallInfo priority */ - priority?: (number|null); - - /** FirewallInfo networkUri */ - networkUri?: (string|null); - - /** FirewallInfo targetTags */ - targetTags?: (string[]|null); - - /** FirewallInfo targetServiceAccounts */ - targetServiceAccounts?: (string[]|null); - - /** FirewallInfo policy */ - policy?: (string|null); - - /** FirewallInfo policyUri */ - policyUri?: (string|null); - - /** FirewallInfo firewallRuleType */ - firewallRuleType?: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null); - } - - /** Represents a FirewallInfo. */ - class FirewallInfo implements IFirewallInfo { - - /** - * Constructs a new FirewallInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo); - - /** FirewallInfo displayName. */ - public displayName: string; - - /** FirewallInfo uri. */ - public uri: string; - - /** FirewallInfo direction. */ - public direction: string; - - /** FirewallInfo action. */ - public action: string; - - /** FirewallInfo priority. */ - public priority: number; - - /** FirewallInfo networkUri. */ - public networkUri: string; - - /** FirewallInfo targetTags. */ - public targetTags: string[]; - - /** FirewallInfo targetServiceAccounts. */ - public targetServiceAccounts: string[]; - - /** FirewallInfo policy. */ - public policy: string; - - /** FirewallInfo policyUri. */ - public policyUri: string; - - /** FirewallInfo firewallRuleType. */ - public firewallRuleType: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType); - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FirewallInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Verifies a FirewallInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FirewallInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @param message FirewallInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FirewallInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FirewallInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FirewallInfo { - - /** FirewallRuleType enum. */ - enum FirewallRuleType { - FIREWALL_RULE_TYPE_UNSPECIFIED = 0, - HIERARCHICAL_FIREWALL_POLICY_RULE = 1, - VPC_FIREWALL_RULE = 2, - IMPLIED_VPC_FIREWALL_RULE = 3, - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, - NETWORK_FIREWALL_POLICY_RULE = 5, - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, - UNSUPPORTED_FIREWALL_POLICY_RULE = 100, - TRACKING_STATE = 101 - } - } - - /** Properties of a RouteInfo. */ - interface IRouteInfo { - - /** RouteInfo routeType */ - routeType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null); - - /** RouteInfo nextHopType */ - nextHopType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null); - - /** RouteInfo routeScope */ - routeScope?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null); - - /** RouteInfo displayName */ - displayName?: (string|null); - - /** RouteInfo uri */ - uri?: (string|null); - - /** RouteInfo region */ - region?: (string|null); - - /** RouteInfo destIpRange */ - destIpRange?: (string|null); - - /** RouteInfo nextHop */ - nextHop?: (string|null); - - /** RouteInfo networkUri */ - networkUri?: (string|null); - - /** RouteInfo priority */ - priority?: (number|null); - - /** RouteInfo instanceTags */ - instanceTags?: (string[]|null); - - /** RouteInfo srcIpRange */ - srcIpRange?: (string|null); - - /** RouteInfo destPortRanges */ - destPortRanges?: (string[]|null); - - /** RouteInfo srcPortRanges */ - srcPortRanges?: (string[]|null); - - /** RouteInfo protocols */ - protocols?: (string[]|null); - - /** RouteInfo nccHubUri */ - nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri */ - nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri */ - advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri */ - advertisedRouteNextHopUri?: (string|null); - } - - /** Represents a RouteInfo. */ - class RouteInfo implements IRouteInfo { - - /** - * Constructs a new RouteInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo); - - /** RouteInfo routeType. */ - public routeType: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType); - - /** RouteInfo nextHopType. */ - public nextHopType: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType); - - /** RouteInfo routeScope. */ - public routeScope: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope); - - /** RouteInfo displayName. */ - public displayName: string; - - /** RouteInfo uri. */ - public uri: string; - - /** RouteInfo region. */ - public region: string; - - /** RouteInfo destIpRange. */ - public destIpRange: string; - - /** RouteInfo nextHop. */ - public nextHop: string; - - /** RouteInfo networkUri. */ - public networkUri: string; - - /** RouteInfo priority. */ - public priority: number; - - /** RouteInfo instanceTags. */ - public instanceTags: string[]; - - /** RouteInfo srcIpRange. */ - public srcIpRange: string; - - /** RouteInfo destPortRanges. */ - public destPortRanges: string[]; - - /** RouteInfo srcPortRanges. */ - public srcPortRanges: string[]; - - /** RouteInfo protocols. */ - public protocols: string[]; - - /** RouteInfo nccHubUri. */ - public nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri. */ - public nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri. */ - public advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri. */ - public advertisedRouteNextHopUri?: (string|null); - - /** RouteInfo _nccHubUri. */ - public _nccHubUri?: "nccHubUri"; - - /** RouteInfo _nccSpokeUri. */ - public _nccSpokeUri?: "nccSpokeUri"; - - /** RouteInfo _advertisedRouteSourceRouterUri. */ - public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; - - /** RouteInfo _advertisedRouteNextHopUri. */ - public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; - - /** - * Creates a new RouteInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RouteInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Verifies a RouteInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RouteInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @param message RouteInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RouteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RouteInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RouteInfo { - - /** RouteType enum. */ - enum RouteType { - ROUTE_TYPE_UNSPECIFIED = 0, - SUBNET = 1, - STATIC = 2, - DYNAMIC = 3, - PEERING_SUBNET = 4, - PEERING_STATIC = 5, - PEERING_DYNAMIC = 6, - POLICY_BASED = 7, - ADVERTISED = 101 - } - - /** NextHopType enum. */ - enum NextHopType { - NEXT_HOP_TYPE_UNSPECIFIED = 0, - NEXT_HOP_IP = 1, - NEXT_HOP_INSTANCE = 2, - NEXT_HOP_NETWORK = 3, - NEXT_HOP_PEERING = 4, - NEXT_HOP_INTERCONNECT = 5, - NEXT_HOP_VPN_TUNNEL = 6, - NEXT_HOP_VPN_GATEWAY = 7, - NEXT_HOP_INTERNET_GATEWAY = 8, - NEXT_HOP_BLACKHOLE = 9, - NEXT_HOP_ILB = 10, - NEXT_HOP_ROUTER_APPLIANCE = 11, - NEXT_HOP_NCC_HUB = 12 - } - - /** RouteScope enum. */ - enum RouteScope { - ROUTE_SCOPE_UNSPECIFIED = 0, - NETWORK = 1, - NCC_HUB = 2 - } - } - - /** Properties of a GoogleServiceInfo. */ - interface IGoogleServiceInfo { - - /** GoogleServiceInfo sourceIp */ - sourceIp?: (string|null); - - /** GoogleServiceInfo googleServiceType */ - googleServiceType?: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null); - } - - /** Represents a GoogleServiceInfo. */ - class GoogleServiceInfo implements IGoogleServiceInfo { - - /** - * Constructs a new GoogleServiceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo); - - /** GoogleServiceInfo sourceIp. */ - public sourceIp: string; - - /** GoogleServiceInfo googleServiceType. */ - public googleServiceType: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType); - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleServiceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Verifies a GoogleServiceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleServiceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @param message GoogleServiceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoogleServiceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GoogleServiceInfo { - - /** GoogleServiceType enum. */ - enum GoogleServiceType { - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, - IAP = 1, - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, - CLOUD_DNS = 3, - GOOGLE_API = 4, - GOOGLE_API_PSC = 5, - GOOGLE_API_VPC_SC = 6 - } - } - - /** Properties of a ForwardingRuleInfo. */ - interface IForwardingRuleInfo { - - /** ForwardingRuleInfo displayName */ - displayName?: (string|null); - - /** ForwardingRuleInfo uri */ - uri?: (string|null); - - /** ForwardingRuleInfo matchedProtocol */ - matchedProtocol?: (string|null); - - /** ForwardingRuleInfo matchedPortRange */ - matchedPortRange?: (string|null); - - /** ForwardingRuleInfo vip */ - vip?: (string|null); - - /** ForwardingRuleInfo target */ - target?: (string|null); - - /** ForwardingRuleInfo networkUri */ - networkUri?: (string|null); - - /** ForwardingRuleInfo region */ - region?: (string|null); - - /** ForwardingRuleInfo loadBalancerName */ - loadBalancerName?: (string|null); - - /** ForwardingRuleInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** ForwardingRuleInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a ForwardingRuleInfo. */ - class ForwardingRuleInfo implements IForwardingRuleInfo { - - /** - * Constructs a new ForwardingRuleInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo); - - /** ForwardingRuleInfo displayName. */ - public displayName: string; - - /** ForwardingRuleInfo uri. */ - public uri: string; - - /** ForwardingRuleInfo matchedProtocol. */ - public matchedProtocol: string; - - /** ForwardingRuleInfo matchedPortRange. */ - public matchedPortRange: string; - - /** ForwardingRuleInfo vip. */ - public vip: string; - - /** ForwardingRuleInfo target. */ - public target: string; - - /** ForwardingRuleInfo networkUri. */ - public networkUri: string; - - /** ForwardingRuleInfo region. */ - public region: string; - - /** ForwardingRuleInfo loadBalancerName. */ - public loadBalancerName: string; - - /** ForwardingRuleInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** ForwardingRuleInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardingRuleInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Verifies a ForwardingRuleInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardingRuleInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @param message ForwardingRuleInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerInfo. */ - interface ILoadBalancerInfo { - - /** LoadBalancerInfo loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null); - - /** LoadBalancerInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerInfo backends */ - backends?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]|null); - - /** LoadBalancerInfo backendType */ - backendType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null); - - /** LoadBalancerInfo backendUri */ - backendUri?: (string|null); - } - - /** Represents a LoadBalancerInfo. */ - class LoadBalancerInfo implements ILoadBalancerInfo { - - /** - * Constructs a new LoadBalancerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo); - - /** LoadBalancerInfo loadBalancerType. */ - public loadBalancerType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType); - - /** LoadBalancerInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerInfo backends. */ - public backends: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]; - - /** LoadBalancerInfo backendType. */ - public backendType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType); - - /** LoadBalancerInfo backendUri. */ - public backendUri: string; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Verifies a LoadBalancerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @param message LoadBalancerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerInfo { - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - INTERNAL_TCP_UDP = 1, - NETWORK_TCP_UDP = 2, - HTTP_PROXY = 3, - TCP_PROXY = 4, - SSL_PROXY = 5 - } - - /** BackendType enum. */ - enum BackendType { - BACKEND_TYPE_UNSPECIFIED = 0, - BACKEND_SERVICE = 1, - TARGET_POOL = 2, - TARGET_INSTANCE = 3 - } - } - - /** Properties of a LoadBalancerBackend. */ - interface ILoadBalancerBackend { - - /** LoadBalancerBackend displayName */ - displayName?: (string|null); - - /** LoadBalancerBackend uri */ - uri?: (string|null); - - /** LoadBalancerBackend healthCheckFirewallState */ - healthCheckFirewallState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules */ - healthCheckAllowingFirewallRules?: (string[]|null); - - /** LoadBalancerBackend healthCheckBlockingFirewallRules */ - healthCheckBlockingFirewallRules?: (string[]|null); - } - - /** Represents a LoadBalancerBackend. */ - class LoadBalancerBackend implements ILoadBalancerBackend { - - /** - * Constructs a new LoadBalancerBackend. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend); - - /** LoadBalancerBackend displayName. */ - public displayName: string; - - /** LoadBalancerBackend uri. */ - public uri: string; - - /** LoadBalancerBackend healthCheckFirewallState. */ - public healthCheckFirewallState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ - public healthCheckAllowingFirewallRules: string[]; - - /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ - public healthCheckBlockingFirewallRules: string[]; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackend instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Verifies a LoadBalancerBackend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackend - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @param message LoadBalancerBackend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackend - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackend { - - /** HealthCheckFirewallState enum. */ - enum HealthCheckFirewallState { - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, - CONFIGURED = 1, - MISCONFIGURED = 2 - } - } - - /** Properties of a VpnGatewayInfo. */ - interface IVpnGatewayInfo { - - /** VpnGatewayInfo displayName */ - displayName?: (string|null); - - /** VpnGatewayInfo uri */ - uri?: (string|null); - - /** VpnGatewayInfo networkUri */ - networkUri?: (string|null); - - /** VpnGatewayInfo ipAddress */ - ipAddress?: (string|null); - - /** VpnGatewayInfo vpnTunnelUri */ - vpnTunnelUri?: (string|null); - - /** VpnGatewayInfo region */ - region?: (string|null); - } - - /** Represents a VpnGatewayInfo. */ - class VpnGatewayInfo implements IVpnGatewayInfo { - - /** - * Constructs a new VpnGatewayInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo); - - /** VpnGatewayInfo displayName. */ - public displayName: string; - - /** VpnGatewayInfo uri. */ - public uri: string; - - /** VpnGatewayInfo networkUri. */ - public networkUri: string; - - /** VpnGatewayInfo ipAddress. */ - public ipAddress: string; - - /** VpnGatewayInfo vpnTunnelUri. */ - public vpnTunnelUri: string; - - /** VpnGatewayInfo region. */ - public region: string; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnGatewayInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Verifies a VpnGatewayInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnGatewayInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @param message VpnGatewayInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnGatewayInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpnTunnelInfo. */ - interface IVpnTunnelInfo { - - /** VpnTunnelInfo displayName */ - displayName?: (string|null); - - /** VpnTunnelInfo uri */ - uri?: (string|null); - - /** VpnTunnelInfo sourceGateway */ - sourceGateway?: (string|null); - - /** VpnTunnelInfo remoteGateway */ - remoteGateway?: (string|null); - - /** VpnTunnelInfo remoteGatewayIp */ - remoteGatewayIp?: (string|null); - - /** VpnTunnelInfo sourceGatewayIp */ - sourceGatewayIp?: (string|null); - - /** VpnTunnelInfo networkUri */ - networkUri?: (string|null); - - /** VpnTunnelInfo region */ - region?: (string|null); - - /** VpnTunnelInfo routingType */ - routingType?: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null); - } - - /** Represents a VpnTunnelInfo. */ - class VpnTunnelInfo implements IVpnTunnelInfo { - - /** - * Constructs a new VpnTunnelInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo); - - /** VpnTunnelInfo displayName. */ - public displayName: string; - - /** VpnTunnelInfo uri. */ - public uri: string; - - /** VpnTunnelInfo sourceGateway. */ - public sourceGateway: string; - - /** VpnTunnelInfo remoteGateway. */ - public remoteGateway: string; - - /** VpnTunnelInfo remoteGatewayIp. */ - public remoteGatewayIp: string; - - /** VpnTunnelInfo sourceGatewayIp. */ - public sourceGatewayIp: string; - - /** VpnTunnelInfo networkUri. */ - public networkUri: string; - - /** VpnTunnelInfo region. */ - public region: string; - - /** VpnTunnelInfo routingType. */ - public routingType: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType); - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnTunnelInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Verifies a VpnTunnelInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnTunnelInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @param message VpnTunnelInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnTunnelInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VpnTunnelInfo { - - /** RoutingType enum. */ - enum RoutingType { - ROUTING_TYPE_UNSPECIFIED = 0, - ROUTE_BASED = 1, - POLICY_BASED = 2, - DYNAMIC = 3 - } - } - - /** Properties of an EndpointInfo. */ - interface IEndpointInfo { - - /** EndpointInfo sourceIp */ - sourceIp?: (string|null); - - /** EndpointInfo destinationIp */ - destinationIp?: (string|null); - - /** EndpointInfo protocol */ - protocol?: (string|null); - - /** EndpointInfo sourcePort */ - sourcePort?: (number|null); - - /** EndpointInfo destinationPort */ - destinationPort?: (number|null); - - /** EndpointInfo sourceNetworkUri */ - sourceNetworkUri?: (string|null); - - /** EndpointInfo destinationNetworkUri */ - destinationNetworkUri?: (string|null); - - /** EndpointInfo sourceAgentUri */ - sourceAgentUri?: (string|null); - } - - /** Represents an EndpointInfo. */ - class EndpointInfo implements IEndpointInfo { - - /** - * Constructs a new EndpointInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo); - - /** EndpointInfo sourceIp. */ - public sourceIp: string; - - /** EndpointInfo destinationIp. */ - public destinationIp: string; - - /** EndpointInfo protocol. */ - public protocol: string; - - /** EndpointInfo sourcePort. */ - public sourcePort: number; - - /** EndpointInfo destinationPort. */ - public destinationPort: number; - - /** EndpointInfo sourceNetworkUri. */ - public sourceNetworkUri: string; - - /** EndpointInfo destinationNetworkUri. */ - public destinationNetworkUri: string; - - /** EndpointInfo sourceAgentUri. */ - public sourceAgentUri: string; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Verifies an EndpointInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @param message EndpointInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeliverInfo. */ - interface IDeliverInfo { - - /** DeliverInfo target */ - target?: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null); - - /** DeliverInfo resourceUri */ - resourceUri?: (string|null); - - /** DeliverInfo ipAddress */ - ipAddress?: (string|null); - - /** DeliverInfo storageBucket */ - storageBucket?: (string|null); - - /** DeliverInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a DeliverInfo. */ - class DeliverInfo implements IDeliverInfo { - - /** - * Constructs a new DeliverInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo); - - /** DeliverInfo target. */ - public target: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target); - - /** DeliverInfo resourceUri. */ - public resourceUri: string; - - /** DeliverInfo ipAddress. */ - public ipAddress: string; - - /** DeliverInfo storageBucket. */ - public storageBucket: string; - - /** DeliverInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DeliverInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Verifies a DeliverInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeliverInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @param message DeliverInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeliverInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeliverInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeliverInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - INTERNET = 2, - GOOGLE_API = 3, - GKE_MASTER = 4, - CLOUD_SQL_INSTANCE = 5, - PSC_PUBLISHED_SERVICE = 6, - PSC_GOOGLE_API = 7, - PSC_VPC_SC = 8, - SERVERLESS_NEG = 9, - STORAGE_BUCKET = 10, - PRIVATE_NETWORK = 11, - CLOUD_FUNCTION = 12, - APP_ENGINE_VERSION = 13, - CLOUD_RUN_REVISION = 14, - GOOGLE_MANAGED_SERVICE = 15, - REDIS_INSTANCE = 16, - REDIS_CLUSTER = 17 - } - } - - /** Properties of a ForwardInfo. */ - interface IForwardInfo { - - /** ForwardInfo target */ - target?: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null); - - /** ForwardInfo resourceUri */ - resourceUri?: (string|null); - - /** ForwardInfo ipAddress */ - ipAddress?: (string|null); - } - - /** Represents a ForwardInfo. */ - class ForwardInfo implements IForwardInfo { - - /** - * Constructs a new ForwardInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo); - - /** ForwardInfo target. */ - public target: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target); - - /** ForwardInfo resourceUri. */ - public resourceUri: string; - - /** ForwardInfo ipAddress. */ - public ipAddress: string; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Verifies a ForwardInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @param message ForwardInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ForwardInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - PEERING_VPC = 1, - VPN_GATEWAY = 2, - INTERCONNECT = 3, - GKE_MASTER = 4, - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, - CLOUD_SQL_INSTANCE = 6, - ANOTHER_PROJECT = 7, - NCC_HUB = 8, - ROUTER_APPLIANCE = 9 - } - } - - /** Properties of an AbortInfo. */ - interface IAbortInfo { - - /** AbortInfo cause */ - cause?: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null); - - /** AbortInfo resourceUri */ - resourceUri?: (string|null); - - /** AbortInfo ipAddress */ - ipAddress?: (string|null); - - /** AbortInfo projectsMissingPermission */ - projectsMissingPermission?: (string[]|null); - } - - /** Represents an AbortInfo. */ - class AbortInfo implements IAbortInfo { - - /** - * Constructs a new AbortInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo); - - /** AbortInfo cause. */ - public cause: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause); - - /** AbortInfo resourceUri. */ - public resourceUri: string; - - /** AbortInfo ipAddress. */ - public ipAddress: string; - - /** AbortInfo projectsMissingPermission. */ - public projectsMissingPermission: string[]; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AbortInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Verifies an AbortInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AbortInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @param message AbortInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AbortInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AbortInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AbortInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_NETWORK = 1, - UNKNOWN_PROJECT = 3, - NO_EXTERNAL_IP = 7, - UNINTENDED_DESTINATION = 8, - SOURCE_ENDPOINT_NOT_FOUND = 11, - MISMATCHED_SOURCE_NETWORK = 12, - DESTINATION_ENDPOINT_NOT_FOUND = 13, - MISMATCHED_DESTINATION_NETWORK = 14, - UNKNOWN_IP = 2, - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, - PERMISSION_DENIED = 4, - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, - NO_SOURCE_LOCATION = 5, - INVALID_ARGUMENT = 6, - TRACE_TOO_LONG = 9, - INTERNAL_ERROR = 10, - UNSUPPORTED = 15, - MISMATCHED_IP_VERSION = 16, - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, - RESOURCE_CONFIG_NOT_FOUND = 18, - VM_INSTANCE_CONFIG_NOT_FOUND = 24, - NETWORK_CONFIG_NOT_FOUND = 25, - FIREWALL_CONFIG_NOT_FOUND = 26, - ROUTE_CONFIG_NOT_FOUND = 27, - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, - NON_ROUTABLE_IP_ADDRESS = 22, - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 - } - } - - /** Properties of a DropInfo. */ - interface IDropInfo { - - /** DropInfo cause */ - cause?: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null); - - /** DropInfo resourceUri */ - resourceUri?: (string|null); - - /** DropInfo sourceIp */ - sourceIp?: (string|null); - - /** DropInfo destinationIp */ - destinationIp?: (string|null); - - /** DropInfo region */ - region?: (string|null); - } - - /** Represents a DropInfo. */ - class DropInfo implements IDropInfo { - - /** - * Constructs a new DropInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo); - - /** DropInfo cause. */ - public cause: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause); - - /** DropInfo resourceUri. */ - public resourceUri: string; - - /** DropInfo sourceIp. */ - public sourceIp: string; - - /** DropInfo destinationIp. */ - public destinationIp: string; - - /** DropInfo region. */ - public region: string; - - /** - * Creates a new DropInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DropInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Verifies a DropInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DropInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @param message DropInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DropInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DropInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DropInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_EXTERNAL_ADDRESS = 1, - FOREIGN_IP_DISALLOWED = 2, - FIREWALL_RULE = 3, - NO_ROUTE = 4, - ROUTE_BLACKHOLE = 5, - ROUTE_WRONG_NETWORK = 6, - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, - PRIVATE_TRAFFIC_TO_INTERNET = 7, - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, - NO_EXTERNAL_ADDRESS = 9, - UNKNOWN_INTERNAL_ADDRESS = 10, - FORWARDING_RULE_MISMATCH = 11, - FORWARDING_RULE_NO_INSTANCES = 12, - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, - INSTANCE_NOT_RUNNING = 14, - GKE_CLUSTER_NOT_RUNNING = 27, - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, - REDIS_INSTANCE_NOT_RUNNING = 68, - REDIS_CLUSTER_NOT_RUNNING = 69, - TRAFFIC_TYPE_BLOCKED = 15, - GKE_MASTER_UNAUTHORIZED_ACCESS = 16, - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, - DROPPED_INSIDE_GKE_SERVICE = 18, - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, - GKE_PSC_ENDPOINT_MISSING = 36, - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, - GKE_CONTROL_PLANE_REGION_MISMATCH = 30, - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, - GKE_CONTROL_PLANE_NO_ROUTE = 32, - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, - CLOUD_SQL_INSTANCE_NO_ROUTE = 35, - CLOUD_SQL_CONNECTOR_REQUIRED = 63, - CLOUD_FUNCTION_NOT_ACTIVE = 22, - VPC_CONNECTOR_NOT_SET = 23, - VPC_CONNECTOR_NOT_RUNNING = 24, - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, - FORWARDING_RULE_REGION_MISMATCH = 25, - PSC_CONNECTION_NOT_ACCEPTED = 26, - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, - PSC_TRANSITIVITY_NOT_PROPAGATED = 64, - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, - CLOUD_RUN_REVISION_NOT_READY = 29, - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, - CLOUD_NAT_NO_ADDRESSES = 40, - ROUTING_LOOP = 59, - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, - REDIS_INSTANCE_UNSUPPORTED_PORT = 71, - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, - REDIS_INSTANCE_NO_EXTERNAL_IP = 74, - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, - REDIS_CLUSTER_UNSUPPORTED_PORT = 76, - REDIS_CLUSTER_NO_EXTERNAL_IP = 77, - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 - } - } - - /** Properties of a GKEMasterInfo. */ - interface IGKEMasterInfo { - - /** GKEMasterInfo clusterUri */ - clusterUri?: (string|null); - - /** GKEMasterInfo clusterNetworkUri */ - clusterNetworkUri?: (string|null); - - /** GKEMasterInfo internalIp */ - internalIp?: (string|null); - - /** GKEMasterInfo externalIp */ - externalIp?: (string|null); - - /** GKEMasterInfo dnsEndpoint */ - dnsEndpoint?: (string|null); - } - - /** Represents a GKEMasterInfo. */ - class GKEMasterInfo implements IGKEMasterInfo { - - /** - * Constructs a new GKEMasterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo); - - /** GKEMasterInfo clusterUri. */ - public clusterUri: string; - - /** GKEMasterInfo clusterNetworkUri. */ - public clusterNetworkUri: string; - - /** GKEMasterInfo internalIp. */ - public internalIp: string; - - /** GKEMasterInfo externalIp. */ - public externalIp: string; - - /** GKEMasterInfo dnsEndpoint. */ - public dnsEndpoint: string; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GKEMasterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Verifies a GKEMasterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GKEMasterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @param message GKEMasterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GKEMasterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GKEMasterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudSQLInstanceInfo. */ - interface ICloudSQLInstanceInfo { - - /** CloudSQLInstanceInfo displayName */ - displayName?: (string|null); - - /** CloudSQLInstanceInfo uri */ - uri?: (string|null); - - /** CloudSQLInstanceInfo networkUri */ - networkUri?: (string|null); - - /** CloudSQLInstanceInfo internalIp */ - internalIp?: (string|null); - - /** CloudSQLInstanceInfo externalIp */ - externalIp?: (string|null); - - /** CloudSQLInstanceInfo region */ - region?: (string|null); - } - - /** Represents a CloudSQLInstanceInfo. */ - class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { - - /** - * Constructs a new CloudSQLInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo); - - /** CloudSQLInstanceInfo displayName. */ - public displayName: string; - - /** CloudSQLInstanceInfo uri. */ - public uri: string; - - /** CloudSQLInstanceInfo networkUri. */ - public networkUri: string; - - /** CloudSQLInstanceInfo internalIp. */ - public internalIp: string; - - /** CloudSQLInstanceInfo externalIp. */ - public externalIp: string; - - /** CloudSQLInstanceInfo region. */ - public region: string; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudSQLInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudSQLInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @param message CloudSQLInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisInstanceInfo. */ - interface IRedisInstanceInfo { - - /** RedisInstanceInfo displayName */ - displayName?: (string|null); - - /** RedisInstanceInfo uri */ - uri?: (string|null); - - /** RedisInstanceInfo networkUri */ - networkUri?: (string|null); - - /** RedisInstanceInfo primaryEndpointIp */ - primaryEndpointIp?: (string|null); - - /** RedisInstanceInfo readEndpointIp */ - readEndpointIp?: (string|null); - - /** RedisInstanceInfo region */ - region?: (string|null); - } - - /** Represents a RedisInstanceInfo. */ - class RedisInstanceInfo implements IRedisInstanceInfo { - - /** - * Constructs a new RedisInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo); - - /** RedisInstanceInfo displayName. */ - public displayName: string; - - /** RedisInstanceInfo uri. */ - public uri: string; - - /** RedisInstanceInfo networkUri. */ - public networkUri: string; - - /** RedisInstanceInfo primaryEndpointIp. */ - public primaryEndpointIp: string; - - /** RedisInstanceInfo readEndpointIp. */ - public readEndpointIp: string; - - /** RedisInstanceInfo region. */ - public region: string; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Verifies a RedisInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @param message RedisInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisClusterInfo. */ - interface IRedisClusterInfo { - - /** RedisClusterInfo displayName */ - displayName?: (string|null); - - /** RedisClusterInfo uri */ - uri?: (string|null); - - /** RedisClusterInfo networkUri */ - networkUri?: (string|null); - - /** RedisClusterInfo discoveryEndpointIpAddress */ - discoveryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo secondaryEndpointIpAddress */ - secondaryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo location */ - location?: (string|null); - } - - /** Represents a RedisClusterInfo. */ - class RedisClusterInfo implements IRedisClusterInfo { - - /** - * Constructs a new RedisClusterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo); - - /** RedisClusterInfo displayName. */ - public displayName: string; - - /** RedisClusterInfo uri. */ - public uri: string; - - /** RedisClusterInfo networkUri. */ - public networkUri: string; - - /** RedisClusterInfo discoveryEndpointIpAddress. */ - public discoveryEndpointIpAddress: string; - - /** RedisClusterInfo secondaryEndpointIpAddress. */ - public secondaryEndpointIpAddress: string; - - /** RedisClusterInfo location. */ - public location: string; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisClusterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Verifies a RedisClusterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisClusterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @param message RedisClusterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisClusterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisClusterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudFunctionInfo. */ - interface ICloudFunctionInfo { - - /** CloudFunctionInfo displayName */ - displayName?: (string|null); - - /** CloudFunctionInfo uri */ - uri?: (string|null); - - /** CloudFunctionInfo location */ - location?: (string|null); - - /** CloudFunctionInfo versionId */ - versionId?: (number|Long|string|null); - } - - /** Represents a CloudFunctionInfo. */ - class CloudFunctionInfo implements ICloudFunctionInfo { - - /** - * Constructs a new CloudFunctionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo); - - /** CloudFunctionInfo displayName. */ - public displayName: string; - - /** CloudFunctionInfo uri. */ - public uri: string; - - /** CloudFunctionInfo location. */ - public location: string; - - /** CloudFunctionInfo versionId. */ - public versionId: (number|Long|string); - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Verifies a CloudFunctionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @param message CloudFunctionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionInfo. */ - interface ICloudRunRevisionInfo { - - /** CloudRunRevisionInfo displayName */ - displayName?: (string|null); - - /** CloudRunRevisionInfo uri */ - uri?: (string|null); - - /** CloudRunRevisionInfo location */ - location?: (string|null); - - /** CloudRunRevisionInfo serviceUri */ - serviceUri?: (string|null); - } - - /** Represents a CloudRunRevisionInfo. */ - class CloudRunRevisionInfo implements ICloudRunRevisionInfo { - - /** - * Constructs a new CloudRunRevisionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo); - - /** CloudRunRevisionInfo displayName. */ - public displayName: string; - - /** CloudRunRevisionInfo uri. */ - public uri: string; - - /** CloudRunRevisionInfo location. */ - public location: string; - - /** CloudRunRevisionInfo serviceUri. */ - public serviceUri: string; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Verifies a CloudRunRevisionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @param message CloudRunRevisionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionInfo. */ - interface IAppEngineVersionInfo { - - /** AppEngineVersionInfo displayName */ - displayName?: (string|null); - - /** AppEngineVersionInfo uri */ - uri?: (string|null); - - /** AppEngineVersionInfo runtime */ - runtime?: (string|null); - - /** AppEngineVersionInfo environment */ - environment?: (string|null); - } - - /** Represents an AppEngineVersionInfo. */ - class AppEngineVersionInfo implements IAppEngineVersionInfo { - - /** - * Constructs a new AppEngineVersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo); - - /** AppEngineVersionInfo displayName. */ - public displayName: string; - - /** AppEngineVersionInfo uri. */ - public uri: string; - - /** AppEngineVersionInfo runtime. */ - public runtime: string; - - /** AppEngineVersionInfo environment. */ - public environment: string; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Verifies an AppEngineVersionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @param message AppEngineVersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcConnectorInfo. */ - interface IVpcConnectorInfo { - - /** VpcConnectorInfo displayName */ - displayName?: (string|null); - - /** VpcConnectorInfo uri */ - uri?: (string|null); - - /** VpcConnectorInfo location */ - location?: (string|null); - } - - /** Represents a VpcConnectorInfo. */ - class VpcConnectorInfo implements IVpcConnectorInfo { - - /** - * Constructs a new VpcConnectorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo); - - /** VpcConnectorInfo displayName. */ - public displayName: string; - - /** VpcConnectorInfo uri. */ - public uri: string; - - /** VpcConnectorInfo location. */ - public location: string; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcConnectorInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Verifies a VpcConnectorInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcConnectorInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @param message VpcConnectorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcConnectorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NatInfo. */ - interface INatInfo { - - /** NatInfo type */ - type?: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type|null); - - /** NatInfo protocol */ - protocol?: (string|null); - - /** NatInfo networkUri */ - networkUri?: (string|null); - - /** NatInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** NatInfo newSourceIp */ - newSourceIp?: (string|null); - - /** NatInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** NatInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** NatInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** NatInfo newSourcePort */ - newSourcePort?: (number|null); - - /** NatInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** NatInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** NatInfo routerUri */ - routerUri?: (string|null); - - /** NatInfo natGatewayName */ - natGatewayName?: (string|null); - } - - /** Represents a NatInfo. */ - class NatInfo implements INatInfo { - - /** - * Constructs a new NatInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.INatInfo); - - /** NatInfo type. */ - public type: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type); - - /** NatInfo protocol. */ - public protocol: string; - - /** NatInfo networkUri. */ - public networkUri: string; - - /** NatInfo oldSourceIp. */ - public oldSourceIp: string; - - /** NatInfo newSourceIp. */ - public newSourceIp: string; - - /** NatInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** NatInfo newDestinationIp. */ - public newDestinationIp: string; - - /** NatInfo oldSourcePort. */ - public oldSourcePort: number; - - /** NatInfo newSourcePort. */ - public newSourcePort: number; - - /** NatInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** NatInfo newDestinationPort. */ - public newDestinationPort: number; - - /** NatInfo routerUri. */ - public routerUri: string; - - /** NatInfo natGatewayName. */ - public natGatewayName: string; - - /** - * Creates a new NatInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NatInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.INatInfo): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Verifies a NatInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NatInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @param message NatInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NatInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NatInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NatInfo { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INTERNAL_TO_EXTERNAL = 1, - EXTERNAL_TO_INTERNAL = 2, - CLOUD_NAT = 3, - PRIVATE_SERVICE_CONNECT = 4 - } - } - - /** Properties of a ProxyConnectionInfo. */ - interface IProxyConnectionInfo { - - /** ProxyConnectionInfo protocol */ - protocol?: (string|null); - - /** ProxyConnectionInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** ProxyConnectionInfo newSourceIp */ - newSourceIp?: (string|null); - - /** ProxyConnectionInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** ProxyConnectionInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** ProxyConnectionInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** ProxyConnectionInfo newSourcePort */ - newSourcePort?: (number|null); - - /** ProxyConnectionInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** ProxyConnectionInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** ProxyConnectionInfo subnetUri */ - subnetUri?: (string|null); - - /** ProxyConnectionInfo networkUri */ - networkUri?: (string|null); - } - - /** Represents a ProxyConnectionInfo. */ - class ProxyConnectionInfo implements IProxyConnectionInfo { - - /** - * Constructs a new ProxyConnectionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo); - - /** ProxyConnectionInfo protocol. */ - public protocol: string; - - /** ProxyConnectionInfo oldSourceIp. */ - public oldSourceIp: string; - - /** ProxyConnectionInfo newSourceIp. */ - public newSourceIp: string; - - /** ProxyConnectionInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** ProxyConnectionInfo newDestinationIp. */ - public newDestinationIp: string; - - /** ProxyConnectionInfo oldSourcePort. */ - public oldSourcePort: number; - - /** ProxyConnectionInfo newSourcePort. */ - public newSourcePort: number; - - /** ProxyConnectionInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** ProxyConnectionInfo newDestinationPort. */ - public newDestinationPort: number; - - /** ProxyConnectionInfo subnetUri. */ - public subnetUri: string; - - /** ProxyConnectionInfo networkUri. */ - public networkUri: string; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ProxyConnectionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Verifies a ProxyConnectionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProxyConnectionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @param message ProxyConnectionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerBackendInfo. */ - interface ILoadBalancerBackendInfo { - - /** LoadBalancerBackendInfo name */ - name?: (string|null); - - /** LoadBalancerBackendInfo instanceUri */ - instanceUri?: (string|null); - - /** LoadBalancerBackendInfo backendServiceUri */ - backendServiceUri?: (string|null); - - /** LoadBalancerBackendInfo instanceGroupUri */ - instanceGroupUri?: (string|null); - - /** LoadBalancerBackendInfo networkEndpointGroupUri */ - networkEndpointGroupUri?: (string|null); - - /** LoadBalancerBackendInfo backendBucketUri */ - backendBucketUri?: (string|null); - - /** LoadBalancerBackendInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** LoadBalancerBackendInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - - /** LoadBalancerBackendInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ - healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); - } - - /** Represents a LoadBalancerBackendInfo. */ - class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { - - /** - * Constructs a new LoadBalancerBackendInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo); - - /** LoadBalancerBackendInfo name. */ - public name: string; - - /** LoadBalancerBackendInfo instanceUri. */ - public instanceUri: string; - - /** LoadBalancerBackendInfo backendServiceUri. */ - public backendServiceUri: string; - - /** LoadBalancerBackendInfo instanceGroupUri. */ - public instanceGroupUri: string; - - /** LoadBalancerBackendInfo networkEndpointGroupUri. */ - public networkEndpointGroupUri: string; - - /** LoadBalancerBackendInfo backendBucketUri. */ - public backendBucketUri: string; - - /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** LoadBalancerBackendInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** LoadBalancerBackendInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ - public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackendInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackendInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @param message LoadBalancerBackendInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackendInfo { - - /** HealthCheckFirewallsConfigState enum. */ - enum HealthCheckFirewallsConfigState { - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, - FIREWALLS_CONFIGURED = 1, - FIREWALLS_PARTIALLY_CONFIGURED = 2, - FIREWALLS_NOT_CONFIGURED = 3, - FIREWALLS_UNSUPPORTED = 4 - } - } - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - HTTPS_ADVANCED_LOAD_BALANCER = 1, - HTTPS_LOAD_BALANCER = 2, - REGIONAL_HTTPS_LOAD_BALANCER = 3, - INTERNAL_HTTPS_LOAD_BALANCER = 4, - SSL_PROXY_LOAD_BALANCER = 5, - TCP_PROXY_LOAD_BALANCER = 6, - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, - NETWORK_LOAD_BALANCER = 8, - LEGACY_NETWORK_LOAD_BALANCER = 9, - TCP_UDP_INTERNAL_LOAD_BALANCER = 10 - } - - /** Properties of a StorageBucketInfo. */ - interface IStorageBucketInfo { - - /** StorageBucketInfo bucket */ - bucket?: (string|null); - } - - /** Represents a StorageBucketInfo. */ - class StorageBucketInfo implements IStorageBucketInfo { - - /** - * Constructs a new StorageBucketInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo); - - /** StorageBucketInfo bucket. */ - public bucket: string; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageBucketInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Verifies a StorageBucketInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageBucketInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @param message StorageBucketInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageBucketInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageBucketInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerlessNegInfo. */ - interface IServerlessNegInfo { - - /** ServerlessNegInfo negUri */ - negUri?: (string|null); - } - - /** Represents a ServerlessNegInfo. */ - class ServerlessNegInfo implements IServerlessNegInfo { - - /** - * Constructs a new ServerlessNegInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo); - - /** ServerlessNegInfo negUri. */ - public negUri: string; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerlessNegInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Verifies a ServerlessNegInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerlessNegInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @param message ServerlessNegInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerlessNegInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a ReachabilityService */ - class ReachabilityService extends $protobuf.rpc.Service { - - /** - * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback): void; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @returns Promise - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): Promise; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConnectivityTest - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback): void; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @returns Promise - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): Promise; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback): void; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @returns Promise - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): Promise; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback): void; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @returns Promise - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): Promise; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback): void; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @returns Promise - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): Promise; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback): void; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @returns Promise - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): Promise; - } - - namespace ReachabilityService { - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. - * @param error Error, if any - * @param [response] ListConnectivityTestsResponse - */ - type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. - * @param error Error, if any - * @param [response] ConnectivityTest - */ - type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ConnectivityTest) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a ListConnectivityTestsRequest. */ - interface IListConnectivityTestsRequest { - - /** ListConnectivityTestsRequest parent */ - parent?: (string|null); - - /** ListConnectivityTestsRequest pageSize */ - pageSize?: (number|null); - - /** ListConnectivityTestsRequest pageToken */ - pageToken?: (string|null); - - /** ListConnectivityTestsRequest filter */ - filter?: (string|null); - - /** ListConnectivityTestsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListConnectivityTestsRequest. */ - class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { - - /** - * Constructs a new ListConnectivityTestsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest); - - /** ListConnectivityTestsRequest parent. */ - public parent: string; - - /** ListConnectivityTestsRequest pageSize. */ - public pageSize: number; - - /** ListConnectivityTestsRequest pageToken. */ - public pageToken: string; - - /** ListConnectivityTestsRequest filter. */ - public filter: string; - - /** ListConnectivityTestsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @param message ListConnectivityTestsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectivityTestsResponse. */ - interface IListConnectivityTestsResponse { - - /** ListConnectivityTestsResponse resources */ - resources?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null); - - /** ListConnectivityTestsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListConnectivityTestsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListConnectivityTestsResponse. */ - class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { - - /** - * Constructs a new ListConnectivityTestsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse); - - /** ListConnectivityTestsResponse resources. */ - public resources: google.cloud.networkmanagement.v1beta1.IConnectivityTest[]; - - /** ListConnectivityTestsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListConnectivityTestsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsResponse instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @param message ListConnectivityTestsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityTestRequest. */ - interface IGetConnectivityTestRequest { - - /** GetConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a GetConnectivityTestRequest. */ - class GetConnectivityTestRequest implements IGetConnectivityTestRequest { - - /** - * Constructs a new GetConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest); - - /** GetConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Verifies a GetConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @param message GetConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectivityTestRequest. */ - interface ICreateConnectivityTestRequest { - - /** CreateConnectivityTestRequest parent */ - parent?: (string|null); - - /** CreateConnectivityTestRequest testId */ - testId?: (string|null); - - /** CreateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - } - - /** Represents a CreateConnectivityTestRequest. */ - class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { - - /** - * Constructs a new CreateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest); - - /** CreateConnectivityTestRequest parent. */ - public parent: string; - - /** CreateConnectivityTestRequest testId. */ - public testId: string; - - /** CreateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message CreateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateConnectivityTestRequest. */ - interface IUpdateConnectivityTestRequest { - - /** UpdateConnectivityTestRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - } - - /** Represents an UpdateConnectivityTestRequest. */ - class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest); - - /** UpdateConnectivityTestRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message UpdateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectivityTestRequest. */ - interface IDeleteConnectivityTestRequest { - - /** DeleteConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a DeleteConnectivityTestRequest. */ - class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest); - - /** DeleteConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @param message DeleteConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RerunConnectivityTestRequest. */ - interface IRerunConnectivityTestRequest { - - /** RerunConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a RerunConnectivityTestRequest. */ - class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { - - /** - * Constructs a new RerunConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest); - - /** RerunConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RerunConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RerunConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @param message RerunConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RerunConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @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 statusDetail */ - statusDetail?: (string|null); - - /** OperationMetadata cancelRequested */ - cancelRequested?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.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 statusDetail. */ - public statusDetail: string; - - /** OperationMetadata cancelRequested. */ - public cancelRequested: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IOperationMetadata): google.cloud.networkmanagement.v1beta1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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; - } - - /** Represents a VpcFlowLogsService */ - class VpcFlowLogsService extends $protobuf.rpc.Service { - - /** - * Constructs a new VpcFlowLogsService 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 VpcFlowLogsService 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): VpcFlowLogsService; - - /** - * Calls ListVpcFlowLogsConfigs. - * @param request ListVpcFlowLogsConfigsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse - */ - public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback): void; - - /** - * Calls ListVpcFlowLogsConfigs. - * @param request ListVpcFlowLogsConfigsRequest message or plain object - * @returns Promise - */ - public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): Promise; - - /** - * Calls GetVpcFlowLogsConfig. - * @param request GetVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and VpcFlowLogsConfig - */ - public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback): void; - - /** - * Calls GetVpcFlowLogsConfig. - * @param request GetVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): Promise; - - /** - * Calls CreateVpcFlowLogsConfig. - * @param request CreateVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback): void; - - /** - * Calls CreateVpcFlowLogsConfig. - * @param request CreateVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): Promise; - - /** - * Calls UpdateVpcFlowLogsConfig. - * @param request UpdateVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback): void; - - /** - * Calls UpdateVpcFlowLogsConfig. - * @param request UpdateVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): Promise; - - /** - * Calls DeleteVpcFlowLogsConfig. - * @param request DeleteVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback): void; - - /** - * Calls DeleteVpcFlowLogsConfig. - * @param request DeleteVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): Promise; - } - - namespace VpcFlowLogsService { - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. - * @param error Error, if any - * @param [response] ListVpcFlowLogsConfigsResponse - */ - type ListVpcFlowLogsConfigsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] VpcFlowLogsConfig - */ - type GetVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a ListVpcFlowLogsConfigsRequest. */ - interface IListVpcFlowLogsConfigsRequest { - - /** ListVpcFlowLogsConfigsRequest parent */ - parent?: (string|null); - - /** ListVpcFlowLogsConfigsRequest pageSize */ - pageSize?: (number|null); - - /** ListVpcFlowLogsConfigsRequest pageToken */ - pageToken?: (string|null); - - /** ListVpcFlowLogsConfigsRequest filter */ - filter?: (string|null); - - /** ListVpcFlowLogsConfigsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListVpcFlowLogsConfigsRequest. */ - class ListVpcFlowLogsConfigsRequest implements IListVpcFlowLogsConfigsRequest { - - /** - * Constructs a new ListVpcFlowLogsConfigsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest); - - /** ListVpcFlowLogsConfigsRequest parent. */ - public parent: string; - - /** ListVpcFlowLogsConfigsRequest pageSize. */ - public pageSize: number; - - /** ListVpcFlowLogsConfigsRequest pageToken. */ - public pageToken: string; - - /** ListVpcFlowLogsConfigsRequest filter. */ - public filter: string; - - /** ListVpcFlowLogsConfigsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVpcFlowLogsConfigsRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Verifies a ListVpcFlowLogsConfigsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVpcFlowLogsConfigsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Creates a plain object from a ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. - * @param message ListVpcFlowLogsConfigsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVpcFlowLogsConfigsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVpcFlowLogsConfigsResponse. */ - interface IListVpcFlowLogsConfigsResponse { - - /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs */ - vpcFlowLogsConfigs?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null); - - /** ListVpcFlowLogsConfigsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListVpcFlowLogsConfigsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListVpcFlowLogsConfigsResponse. */ - class ListVpcFlowLogsConfigsResponse implements IListVpcFlowLogsConfigsResponse { - - /** - * Constructs a new ListVpcFlowLogsConfigsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse); - - /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. */ - public vpcFlowLogsConfigs: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]; - - /** ListVpcFlowLogsConfigsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListVpcFlowLogsConfigsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVpcFlowLogsConfigsResponse instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Verifies a ListVpcFlowLogsConfigsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVpcFlowLogsConfigsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Creates a plain object from a ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. - * @param message ListVpcFlowLogsConfigsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVpcFlowLogsConfigsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetVpcFlowLogsConfigRequest. */ - interface IGetVpcFlowLogsConfigRequest { - - /** GetVpcFlowLogsConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetVpcFlowLogsConfigRequest. */ - class GetVpcFlowLogsConfigRequest implements IGetVpcFlowLogsConfigRequest { - - /** - * Constructs a new GetVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest); - - /** GetVpcFlowLogsConfigRequest name. */ - public name: string; - - /** - * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Verifies a GetVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message GetVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateVpcFlowLogsConfigRequest. */ - interface ICreateVpcFlowLogsConfigRequest { - - /** CreateVpcFlowLogsConfigRequest parent */ - parent?: (string|null); - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId */ - vpcFlowLogsConfigId?: (string|null); - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ - vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - } - - /** Represents a CreateVpcFlowLogsConfigRequest. */ - class CreateVpcFlowLogsConfigRequest implements ICreateVpcFlowLogsConfigRequest { - - /** - * Constructs a new CreateVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest); - - /** CreateVpcFlowLogsConfigRequest parent. */ - public parent: string; - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. */ - public vpcFlowLogsConfigId: string; - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ - public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - - /** - * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Verifies a CreateVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message CreateVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateVpcFlowLogsConfigRequest. */ - interface IUpdateVpcFlowLogsConfigRequest { - - /** UpdateVpcFlowLogsConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ - vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - } - - /** Represents an UpdateVpcFlowLogsConfigRequest. */ - class UpdateVpcFlowLogsConfigRequest implements IUpdateVpcFlowLogsConfigRequest { - - /** - * Constructs a new UpdateVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest); - - /** UpdateVpcFlowLogsConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ - public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - - /** - * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Verifies an UpdateVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message UpdateVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteVpcFlowLogsConfigRequest. */ - interface IDeleteVpcFlowLogsConfigRequest { - - /** DeleteVpcFlowLogsConfigRequest name */ - name?: (string|null); - } - - /** Represents a DeleteVpcFlowLogsConfigRequest. */ - class DeleteVpcFlowLogsConfigRequest implements IDeleteVpcFlowLogsConfigRequest { - - /** - * Constructs a new DeleteVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest); - - /** DeleteVpcFlowLogsConfigRequest name. */ - public name: string; - - /** - * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Verifies a DeleteVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message DeleteVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcFlowLogsConfig. */ - interface IVpcFlowLogsConfig { - - /** VpcFlowLogsConfig name */ - name?: (string|null); - - /** VpcFlowLogsConfig description */ - description?: (string|null); - - /** VpcFlowLogsConfig state */ - state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); - - /** VpcFlowLogsConfig aggregationInterval */ - aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); - - /** VpcFlowLogsConfig flowSampling */ - flowSampling?: (number|null); - - /** VpcFlowLogsConfig metadata */ - metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); - - /** VpcFlowLogsConfig metadataFields */ - metadataFields?: (string[]|null); - - /** VpcFlowLogsConfig filterExpr */ - filterExpr?: (string|null); - - /** VpcFlowLogsConfig interconnectAttachment */ - interconnectAttachment?: (string|null); - - /** VpcFlowLogsConfig vpnTunnel */ - vpnTunnel?: (string|null); - - /** VpcFlowLogsConfig labels */ - labels?: ({ [k: string]: string }|null); - - /** VpcFlowLogsConfig createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** VpcFlowLogsConfig updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a VpcFlowLogsConfig. */ - class VpcFlowLogsConfig implements IVpcFlowLogsConfig { - - /** - * Constructs a new VpcFlowLogsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig); - - /** VpcFlowLogsConfig name. */ - public name: string; - - /** VpcFlowLogsConfig description. */ - public description?: (string|null); - - /** VpcFlowLogsConfig state. */ - public state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); - - /** VpcFlowLogsConfig aggregationInterval. */ - public aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); - - /** VpcFlowLogsConfig flowSampling. */ - public flowSampling?: (number|null); - - /** VpcFlowLogsConfig metadata. */ - public metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); - - /** VpcFlowLogsConfig metadataFields. */ - public metadataFields: string[]; - - /** VpcFlowLogsConfig filterExpr. */ - public filterExpr?: (string|null); - - /** VpcFlowLogsConfig interconnectAttachment. */ - public interconnectAttachment?: (string|null); - - /** VpcFlowLogsConfig vpnTunnel. */ - public vpnTunnel?: (string|null); - - /** VpcFlowLogsConfig labels. */ - public labels: { [k: string]: string }; - - /** VpcFlowLogsConfig createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** VpcFlowLogsConfig updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** VpcFlowLogsConfig _description. */ - public _description?: "description"; - - /** VpcFlowLogsConfig _state. */ - public _state?: "state"; - - /** VpcFlowLogsConfig _aggregationInterval. */ - public _aggregationInterval?: "aggregationInterval"; - - /** VpcFlowLogsConfig _flowSampling. */ - public _flowSampling?: "flowSampling"; - - /** VpcFlowLogsConfig _metadata. */ - public _metadata?: "metadata"; - - /** VpcFlowLogsConfig _filterExpr. */ - public _filterExpr?: "filterExpr"; - - /** VpcFlowLogsConfig targetResource. */ - public targetResource?: ("interconnectAttachment"|"vpnTunnel"); - - /** - * Creates a new VpcFlowLogsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcFlowLogsConfig instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @param message VpcFlowLogsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @param message VpcFlowLogsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Verifies a VpcFlowLogsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcFlowLogsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. - * @param message VpcFlowLogsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcFlowLogsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcFlowLogsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VpcFlowLogsConfig { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2 - } - - /** AggregationInterval enum. */ - enum AggregationInterval { - AGGREGATION_INTERVAL_UNSPECIFIED = 0, - INTERVAL_5_SEC = 1, - INTERVAL_30_SEC = 2, - INTERVAL_1_MIN = 3, - INTERVAL_5_MIN = 4, - INTERVAL_10_MIN = 5, - INTERVAL_15_MIN = 6 - } - - /** Metadata enum. */ - enum Metadata { - METADATA_UNSPECIFIED = 0, - INCLUDE_ALL_METADATA = 1, - EXCLUDE_ALL_METADATA = 2, - CUSTOM_METADATA = 3 - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a 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 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 - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of 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-networkmanagement/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js deleted file mode 100644 index 2438db4bb8a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js +++ /dev/null @@ -1,42968 +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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.networkmanagement = (function() { - - /** - * Namespace networkmanagement. - * @memberof google.cloud - * @namespace - */ - var networkmanagement = {}; - - networkmanagement.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.networkmanagement - * @namespace - */ - var v1beta1 = {}; - - v1beta1.ConnectivityTest = (function() { - - /** - * Properties of a ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IConnectivityTest - * @property {string|null} [name] ConnectivityTest name - * @property {string|null} [description] ConnectivityTest description - * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [source] ConnectivityTest source - * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [destination] ConnectivityTest destination - * @property {string|null} [protocol] ConnectivityTest protocol - * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects - * @property {string|null} [displayName] ConnectivityTest displayName - * @property {Object.|null} [labels] ConnectivityTest labels - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime - * @property {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails - * @property {google.cloud.networkmanagement.v1beta1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails - * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks - */ - - /** - * Constructs a new ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ConnectivityTest. - * @implements IConnectivityTest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set - */ - function ConnectivityTest(properties) { - this.relatedProjects = []; - 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]]; - } - - /** - * ConnectivityTest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.name = ""; - - /** - * ConnectivityTest description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.description = ""; - - /** - * ConnectivityTest source. - * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} source - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.source = null; - - /** - * ConnectivityTest destination. - * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} destination - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.destination = null; - - /** - * ConnectivityTest protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.protocol = ""; - - /** - * ConnectivityTest relatedProjects. - * @member {Array.} relatedProjects - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.relatedProjects = $util.emptyArray; - - /** - * ConnectivityTest displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.displayName = ""; - - /** - * ConnectivityTest labels. - * @member {Object.} labels - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.labels = $util.emptyObject; - - /** - * ConnectivityTest createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.createTime = null; - - /** - * ConnectivityTest updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.updateTime = null; - - /** - * ConnectivityTest reachabilityDetails. - * @member {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null|undefined} reachabilityDetails - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.reachabilityDetails = null; - - /** - * ConnectivityTest probingDetails. - * @member {google.cloud.networkmanagement.v1beta1.IProbingDetails|null|undefined} probingDetails - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.probingDetails = null; - - /** - * ConnectivityTest bypassFirewallChecks. - * @member {boolean} bypassFirewallChecks - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.bypassFirewallChecks = false; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest instance - */ - ConnectivityTest.create = function create(properties) { - return new ConnectivityTest(properties); - }; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encode = function encode(message, writer) { - if (!writer) - 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.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); - if (message.relatedProjects != null && message.relatedProjects.length) - for (var i = 0; i < message.relatedProjects.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) - $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) - $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); - return writer; - }; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 5: { - message.protocol = reader.string(); - break; - } - case 6: { - if (!(message.relatedProjects && message.relatedProjects.length)) - message.relatedProjects = []; - message.relatedProjects.push(reader.string()); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 8: { - 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 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.decode(reader, reader.uint32()); - break; - } - case 14: { - message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.decode(reader, reader.uint32()); - break; - } - case 17: { - message.bypassFirewallChecks = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectivityTest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectivityTest.verify = function verify(message) { - if (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.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.source); - if (error) - return "source." + error; - } - if (message.destination != null && message.hasOwnProperty("destination")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.destination); - if (error) - return "destination." + error; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { - if (!Array.isArray(message.relatedProjects)) - return "relatedProjects: array expected"; - for (var i = 0; i < message.relatedProjects.length; ++i) - if (!$util.isString(message.relatedProjects[i])) - return "relatedProjects: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify(message.reachabilityDetails); - if (error) - return "reachabilityDetails." + error; - } - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.verify(message.probingDetails); - if (error) - return "probingDetails." + error; - } - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - if (typeof message.bypassFirewallChecks !== "boolean") - return "bypassFirewallChecks: boolean expected"; - return null; - }; - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest - */ - ConnectivityTest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.source: object expected"); - message.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.source); - } - if (object.destination != null) { - if (typeof object.destination !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.destination: object expected"); - message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.destination); - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.relatedProjects) { - if (!Array.isArray(object.relatedProjects)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.relatedProjects: array expected"); - message.relatedProjects = []; - for (var i = 0; i < object.relatedProjects.length; ++i) - message.relatedProjects[i] = String(object.relatedProjects[i]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.reachabilityDetails != null) { - if (typeof object.reachabilityDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.reachabilityDetails: object expected"); - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.fromObject(object.reachabilityDetails); - } - if (object.probingDetails != null) { - if (typeof object.probingDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.probingDetails: object expected"); - message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.fromObject(object.probingDetails); - } - if (object.bypassFirewallChecks != null) - message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); - return message; - }; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} message ConnectivityTest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectivityTest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relatedProjects = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.source = null; - object.destination = null; - object.protocol = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - object.reachabilityDetails = null; - object.probingDetails = null; - object.bypassFirewallChecks = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.source, options); - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.destination, options); - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.relatedProjects && message.relatedProjects.length) { - object.relatedProjects = []; - for (var j = 0; j < message.relatedProjects.length; ++j) - object.relatedProjects[j] = message.relatedProjects[j]; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) - object.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.toObject(message.reachabilityDetails, options); - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) - object.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.toObject(message.probingDetails, options); - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - object.bypassFirewallChecks = message.bypassFirewallChecks; - return object; - }; - - /** - * Converts this ConnectivityTest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - * @returns {Object.} JSON object - */ - ConnectivityTest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectivityTest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ConnectivityTest"; - }; - - return ConnectivityTest; - })(); - - v1beta1.Endpoint = (function() { - - /** - * Properties of an Endpoint. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IEndpoint - * @property {string|null} [ipAddress] Endpoint ipAddress - * @property {number|null} [port] Endpoint port - * @property {string|null} [instance] Endpoint instance - * @property {string|null} [forwardingRule] Endpoint forwardingRule - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget - * @property {string|null} [loadBalancerId] Endpoint loadBalancerId - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType - * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster - * @property {string|null} [fqdn] Endpoint fqdn - * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance - * @property {string|null} [redisInstance] Endpoint redisInstance - * @property {string|null} [redisCluster] Endpoint redisCluster - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision - * @property {string|null} [network] Endpoint network - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null} [networkType] Endpoint networkType - * @property {string|null} [projectId] Endpoint projectId - */ - - /** - * Constructs a new Endpoint. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an Endpoint. - * @implements IEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set - */ - function Endpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Endpoint ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.ipAddress = ""; - - /** - * Endpoint port. - * @member {number} port - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.port = 0; - - /** - * Endpoint instance. - * @member {string} instance - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.instance = ""; - - /** - * Endpoint forwardingRule. - * @member {string} forwardingRule - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRule = ""; - - /** - * Endpoint forwardingRuleTarget. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRuleTarget = null; - - /** - * Endpoint loadBalancerId. - * @member {string|null|undefined} loadBalancerId - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerId = null; - - /** - * Endpoint loadBalancerType. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null|undefined} loadBalancerType - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerType = null; - - /** - * Endpoint gkeMasterCluster. - * @member {string} gkeMasterCluster - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.gkeMasterCluster = ""; - - /** - * Endpoint fqdn. - * @member {string} fqdn - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.fqdn = ""; - - /** - * Endpoint cloudSqlInstance. - * @member {string} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.cloudSqlInstance = ""; - - /** - * Endpoint redisInstance. - * @member {string} redisInstance - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.redisInstance = ""; - - /** - * Endpoint redisCluster. - * @member {string} redisCluster - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.redisCluster = ""; - - /** - * Endpoint cloudFunction. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.cloudFunction = null; - - /** - * Endpoint appEngineVersion. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.appEngineVersion = null; - - /** - * Endpoint cloudRunRevision. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.cloudRunRevision = null; - - /** - * Endpoint network. - * @member {string} network - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.network = ""; - - /** - * Endpoint networkType. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType} networkType - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.networkType = 0; - - /** - * Endpoint projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.projectId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Endpoint _forwardingRuleTarget. - * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { - get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerId. - * @member {"loadBalancerId"|undefined} _loadBalancerId - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerType. - * @member {"loadBalancerType"|undefined} _loadBalancerType - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Endpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint instance - */ - Endpoint.create = function create(properties) { - return new Endpoint(properties); - }; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); - if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); - if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); - if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); - if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); - if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); - return writer; - }; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipAddress = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.instance = reader.string(); - break; - } - case 13: { - message.forwardingRule = reader.string(); - break; - } - case 14: { - message.forwardingRuleTarget = reader.int32(); - break; - } - case 15: { - message.loadBalancerId = reader.string(); - break; - } - case 16: { - message.loadBalancerType = reader.int32(); - break; - } - case 7: { - message.gkeMasterCluster = reader.string(); - break; - } - case 19: { - message.fqdn = reader.string(); - break; - } - case 8: { - message.cloudSqlInstance = reader.string(); - break; - } - case 17: { - message.redisInstance = reader.string(); - break; - } - case 18: { - message.redisCluster = reader.string(); - break; - } - case 10: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); - break; - } - case 11: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); - break; - } - case 12: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.network = reader.string(); - break; - } - case 5: { - message.networkType = reader.int32(); - break; - } - case 6: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Endpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Endpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.instance != null && message.hasOwnProperty("instance")) - if (!$util.isString(message.instance)) - return "instance: string expected"; - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - if (!$util.isString(message.forwardingRule)) - return "forwardingRule: string expected"; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - properties._forwardingRuleTarget = 1; - switch (message.forwardingRuleTarget) { - default: - return "forwardingRuleTarget: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - properties._loadBalancerId = 1; - if (!$util.isString(message.loadBalancerId)) - return "loadBalancerId: string expected"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - properties._loadBalancerType = 1; - switch (message.loadBalancerType) { - default: - return "loadBalancerType: 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: - break; - } - } - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - if (!$util.isString(message.gkeMasterCluster)) - return "gkeMasterCluster: string expected"; - if (message.fqdn != null && message.hasOwnProperty("fqdn")) - if (!$util.isString(message.fqdn)) - return "fqdn: string expected"; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - if (!$util.isString(message.cloudSqlInstance)) - return "cloudSqlInstance: string expected"; - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - if (!$util.isString(message.redisInstance)) - return "redisInstance: string expected"; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - if (!$util.isString(message.redisCluster)) - return "redisCluster: string expected"; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.networkType != null && message.hasOwnProperty("networkType")) - switch (message.networkType) { - default: - return "networkType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint - */ - Endpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.port != null) - message.port = object.port | 0; - if (object.instance != null) - message.instance = String(object.instance); - if (object.forwardingRule != null) - message.forwardingRule = String(object.forwardingRule); - switch (object.forwardingRuleTarget) { - default: - if (typeof object.forwardingRuleTarget === "number") { - message.forwardingRuleTarget = object.forwardingRuleTarget; - break; - } - break; - case "FORWARDING_RULE_TARGET_UNSPECIFIED": - case 0: - message.forwardingRuleTarget = 0; - break; - case "INSTANCE": - case 1: - message.forwardingRuleTarget = 1; - break; - case "LOAD_BALANCER": - case 2: - message.forwardingRuleTarget = 2; - break; - case "VPN_GATEWAY": - case 3: - message.forwardingRuleTarget = 3; - break; - case "PSC": - case 4: - message.forwardingRuleTarget = 4; - break; - } - if (object.loadBalancerId != null) - message.loadBalancerId = String(object.loadBalancerId); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "HTTPS_ADVANCED_LOAD_BALANCER": - case 1: - message.loadBalancerType = 1; - break; - case "HTTPS_LOAD_BALANCER": - case 2: - message.loadBalancerType = 2; - break; - case "REGIONAL_HTTPS_LOAD_BALANCER": - case 3: - message.loadBalancerType = 3; - break; - case "INTERNAL_HTTPS_LOAD_BALANCER": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY_LOAD_BALANCER": - case 5: - message.loadBalancerType = 5; - break; - case "TCP_PROXY_LOAD_BALANCER": - case 6: - message.loadBalancerType = 6; - break; - case "INTERNAL_TCP_PROXY_LOAD_BALANCER": - case 7: - message.loadBalancerType = 7; - break; - case "NETWORK_LOAD_BALANCER": - case 8: - message.loadBalancerType = 8; - break; - case "LEGACY_NETWORK_LOAD_BALANCER": - case 9: - message.loadBalancerType = 9; - break; - case "TCP_UDP_INTERNAL_LOAD_BALANCER": - case 10: - message.loadBalancerType = 10; - break; - } - if (object.gkeMasterCluster != null) - message.gkeMasterCluster = String(object.gkeMasterCluster); - if (object.fqdn != null) - message.fqdn = String(object.fqdn); - if (object.cloudSqlInstance != null) - message.cloudSqlInstance = String(object.cloudSqlInstance); - if (object.redisInstance != null) - message.redisInstance = String(object.redisInstance); - if (object.redisCluster != null) - message.redisCluster = String(object.redisCluster); - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); - } - if (object.network != null) - message.network = String(object.network); - switch (object.networkType) { - default: - if (typeof object.networkType === "number") { - message.networkType = object.networkType; - break; - } - break; - case "NETWORK_TYPE_UNSPECIFIED": - case 0: - message.networkType = 0; - break; - case "GCP_NETWORK": - case 1: - message.networkType = 1; - break; - case "NON_GCP_NETWORK": - case 2: - message.networkType = 2; - break; - } - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint} message Endpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Endpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ipAddress = ""; - object.port = 0; - object.instance = ""; - object.network = ""; - object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; - object.projectId = ""; - object.gkeMasterCluster = ""; - object.cloudSqlInstance = ""; - object.cloudFunction = null; - object.appEngineVersion = null; - object.cloudRunRevision = null; - object.forwardingRule = ""; - object.redisInstance = ""; - object.redisCluster = ""; - object.fqdn = ""; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = message.instance; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.networkType != null && message.hasOwnProperty("networkType")) - object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] : message.networkType; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - object.gkeMasterCluster = message.gkeMasterCluster; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - object.cloudSqlInstance = message.cloudSqlInstance; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) - object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) - object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - object.forwardingRule = message.forwardingRule; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; - if (options.oneofs) - object._forwardingRuleTarget = "forwardingRuleTarget"; - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - object.loadBalancerId = message.loadBalancerId; - if (options.oneofs) - object._loadBalancerId = "loadBalancerId"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (options.oneofs) - object._loadBalancerType = "loadBalancerType"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - object.redisInstance = message.redisInstance; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - object.redisCluster = message.redisCluster; - if (message.fqdn != null && message.hasOwnProperty("fqdn")) - object.fqdn = message.fqdn; - return object; - }; - - /** - * Converts this Endpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - * @returns {Object.} JSON object - */ - Endpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Endpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint"; - }; - - /** - * NetworkType enum. - * @name google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType - * @enum {number} - * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value - * @property {number} GCP_NETWORK=1 GCP_NETWORK value - * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value - */ - Endpoint.NetworkType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GCP_NETWORK"] = 1; - values[valuesById[2] = "NON_GCP_NETWORK"] = 2; - return values; - })(); - - /** - * ForwardingRuleTarget enum. - * @name google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget - * @enum {number} - * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value - * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value - * @property {number} PSC=4 PSC value - */ - Endpoint.ForwardingRuleTarget = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "LOAD_BALANCER"] = 2; - values[valuesById[3] = "VPN_GATEWAY"] = 3; - values[valuesById[4] = "PSC"] = 4; - return values; - })(); - - Endpoint.CloudFunctionEndpoint = (function() { - - /** - * Properties of a CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @interface ICloudFunctionEndpoint - * @property {string|null} [uri] CloudFunctionEndpoint uri - */ - - /** - * Constructs a new CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @classdesc Represents a CloudFunctionEndpoint. - * @implements ICloudFunctionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - */ - function CloudFunctionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @instance - */ - CloudFunctionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance - */ - CloudFunctionEndpoint.create = function create(properties) { - return new CloudFunctionEndpoint(properties); - }; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - */ - CloudFunctionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint"; - }; - - return CloudFunctionEndpoint; - })(); - - Endpoint.AppEngineVersionEndpoint = (function() { - - /** - * Properties of an AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @interface IAppEngineVersionEndpoint - * @property {string|null} [uri] AppEngineVersionEndpoint uri - */ - - /** - * Constructs a new AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @classdesc Represents an AppEngineVersionEndpoint. - * @implements IAppEngineVersionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - */ - function AppEngineVersionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @instance - */ - AppEngineVersionEndpoint.prototype.uri = ""; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance - */ - AppEngineVersionEndpoint.create = function create(properties) { - return new AppEngineVersionEndpoint(properties); - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - */ - AppEngineVersionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint"; - }; - - return AppEngineVersionEndpoint; - })(); - - Endpoint.CloudRunRevisionEndpoint = (function() { - - /** - * Properties of a CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @interface ICloudRunRevisionEndpoint - * @property {string|null} [uri] CloudRunRevisionEndpoint uri - */ - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @classdesc Represents a CloudRunRevisionEndpoint. - * @implements ICloudRunRevisionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - */ - function CloudRunRevisionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @instance - */ - CloudRunRevisionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance - */ - CloudRunRevisionEndpoint.create = function create(properties) { - return new CloudRunRevisionEndpoint(properties); - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - */ - CloudRunRevisionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint"; - }; - - return CloudRunRevisionEndpoint; - })(); - - return Endpoint; - })(); - - v1beta1.ReachabilityDetails = (function() { - - /** - * Properties of a ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IReachabilityDetails - * @property {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error - * @property {Array.|null} [traces] ReachabilityDetails traces - */ - - /** - * Constructs a new ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ReachabilityDetails. - * @implements IReachabilityDetails - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set - */ - function ReachabilityDetails(properties) { - this.traces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReachabilityDetails result. - * @member {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result} result - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.result = 0; - - /** - * ReachabilityDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.verifyTime = null; - - /** - * ReachabilityDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.error = null; - - /** - * ReachabilityDetails traces. - * @member {Array.} traces - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.traces = $util.emptyArray; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails instance - */ - ReachabilityDetails.create = function create(properties) { - return new ReachabilityDetails(properties); - }; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.traces != null && message.traces.length) - for (var i = 0; i < message.traces.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.traces && message.traces.length)) - message.traces = []; - message.traces.push($root.google.cloud.networkmanagement.v1beta1.Trace.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReachabilityDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReachabilityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.traces != null && message.hasOwnProperty("traces")) { - if (!Array.isArray(message.traces)) - return "traces: array expected"; - for (var i = 0; i < message.traces.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.Trace.verify(message.traces[i]); - if (error) - return "traces." + error; - } - } - return null; - }; - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails - */ - ReachabilityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "AMBIGUOUS": - case 4: - message.result = 4; - break; - case "UNDETERMINED": - case 5: - message.result = 5; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.traces) { - if (!Array.isArray(object.traces)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: array expected"); - message.traces = []; - for (var i = 0; i < object.traces.length; ++i) { - if (typeof object.traces[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: object expected"); - message.traces[i] = $root.google.cloud.networkmanagement.v1beta1.Trace.fromObject(object.traces[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} message ReachabilityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReachabilityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.traces = []; - if (options.defaults) { - object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.traces && message.traces.length) { - object.traces = []; - for (var j = 0; j < message.traces.length; ++j) - object.traces[j] = $root.google.cloud.networkmanagement.v1beta1.Trace.toObject(message.traces[j], options); - } - return object; - }; - - /** - * Converts this ReachabilityDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - * @returns {Object.} JSON object - */ - ReachabilityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReachabilityDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ReachabilityDetails"; - }; - - /** - * Result enum. - * @name google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result - * @enum {number} - * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} AMBIGUOUS=4 AMBIGUOUS value - * @property {number} UNDETERMINED=5 UNDETERMINED value - */ - ReachabilityDetails.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[4] = "AMBIGUOUS"] = 4; - values[valuesById[5] = "UNDETERMINED"] = 5; - return values; - })(); - - return ReachabilityDetails; - })(); - - v1beta1.LatencyPercentile = (function() { - - /** - * Properties of a LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILatencyPercentile - * @property {number|null} [percent] LatencyPercentile percent - * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros - */ - - /** - * Constructs a new LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LatencyPercentile. - * @implements ILatencyPercentile - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set - */ - function LatencyPercentile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyPercentile percent. - * @member {number} percent - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.percent = 0; - - /** - * LatencyPercentile latencyMicros. - * @member {number|Long} latencyMicros - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile instance - */ - LatencyPercentile.create = function create(properties) { - return new LatencyPercentile(properties); - }; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); - if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); - return writer; - }; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.percent = reader.int32(); - break; - } - case 2: { - message.latencyMicros = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyPercentile message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyPercentile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.percent != null && message.hasOwnProperty("percent")) - if (!$util.isInteger(message.percent)) - return "percent: integer expected"; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) - return "latencyMicros: integer|Long expected"; - return null; - }; - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile - */ - LatencyPercentile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); - if (object.percent != null) - message.percent = object.percent | 0; - if (object.latencyMicros != null) - if ($util.Long) - (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; - else if (typeof object.latencyMicros === "string") - message.latencyMicros = parseInt(object.latencyMicros, 10); - else if (typeof object.latencyMicros === "number") - message.latencyMicros = object.latencyMicros; - else if (typeof object.latencyMicros === "object") - message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.LatencyPercentile} message LatencyPercentile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyPercentile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.percent = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.latencyMicros = options.longs === String ? "0" : 0; - } - if (message.percent != null && message.hasOwnProperty("percent")) - object.percent = message.percent; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (typeof message.latencyMicros === "number") - object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; - else - object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; - return object; - }; - - /** - * Converts this LatencyPercentile to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @instance - * @returns {Object.} JSON object - */ - LatencyPercentile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyPercentile - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyPercentile"; - }; - - return LatencyPercentile; - })(); - - v1beta1.LatencyDistribution = (function() { - - /** - * Properties of a LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILatencyDistribution - * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles - */ - - /** - * Constructs a new LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LatencyDistribution. - * @implements ILatencyDistribution - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set - */ - function LatencyDistribution(properties) { - this.latencyPercentiles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyDistribution latencyPercentiles. - * @member {Array.} latencyPercentiles - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @instance - */ - LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution instance - */ - LatencyDistribution.create = function create(properties) { - return new LatencyDistribution(properties); - }; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latencyPercentiles != null && message.latencyPercentiles.length) - for (var i = 0; i < message.latencyPercentiles.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.latencyPercentiles && message.latencyPercentiles.length)) - message.latencyPercentiles = []; - message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyDistribution message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyDistribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { - if (!Array.isArray(message.latencyPercentiles)) - return "latencyPercentiles: array expected"; - for (var i = 0; i < message.latencyPercentiles.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify(message.latencyPercentiles[i]); - if (error) - return "latencyPercentiles." + error; - } - } - return null; - }; - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution - */ - LatencyDistribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); - if (object.latencyPercentiles) { - if (!Array.isArray(object.latencyPercentiles)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: array expected"); - message.latencyPercentiles = []; - for (var i = 0; i < object.latencyPercentiles.length; ++i) { - if (typeof object.latencyPercentiles[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: object expected"); - message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.LatencyDistribution} message LatencyDistribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyDistribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.latencyPercentiles = []; - if (message.latencyPercentiles && message.latencyPercentiles.length) { - object.latencyPercentiles = []; - for (var j = 0; j < message.latencyPercentiles.length; ++j) - object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); - } - return object; - }; - - /** - * Converts this LatencyDistribution to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @instance - * @returns {Object.} JSON object - */ - LatencyDistribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyDistribution - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyDistribution"; - }; - - return LatencyDistribution; - })(); - - v1beta1.ProbingDetails = (function() { - - /** - * Properties of a ProbingDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IProbingDetails - * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ProbingDetails error - * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause - * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount - * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount - * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo - * @property {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency - * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation - */ - - /** - * Constructs a new ProbingDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ProbingDetails. - * @implements IProbingDetails - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set - */ - function ProbingDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProbingDetails result. - * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult} result - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.result = 0; - - /** - * ProbingDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.verifyTime = null; - - /** - * ProbingDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.error = null; - - /** - * ProbingDetails abortCause. - * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause} abortCause - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.abortCause = 0; - - /** - * ProbingDetails sentProbeCount. - * @member {number} sentProbeCount - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.sentProbeCount = 0; - - /** - * ProbingDetails successfulProbeCount. - * @member {number} successfulProbeCount - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.successfulProbeCount = 0; - - /** - * ProbingDetails endpointInfo. - * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.endpointInfo = null; - - /** - * ProbingDetails probingLatency. - * @member {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null|undefined} probingLatency - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.probingLatency = null; - - /** - * ProbingDetails destinationEgressLocation. - * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.destinationEgressLocation = null; - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails instance - */ - ProbingDetails.create = function create(properties) { - return new ProbingDetails(properties); - }; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); - if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); - if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) - $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) - $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.abortCause = reader.int32(); - break; - } - case 5: { - message.sentProbeCount = reader.int32(); - break; - } - case 6: { - message.successfulProbeCount = reader.int32(); - break; - } - case 7: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.decode(reader, reader.uint32()); - break; - } - case 9: { - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProbingDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProbingDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - switch (message.abortCause) { - default: - return "abortCause: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - if (!$util.isInteger(message.sentProbeCount)) - return "sentProbeCount: integer expected"; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - if (!$util.isInteger(message.successfulProbeCount)) - return "successfulProbeCount: integer expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { - var error = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify(message.probingLatency); - if (error) - return "probingLatency." + error; - } - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); - if (error) - return "destinationEgressLocation." + error; - } - return null; - }; - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails - */ - ProbingDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "PROBING_RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "REACHABILITY_INCONSISTENT": - case 3: - message.result = 3; - break; - case "UNDETERMINED": - case 4: - message.result = 4; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - switch (object.abortCause) { - default: - if (typeof object.abortCause === "number") { - message.abortCause = object.abortCause; - break; - } - break; - case "PROBING_ABORT_CAUSE_UNSPECIFIED": - case 0: - message.abortCause = 0; - break; - case "PERMISSION_DENIED": - case 1: - message.abortCause = 1; - break; - case "NO_SOURCE_LOCATION": - case 2: - message.abortCause = 2; - break; - } - if (object.sentProbeCount != null) - message.sentProbeCount = object.sentProbeCount | 0; - if (object.successfulProbeCount != null) - message.successfulProbeCount = object.successfulProbeCount | 0; - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.probingLatency != null) { - if (typeof object.probingLatency !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.probingLatency: object expected"); - message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.fromObject(object.probingLatency); - } - if (object.destinationEgressLocation != null) { - if (typeof object.destinationEgressLocation !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.destinationEgressLocation: object expected"); - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); - } - return message; - }; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails} message ProbingDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProbingDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; - object.sentProbeCount = 0; - object.successfulProbeCount = 0; - object.endpointInfo = null; - object.probingLatency = null; - object.destinationEgressLocation = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - object.sentProbeCount = message.sentProbeCount; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - object.successfulProbeCount = message.successfulProbeCount; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) - object.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.toObject(message.probingLatency, options); - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) - object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); - return object; - }; - - /** - * Converts this ProbingDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - * @returns {Object.} JSON object - */ - ProbingDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProbingDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails"; - }; - - /** - * ProbingResult enum. - * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult - * @enum {number} - * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value - * @property {number} UNDETERMINED=4 UNDETERMINED value - */ - ProbingDetails.ProbingResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; - values[valuesById[4] = "UNDETERMINED"] = 4; - return values; - })(); - - /** - * ProbingAbortCause enum. - * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause - * @enum {number} - * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value - * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value - * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value - */ - ProbingDetails.ProbingAbortCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PERMISSION_DENIED"] = 1; - values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; - return values; - })(); - - ProbingDetails.EdgeLocation = (function() { - - /** - * Properties of an EdgeLocation. - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @interface IEdgeLocation - * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea - */ - - /** - * Constructs a new EdgeLocation. - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @classdesc Represents an EdgeLocation. - * @implements IEdgeLocation - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - */ - function EdgeLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EdgeLocation metropolitanArea. - * @member {string} metropolitanArea - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @instance - */ - EdgeLocation.prototype.metropolitanArea = ""; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation instance - */ - EdgeLocation.create = function create(properties) { - return new EdgeLocation(properties); - }; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); - return writer; - }; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metropolitanArea = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EdgeLocation message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EdgeLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - if (!$util.isString(message.metropolitanArea)) - return "metropolitanArea: string expected"; - return null; - }; - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation - */ - EdgeLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); - if (object.metropolitanArea != null) - message.metropolitanArea = String(object.metropolitanArea); - return message; - }; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} message EdgeLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EdgeLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metropolitanArea = ""; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - object.metropolitanArea = message.metropolitanArea; - return object; - }; - - /** - * Converts this EdgeLocation to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @instance - * @returns {Object.} JSON object - */ - EdgeLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EdgeLocation - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation"; - }; - - return EdgeLocation; - })(); - - return ProbingDetails; - })(); - - v1beta1.Trace = (function() { - - /** - * Properties of a Trace. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ITrace - * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo - * @property {Array.|null} [steps] Trace steps - * @property {number|null} [forwardTraceId] Trace forwardTraceId - */ - - /** - * Constructs a new Trace. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a Trace. - * @implements ITrace - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set - */ - function Trace(properties) { - this.steps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trace endpointInfo. - * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - */ - Trace.prototype.endpointInfo = null; - - /** - * Trace steps. - * @member {Array.} steps - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - */ - Trace.prototype.steps = $util.emptyArray; - - /** - * Trace forwardTraceId. - * @member {number} forwardTraceId - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - */ - Trace.prototype.forwardTraceId = 0; - - /** - * Creates a new Trace instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace instance - */ - Trace.create = function create(properties) { - return new Trace(properties); - }; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); - return writer; - }; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.cloud.networkmanagement.v1beta1.Step.decode(reader, reader.uint32())); - break; - } - case 4: { - message.forwardTraceId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Trace message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.Step.verify(message.steps[i]); - if (error) - return "steps." + error; - } - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - if (!$util.isInteger(message.forwardTraceId)) - return "forwardTraceId: integer expected"; - return null; - }; - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace - */ - Trace.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Trace) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: object expected"); - message.steps[i] = $root.google.cloud.networkmanagement.v1beta1.Step.fromObject(object.steps[i]); - } - } - if (object.forwardTraceId != null) - message.forwardTraceId = object.forwardTraceId | 0; - return message; - }; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.Trace} message Trace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.steps = []; - if (options.defaults) { - object.endpointInfo = null; - object.forwardTraceId = 0; - } - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.cloud.networkmanagement.v1beta1.Step.toObject(message.steps[j], options); - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - object.forwardTraceId = message.forwardTraceId; - return object; - }; - - /** - * Converts this Trace to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - * @returns {Object.} JSON object - */ - Trace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Trace - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Trace"; - }; - - return Trace; - })(); - - v1beta1.Step = (function() { - - /** - * Properties of a Step. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IStep - * @property {string|null} [description] Step description - * @property {google.cloud.networkmanagement.v1beta1.Step.State|null} [state] Step state - * @property {boolean|null} [causesDrop] Step causesDrop - * @property {string|null} [projectId] Step projectId - * @property {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null} [instance] Step instance - * @property {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null} [firewall] Step firewall - * @property {google.cloud.networkmanagement.v1beta1.IRouteInfo|null} [route] Step route - * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpoint] Step endpoint - * @property {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null} [googleService] Step googleService - * @property {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule - * @property {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway - * @property {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel - * @property {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector - * @property {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null} [deliver] Step deliver - * @property {google.cloud.networkmanagement.v1beta1.IForwardInfo|null} [forward] Step forward - * @property {google.cloud.networkmanagement.v1beta1.IAbortInfo|null} [abort] Step abort - * @property {google.cloud.networkmanagement.v1beta1.IDropInfo|null} [drop] Step drop - * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer - * @property {google.cloud.networkmanagement.v1beta1.INetworkInfo|null} [network] Step network - * @property {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster - * @property {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance - * @property {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance - * @property {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null} [redisCluster] Step redisCluster - * @property {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction - * @property {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion - * @property {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision - * @property {google.cloud.networkmanagement.v1beta1.INatInfo|null} [nat] Step nat - * @property {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection - * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo - * @property {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null} [storageBucket] Step storageBucket - * @property {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg - */ - - /** - * Constructs a new Step. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a Step. - * @implements IStep - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set - */ - function Step(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Step description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.description = ""; - - /** - * Step state. - * @member {google.cloud.networkmanagement.v1beta1.Step.State} state - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.state = 0; - - /** - * Step causesDrop. - * @member {boolean} causesDrop - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.causesDrop = false; - - /** - * Step projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.projectId = ""; - - /** - * Step instance. - * @member {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null|undefined} instance - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.instance = null; - - /** - * Step firewall. - * @member {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null|undefined} firewall - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.firewall = null; - - /** - * Step route. - * @member {google.cloud.networkmanagement.v1beta1.IRouteInfo|null|undefined} route - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.route = null; - - /** - * Step endpoint. - * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpoint - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.endpoint = null; - - /** - * Step googleService. - * @member {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null|undefined} googleService - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.googleService = null; - - /** - * Step forwardingRule. - * @member {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null|undefined} forwardingRule - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.forwardingRule = null; - - /** - * Step vpnGateway. - * @member {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null|undefined} vpnGateway - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.vpnGateway = null; - - /** - * Step vpnTunnel. - * @member {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null|undefined} vpnTunnel - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.vpnTunnel = null; - - /** - * Step vpcConnector. - * @member {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null|undefined} vpcConnector - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.vpcConnector = null; - - /** - * Step deliver. - * @member {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null|undefined} deliver - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.deliver = null; - - /** - * Step forward. - * @member {google.cloud.networkmanagement.v1beta1.IForwardInfo|null|undefined} forward - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.forward = null; - - /** - * Step abort. - * @member {google.cloud.networkmanagement.v1beta1.IAbortInfo|null|undefined} abort - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.abort = null; - - /** - * Step drop. - * @member {google.cloud.networkmanagement.v1beta1.IDropInfo|null|undefined} drop - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.drop = null; - - /** - * Step loadBalancer. - * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null|undefined} loadBalancer - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.loadBalancer = null; - - /** - * Step network. - * @member {google.cloud.networkmanagement.v1beta1.INetworkInfo|null|undefined} network - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.network = null; - - /** - * Step gkeMaster. - * @member {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null|undefined} gkeMaster - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.gkeMaster = null; - - /** - * Step cloudSqlInstance. - * @member {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.cloudSqlInstance = null; - - /** - * Step redisInstance. - * @member {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null|undefined} redisInstance - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.redisInstance = null; - - /** - * Step redisCluster. - * @member {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null|undefined} redisCluster - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.redisCluster = null; - - /** - * Step cloudFunction. - * @member {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.cloudFunction = null; - - /** - * Step appEngineVersion. - * @member {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.appEngineVersion = null; - - /** - * Step cloudRunRevision. - * @member {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.cloudRunRevision = null; - - /** - * Step nat. - * @member {google.cloud.networkmanagement.v1beta1.INatInfo|null|undefined} nat - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.nat = null; - - /** - * Step proxyConnection. - * @member {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null|undefined} proxyConnection - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.proxyConnection = null; - - /** - * Step loadBalancerBackendInfo. - * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.loadBalancerBackendInfo = null; - - /** - * Step storageBucket. - * @member {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null|undefined} storageBucket - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.storageBucket = null; - - /** - * Step serverlessNeg. - * @member {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null|undefined} serverlessNeg - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.serverlessNeg = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Step stepInfo. - * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Object.defineProperty(Step.prototype, "stepInfo", { - get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Step instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step instance - */ - Step.create = function create(properties) { - return new Step(properties); - }; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) - $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.route != null && Object.hasOwnProperty.call(message, "route")) - $root.google.cloud.networkmanagement.v1beta1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) - $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) - $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) - $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) - $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) - $root.google.cloud.networkmanagement.v1beta1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) - $root.google.cloud.networkmanagement.v1beta1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) - $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) - $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) - $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) - $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) - $root.google.cloud.networkmanagement.v1beta1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) - $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) - $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) - $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Step message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Step(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.causesDrop = reader.bool(); - break; - } - case 4: { - message.projectId = reader.string(); - break; - } - case 5: { - message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.decode(reader, reader.uint32()); - break; - } - case 7: { - message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 24: { - message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.decode(reader, reader.uint32()); - break; - } - case 9: { - message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.decode(reader, reader.uint32()); - break; - } - case 10: { - message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.decode(reader, reader.uint32()); - break; - } - case 11: { - message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.decode(reader, reader.uint32()); - break; - } - case 21: { - message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.decode(reader, reader.uint32()); - break; - } - case 16: { - message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.decode(reader, reader.uint32()); - break; - } - case 17: { - message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.decode(reader, reader.uint32()); - break; - } - case 18: { - message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.decode(reader, reader.uint32()); - break; - } - case 19: { - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 30: { - message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 31: { - message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.decode(reader, reader.uint32()); - break; - } - case 20: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.decode(reader, reader.uint32()); - break; - } - case 22: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.decode(reader, reader.uint32()); - break; - } - case 27: { - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); - break; - } - case 28: { - message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.decode(reader, reader.uint32()); - break; - } - case 29: { - message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Step message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Step.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 27: - case 3: - case 21: - case 22: - case 32: - case 33: - case 23: - case 25: - case 26: - case 29: - case 30: - case 31: - case 4: - case 5: - case 6: - case 7: - case 28: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 24: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - break; - } - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - if (typeof message.causesDrop !== "boolean") - return "causesDrop: boolean expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.verify(message.instance); - if (error) - return "instance." + error; - } - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.verify(message.firewall); - if (error) - return "firewall." + error; - } - } - if (message.route != null && message.hasOwnProperty("route")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.verify(message.route); - if (error) - return "route." + error; - } - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpoint); - if (error) - return "endpoint." + error; - } - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify(message.googleService); - if (error) - return "googleService." + error; - } - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify(message.forwardingRule); - if (error) - return "forwardingRule." + error; - } - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify(message.vpnGateway); - if (error) - return "vpnGateway." + error; - } - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify(message.vpnTunnel); - if (error) - return "vpnTunnel." + error; - } - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify(message.vpcConnector); - if (error) - return "vpcConnector." + error; - } - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.verify(message.deliver); - if (error) - return "deliver." + error; - } - } - if (message.forward != null && message.hasOwnProperty("forward")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.verify(message.forward); - if (error) - return "forward." + error; - } - } - if (message.abort != null && message.hasOwnProperty("abort")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.verify(message.abort); - if (error) - return "abort." + error; - } - } - if (message.drop != null && message.hasOwnProperty("drop")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.DropInfo.verify(message.drop); - if (error) - return "drop." + error; - } - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify(message.loadBalancer); - if (error) - return "loadBalancer." + error; - } - } - if (message.network != null && message.hasOwnProperty("network")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.verify(message.network); - if (error) - return "network." + error; - } - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify(message.gkeMaster); - if (error) - return "gkeMaster." + error; - } - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); - if (error) - return "cloudSqlInstance." + error; - } - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify(message.redisInstance); - if (error) - return "redisInstance." + error; - } - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify(message.redisCluster); - if (error) - return "redisCluster." + error; - } - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - } - if (message.nat != null && message.hasOwnProperty("nat")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.NatInfo.verify(message.nat); - if (error) - return "nat." + error; - } - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify(message.proxyConnection); - if (error) - return "proxyConnection." + error; - } - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); - if (error) - return "loadBalancerBackendInfo." + error; - } - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify(message.storageBucket); - if (error) - return "storageBucket." + error; - } - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify(message.serverlessNeg); - if (error) - return "serverlessNeg." + error; - } - } - return null; - }; - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step - */ - Step.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Step) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Step(); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "START_FROM_INSTANCE": - case 1: - message.state = 1; - break; - case "START_FROM_INTERNET": - case 2: - message.state = 2; - break; - case "START_FROM_GOOGLE_SERVICE": - case 27: - message.state = 27; - break; - case "START_FROM_PRIVATE_NETWORK": - case 3: - message.state = 3; - break; - case "START_FROM_GKE_MASTER": - case 21: - message.state = 21; - break; - case "START_FROM_CLOUD_SQL_INSTANCE": - case 22: - message.state = 22; - break; - case "START_FROM_REDIS_INSTANCE": - case 32: - message.state = 32; - break; - case "START_FROM_REDIS_CLUSTER": - case 33: - message.state = 33; - break; - case "START_FROM_CLOUD_FUNCTION": - case 23: - message.state = 23; - break; - case "START_FROM_APP_ENGINE_VERSION": - case 25: - message.state = 25; - break; - case "START_FROM_CLOUD_RUN_REVISION": - case 26: - message.state = 26; - break; - case "START_FROM_STORAGE_BUCKET": - case 29: - message.state = 29; - break; - case "START_FROM_PSC_PUBLISHED_SERVICE": - case 30: - message.state = 30; - break; - case "START_FROM_SERVERLESS_NEG": - case 31: - message.state = 31; - break; - case "APPLY_INGRESS_FIREWALL_RULE": - case 4: - message.state = 4; - break; - case "APPLY_EGRESS_FIREWALL_RULE": - case 5: - message.state = 5; - break; - case "APPLY_ROUTE": - case 6: - message.state = 6; - break; - case "APPLY_FORWARDING_RULE": - case 7: - message.state = 7; - break; - case "ANALYZE_LOAD_BALANCER_BACKEND": - case 28: - message.state = 28; - break; - case "SPOOFING_APPROVED": - case 8: - message.state = 8; - break; - case "ARRIVE_AT_INSTANCE": - case 9: - message.state = 9; - break; - case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": - case 10: - message.state = 10; - break; - case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": - case 11: - message.state = 11; - break; - case "ARRIVE_AT_VPN_GATEWAY": - case 12: - message.state = 12; - break; - case "ARRIVE_AT_VPN_TUNNEL": - case 13: - message.state = 13; - break; - case "ARRIVE_AT_VPC_CONNECTOR": - case 24: - message.state = 24; - break; - case "NAT": - case 14: - message.state = 14; - break; - case "PROXY_CONNECTION": - case 15: - message.state = 15; - break; - case "DELIVER": - case 16: - message.state = 16; - break; - case "DROP": - case 17: - message.state = 17; - break; - case "FORWARD": - case 18: - message.state = 18; - break; - case "ABORT": - case 19: - message.state = 19; - break; - case "VIEWER_PERMISSION_MISSING": - case 20: - message.state = 20; - break; - } - if (object.causesDrop != null) - message.causesDrop = Boolean(object.causesDrop); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instance != null) { - if (typeof object.instance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.instance: object expected"); - message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.fromObject(object.instance); - } - if (object.firewall != null) { - if (typeof object.firewall !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.firewall: object expected"); - message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.fromObject(object.firewall); - } - if (object.route != null) { - if (typeof object.route !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.route: object expected"); - message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.fromObject(object.route); - } - if (object.endpoint != null) { - if (typeof object.endpoint !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.endpoint: object expected"); - message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpoint); - } - if (object.googleService != null) { - if (typeof object.googleService !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.googleService: object expected"); - message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.fromObject(object.googleService); - } - if (object.forwardingRule != null) { - if (typeof object.forwardingRule !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forwardingRule: object expected"); - message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.fromObject(object.forwardingRule); - } - if (object.vpnGateway != null) { - if (typeof object.vpnGateway !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnGateway: object expected"); - message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.fromObject(object.vpnGateway); - } - if (object.vpnTunnel != null) { - if (typeof object.vpnTunnel !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnTunnel: object expected"); - message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.fromObject(object.vpnTunnel); - } - if (object.vpcConnector != null) { - if (typeof object.vpcConnector !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpcConnector: object expected"); - message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.fromObject(object.vpcConnector); - } - if (object.deliver != null) { - if (typeof object.deliver !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.deliver: object expected"); - message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.fromObject(object.deliver); - } - if (object.forward != null) { - if (typeof object.forward !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forward: object expected"); - message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.fromObject(object.forward); - } - if (object.abort != null) { - if (typeof object.abort !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.abort: object expected"); - message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.fromObject(object.abort); - } - if (object.drop != null) { - if (typeof object.drop !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.drop: object expected"); - message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.fromObject(object.drop); - } - if (object.loadBalancer != null) { - if (typeof object.loadBalancer !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancer: object expected"); - message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.fromObject(object.loadBalancer); - } - if (object.network != null) { - if (typeof object.network !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.network: object expected"); - message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.fromObject(object.network); - } - if (object.gkeMaster != null) { - if (typeof object.gkeMaster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.gkeMaster: object expected"); - message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.fromObject(object.gkeMaster); - } - if (object.cloudSqlInstance != null) { - if (typeof object.cloudSqlInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudSqlInstance: object expected"); - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); - } - if (object.redisInstance != null) { - if (typeof object.redisInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisInstance: object expected"); - message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.fromObject(object.redisInstance); - } - if (object.redisCluster != null) { - if (typeof object.redisCluster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisCluster: object expected"); - message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.fromObject(object.redisCluster); - } - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); - } - if (object.nat != null) { - if (typeof object.nat !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.nat: object expected"); - message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.fromObject(object.nat); - } - if (object.proxyConnection != null) { - if (typeof object.proxyConnection !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.proxyConnection: object expected"); - message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.fromObject(object.proxyConnection); - } - if (object.loadBalancerBackendInfo != null) { - if (typeof object.loadBalancerBackendInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancerBackendInfo: object expected"); - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); - } - if (object.storageBucket != null) { - if (typeof object.storageBucket !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.storageBucket: object expected"); - message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.fromObject(object.storageBucket); - } - if (object.serverlessNeg != null) { - if (typeof object.serverlessNeg !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.serverlessNeg: object expected"); - message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.fromObject(object.serverlessNeg); - } - return message; - }; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.Step} message Step - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Step.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.causesDrop = false; - object.projectId = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] : message.state; - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - object.causesDrop = message.causesDrop; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instance != null && message.hasOwnProperty("instance")) { - object.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.toObject(message.instance, options); - if (options.oneofs) - object.stepInfo = "instance"; - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - object.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.toObject(message.firewall, options); - if (options.oneofs) - object.stepInfo = "firewall"; - } - if (message.route != null && message.hasOwnProperty("route")) { - object.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.toObject(message.route, options); - if (options.oneofs) - object.stepInfo = "route"; - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - object.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpoint, options); - if (options.oneofs) - object.stepInfo = "endpoint"; - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - object.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.toObject(message.forwardingRule, options); - if (options.oneofs) - object.stepInfo = "forwardingRule"; - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - object.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.toObject(message.vpnGateway, options); - if (options.oneofs) - object.stepInfo = "vpnGateway"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - object.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.toObject(message.vpnTunnel, options); - if (options.oneofs) - object.stepInfo = "vpnTunnel"; - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - object.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.toObject(message.deliver, options); - if (options.oneofs) - object.stepInfo = "deliver"; - } - if (message.forward != null && message.hasOwnProperty("forward")) { - object.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.toObject(message.forward, options); - if (options.oneofs) - object.stepInfo = "forward"; - } - if (message.abort != null && message.hasOwnProperty("abort")) { - object.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.toObject(message.abort, options); - if (options.oneofs) - object.stepInfo = "abort"; - } - if (message.drop != null && message.hasOwnProperty("drop")) { - object.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.toObject(message.drop, options); - if (options.oneofs) - object.stepInfo = "drop"; - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - object.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.toObject(message.loadBalancer, options); - if (options.oneofs) - object.stepInfo = "loadBalancer"; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.toObject(message.network, options); - if (options.oneofs) - object.stepInfo = "network"; - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - object.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.toObject(message.gkeMaster, options); - if (options.oneofs) - object.stepInfo = "gkeMaster"; - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); - if (options.oneofs) - object.stepInfo = "cloudSqlInstance"; - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.toObject(message.cloudFunction, options); - if (options.oneofs) - object.stepInfo = "cloudFunction"; - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - object.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.toObject(message.vpcConnector, options); - if (options.oneofs) - object.stepInfo = "vpcConnector"; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); - if (options.oneofs) - object.stepInfo = "appEngineVersion"; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); - if (options.oneofs) - object.stepInfo = "cloudRunRevision"; - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - object.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.toObject(message.googleService, options); - if (options.oneofs) - object.stepInfo = "googleService"; - } - if (message.nat != null && message.hasOwnProperty("nat")) { - object.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.toObject(message.nat, options); - if (options.oneofs) - object.stepInfo = "nat"; - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - object.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.toObject(message.proxyConnection, options); - if (options.oneofs) - object.stepInfo = "proxyConnection"; - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); - if (options.oneofs) - object.stepInfo = "loadBalancerBackendInfo"; - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - object.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.toObject(message.storageBucket, options); - if (options.oneofs) - object.stepInfo = "storageBucket"; - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - object.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.toObject(message.serverlessNeg, options); - if (options.oneofs) - object.stepInfo = "serverlessNeg"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - object.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.toObject(message.redisInstance, options); - if (options.oneofs) - object.stepInfo = "redisInstance"; - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - object.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.toObject(message.redisCluster, options); - if (options.oneofs) - object.stepInfo = "redisCluster"; - } - return object; - }; - - /** - * Converts this Step to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - * @returns {Object.} JSON object - */ - Step.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Step - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Step"; - }; - - /** - * State enum. - * @name google.cloud.networkmanagement.v1beta1.Step.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value - * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value - * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value - * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value - * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value - * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value - * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value - * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value - * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value - * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value - * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value - * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value - * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value - * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value - * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value - * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value - * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value - * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value - * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value - * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value - * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value - * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value - * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value - * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value - * @property {number} NAT=14 NAT value - * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value - * @property {number} DELIVER=16 DELIVER value - * @property {number} DROP=17 DROP value - * @property {number} FORWARD=18 FORWARD value - * @property {number} ABORT=19 ABORT value - * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value - */ - Step.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START_FROM_INSTANCE"] = 1; - values[valuesById[2] = "START_FROM_INTERNET"] = 2; - values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; - values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; - values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; - values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; - values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; - values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; - values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; - values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; - values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; - values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; - values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; - values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; - values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; - values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; - values[valuesById[6] = "APPLY_ROUTE"] = 6; - values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; - values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; - values[valuesById[8] = "SPOOFING_APPROVED"] = 8; - values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; - values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; - values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; - values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; - values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; - values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; - values[valuesById[14] = "NAT"] = 14; - values[valuesById[15] = "PROXY_CONNECTION"] = 15; - values[valuesById[16] = "DELIVER"] = 16; - values[valuesById[17] = "DROP"] = 17; - values[valuesById[18] = "FORWARD"] = 18; - values[valuesById[19] = "ABORT"] = 19; - values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; - return values; - })(); - - return Step; - })(); - - v1beta1.InstanceInfo = (function() { - - /** - * Properties of an InstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IInstanceInfo - * @property {string|null} [displayName] InstanceInfo displayName - * @property {string|null} [uri] InstanceInfo uri - * @property {string|null} ["interface"] InstanceInfo interface - * @property {string|null} [networkUri] InstanceInfo networkUri - * @property {string|null} [internalIp] InstanceInfo internalIp - * @property {string|null} [externalIp] InstanceInfo externalIp - * @property {Array.|null} [networkTags] InstanceInfo networkTags - * @property {string|null} [serviceAccount] InstanceInfo serviceAccount - * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri - */ - - /** - * Constructs a new InstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an InstanceInfo. - * @implements IInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set - */ - function InstanceInfo(properties) { - this.networkTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.displayName = ""; - - /** - * InstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.uri = ""; - - /** - * InstanceInfo interface. - * @member {string} interface - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype["interface"] = ""; - - /** - * InstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkUri = ""; - - /** - * InstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.internalIp = ""; - - /** - * InstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.externalIp = ""; - - /** - * InstanceInfo networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkTags = $util.emptyArray; - - /** - * InstanceInfo serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.serviceAccount = ""; - - /** - * InstanceInfo pscNetworkAttachmentUri. - * @member {string} pscNetworkAttachmentUri - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.pscNetworkAttachmentUri = ""; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo instance - */ - InstanceInfo.create = function create(properties) { - return new InstanceInfo(properties); - }; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); - if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); - return writer; - }; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message["interface"] = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; - } - case 8: { - message.serviceAccount = reader.string(); - break; - } - case 9: { - message.pscNetworkAttachmentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message["interface"] != null && message.hasOwnProperty("interface")) - if (!$util.isString(message["interface"])) - return "interface: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - if (!$util.isString(message.pscNetworkAttachmentUri)) - return "pscNetworkAttachmentUri: string expected"; - return null; - }; - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo - */ - InstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.InstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object["interface"] != null) - message["interface"] = String(object["interface"]); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.InstanceInfo.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.pscNetworkAttachmentUri != null) - message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); - return message; - }; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.InstanceInfo} message InstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object["interface"] = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.serviceAccount = ""; - object.pscNetworkAttachmentUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message["interface"] != null && message.hasOwnProperty("interface")) - object["interface"] = message["interface"]; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; - return object; - }; - - /** - * Converts this InstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - * @returns {Object.} JSON object - */ - InstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.InstanceInfo"; - }; - - return InstanceInfo; - })(); - - v1beta1.NetworkInfo = (function() { - - /** - * Properties of a NetworkInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface INetworkInfo - * @property {string|null} [displayName] NetworkInfo displayName - * @property {string|null} [uri] NetworkInfo uri - * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri - * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange - * @property {string|null} [region] NetworkInfo region - */ - - /** - * Constructs a new NetworkInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a NetworkInfo. - * @implements INetworkInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set - */ - function NetworkInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.displayName = ""; - - /** - * NetworkInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.uri = ""; - - /** - * NetworkInfo matchedSubnetUri. - * @member {string} matchedSubnetUri - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedSubnetUri = ""; - - /** - * NetworkInfo matchedIpRange. - * @member {string} matchedIpRange - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedIpRange = ""; - - /** - * NetworkInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.region = ""; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo instance - */ - NetworkInfo.create = function create(properties) { - return new NetworkInfo(properties); - }; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); - if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 5: { - message.matchedSubnetUri = reader.string(); - break; - } - case 4: { - message.matchedIpRange = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - if (!$util.isString(message.matchedSubnetUri)) - return "matchedSubnetUri: string expected"; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - if (!$util.isString(message.matchedIpRange)) - return "matchedIpRange: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo - */ - NetworkInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NetworkInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedSubnetUri != null) - message.matchedSubnetUri = String(object.matchedSubnetUri); - if (object.matchedIpRange != null) - message.matchedIpRange = String(object.matchedIpRange); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.NetworkInfo} message NetworkInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedIpRange = ""; - object.matchedSubnetUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - object.matchedIpRange = message.matchedIpRange; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - object.matchedSubnetUri = message.matchedSubnetUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this NetworkInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - * @returns {Object.} JSON object - */ - NetworkInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NetworkInfo"; - }; - - return NetworkInfo; - })(); - - v1beta1.FirewallInfo = (function() { - - /** - * Properties of a FirewallInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IFirewallInfo - * @property {string|null} [displayName] FirewallInfo displayName - * @property {string|null} [uri] FirewallInfo uri - * @property {string|null} [direction] FirewallInfo direction - * @property {string|null} [action] FirewallInfo action - * @property {number|null} [priority] FirewallInfo priority - * @property {string|null} [networkUri] FirewallInfo networkUri - * @property {Array.|null} [targetTags] FirewallInfo targetTags - * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts - * @property {string|null} [policy] FirewallInfo policy - * @property {string|null} [policyUri] FirewallInfo policyUri - * @property {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType - */ - - /** - * Constructs a new FirewallInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a FirewallInfo. - * @implements IFirewallInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set - */ - function FirewallInfo(properties) { - this.targetTags = []; - this.targetServiceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FirewallInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.displayName = ""; - - /** - * FirewallInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.uri = ""; - - /** - * FirewallInfo direction. - * @member {string} direction - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.direction = ""; - - /** - * FirewallInfo action. - * @member {string} action - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.action = ""; - - /** - * FirewallInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.priority = 0; - - /** - * FirewallInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.networkUri = ""; - - /** - * FirewallInfo targetTags. - * @member {Array.} targetTags - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetTags = $util.emptyArray; - - /** - * FirewallInfo targetServiceAccounts. - * @member {Array.} targetServiceAccounts - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; - - /** - * FirewallInfo policy. - * @member {string} policy - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policy = ""; - - /** - * FirewallInfo policyUri. - * @member {string} policyUri - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policyUri = ""; - - /** - * FirewallInfo firewallRuleType. - * @member {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType} firewallRuleType - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.firewallRuleType = 0; - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo instance - */ - FirewallInfo.create = function create(properties) { - return new FirewallInfo(properties); - }; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); - if (message.targetTags != null && message.targetTags.length) - for (var i = 0; i < message.targetTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); - if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); - if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); - if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); - return writer; - }; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.direction = reader.string(); - break; - } - case 4: { - message.action = reader.string(); - break; - } - case 5: { - message.priority = reader.int32(); - break; - } - case 6: { - message.networkUri = reader.string(); - break; - } - case 7: { - if (!(message.targetTags && message.targetTags.length)) - message.targetTags = []; - message.targetTags.push(reader.string()); - break; - } - case 8: { - if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) - message.targetServiceAccounts = []; - message.targetServiceAccounts.push(reader.string()); - break; - } - case 9: { - message.policy = reader.string(); - break; - } - case 11: { - message.policyUri = reader.string(); - break; - } - case 10: { - message.firewallRuleType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FirewallInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FirewallInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.direction != null && message.hasOwnProperty("direction")) - if (!$util.isString(message.direction)) - return "direction: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.targetTags != null && message.hasOwnProperty("targetTags")) { - if (!Array.isArray(message.targetTags)) - return "targetTags: array expected"; - for (var i = 0; i < message.targetTags.length; ++i) - if (!$util.isString(message.targetTags[i])) - return "targetTags: string[] expected"; - } - if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { - if (!Array.isArray(message.targetServiceAccounts)) - return "targetServiceAccounts: array expected"; - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - if (!$util.isString(message.targetServiceAccounts[i])) - return "targetServiceAccounts: string[] expected"; - } - if (message.policy != null && message.hasOwnProperty("policy")) - if (!$util.isString(message.policy)) - return "policy: string expected"; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - if (!$util.isString(message.policyUri)) - return "policyUri: string expected"; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - switch (message.firewallRuleType) { - default: - return "firewallRuleType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 100: - case 101: - break; - } - return null; - }; - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo - */ - FirewallInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.FirewallInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.direction != null) - message.direction = String(object.direction); - if (object.action != null) - message.action = String(object.action); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.targetTags) { - if (!Array.isArray(object.targetTags)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetTags: array expected"); - message.targetTags = []; - for (var i = 0; i < object.targetTags.length; ++i) - message.targetTags[i] = String(object.targetTags[i]); - } - if (object.targetServiceAccounts) { - if (!Array.isArray(object.targetServiceAccounts)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetServiceAccounts: array expected"); - message.targetServiceAccounts = []; - for (var i = 0; i < object.targetServiceAccounts.length; ++i) - message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); - } - if (object.policy != null) - message.policy = String(object.policy); - if (object.policyUri != null) - message.policyUri = String(object.policyUri); - switch (object.firewallRuleType) { - default: - if (typeof object.firewallRuleType === "number") { - message.firewallRuleType = object.firewallRuleType; - break; - } - break; - case "FIREWALL_RULE_TYPE_UNSPECIFIED": - case 0: - message.firewallRuleType = 0; - break; - case "HIERARCHICAL_FIREWALL_POLICY_RULE": - case 1: - message.firewallRuleType = 1; - break; - case "VPC_FIREWALL_RULE": - case 2: - message.firewallRuleType = 2; - break; - case "IMPLIED_VPC_FIREWALL_RULE": - case 3: - message.firewallRuleType = 3; - break; - case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": - case 4: - message.firewallRuleType = 4; - break; - case "NETWORK_FIREWALL_POLICY_RULE": - case 5: - message.firewallRuleType = 5; - break; - case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": - case 6: - message.firewallRuleType = 6; - break; - case "UNSUPPORTED_FIREWALL_POLICY_RULE": - case 100: - message.firewallRuleType = 100; - break; - case "TRACKING_STATE": - case 101: - message.firewallRuleType = 101; - break; - } - return message; - }; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.FirewallInfo} message FirewallInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FirewallInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targetTags = []; - object.targetServiceAccounts = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.direction = ""; - object.action = ""; - object.priority = 0; - object.networkUri = ""; - object.policy = ""; - object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; - object.policyUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = message.direction; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.targetTags && message.targetTags.length) { - object.targetTags = []; - for (var j = 0; j < message.targetTags.length; ++j) - object.targetTags[j] = message.targetTags[j]; - } - if (message.targetServiceAccounts && message.targetServiceAccounts.length) { - object.targetServiceAccounts = []; - for (var j = 0; j < message.targetServiceAccounts.length; ++j) - object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; - } - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = message.policy; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - object.policyUri = message.policyUri; - return object; - }; - - /** - * Converts this FirewallInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - * @returns {Object.} JSON object - */ - FirewallInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FirewallInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.FirewallInfo"; - }; - - /** - * FirewallRuleType enum. - * @name google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType - * @enum {number} - * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value - * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value - * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value - * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value - * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value - * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value - * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value - * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value - * @property {number} TRACKING_STATE=101 TRACKING_STATE value - */ - FirewallInfo.FirewallRuleType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; - values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; - values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; - values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; - values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; - values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; - values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; - values[valuesById[101] = "TRACKING_STATE"] = 101; - return values; - })(); - - return FirewallInfo; - })(); - - v1beta1.RouteInfo = (function() { - - /** - * Properties of a RouteInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRouteInfo - * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType - * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType - * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope - * @property {string|null} [displayName] RouteInfo displayName - * @property {string|null} [uri] RouteInfo uri - * @property {string|null} [region] RouteInfo region - * @property {string|null} [destIpRange] RouteInfo destIpRange - * @property {string|null} [nextHop] RouteInfo nextHop - * @property {string|null} [networkUri] RouteInfo networkUri - * @property {number|null} [priority] RouteInfo priority - * @property {Array.|null} [instanceTags] RouteInfo instanceTags - * @property {string|null} [srcIpRange] RouteInfo srcIpRange - * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges - * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges - * @property {Array.|null} [protocols] RouteInfo protocols - * @property {string|null} [nccHubUri] RouteInfo nccHubUri - * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri - * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri - * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri - */ - - /** - * Constructs a new RouteInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RouteInfo. - * @implements IRouteInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set - */ - function RouteInfo(properties) { - this.instanceTags = []; - this.destPortRanges = []; - this.srcPortRanges = []; - this.protocols = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RouteInfo routeType. - * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType} routeType - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeType = 0; - - /** - * RouteInfo nextHopType. - * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType} nextHopType - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHopType = 0; - - /** - * RouteInfo routeScope. - * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope} routeScope - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeScope = 0; - - /** - * RouteInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.displayName = ""; - - /** - * RouteInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.uri = ""; - - /** - * RouteInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.region = ""; - - /** - * RouteInfo destIpRange. - * @member {string} destIpRange - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.destIpRange = ""; - - /** - * RouteInfo nextHop. - * @member {string} nextHop - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHop = ""; - - /** - * RouteInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.networkUri = ""; - - /** - * RouteInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.priority = 0; - - /** - * RouteInfo instanceTags. - * @member {Array.} instanceTags - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.instanceTags = $util.emptyArray; - - /** - * RouteInfo srcIpRange. - * @member {string} srcIpRange - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcIpRange = ""; - - /** - * RouteInfo destPortRanges. - * @member {Array.} destPortRanges - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.destPortRanges = $util.emptyArray; - - /** - * RouteInfo srcPortRanges. - * @member {Array.} srcPortRanges - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcPortRanges = $util.emptyArray; - - /** - * RouteInfo protocols. - * @member {Array.} protocols - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.protocols = $util.emptyArray; - - /** - * RouteInfo nccHubUri. - * @member {string|null|undefined} nccHubUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccHubUri = null; - - /** - * RouteInfo nccSpokeUri. - * @member {string|null|undefined} nccSpokeUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccSpokeUri = null; - - /** - * RouteInfo advertisedRouteSourceRouterUri. - * @member {string|null|undefined} advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteSourceRouterUri = null; - - /** - * RouteInfo advertisedRouteNextHopUri. - * @member {string|null|undefined} advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteNextHopUri = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RouteInfo _nccHubUri. - * @member {"nccHubUri"|undefined} _nccHubUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { - get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _nccSpokeUri. - * @member {"nccSpokeUri"|undefined} _nccSpokeUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { - get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteSourceRouterUri. - * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteNextHopUri. - * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RouteInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo instance - */ - RouteInfo.create = function create(properties) { - return new RouteInfo(properties); - }; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); - if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); - if (message.instanceTags != null && message.instanceTags.length) - for (var i = 0; i < message.instanceTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); - if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); - if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); - if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); - if (message.destPortRanges != null && message.destPortRanges.length) - for (var i = 0; i < message.destPortRanges.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); - if (message.srcPortRanges != null && message.srcPortRanges.length) - for (var i = 0; i < message.srcPortRanges.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); - if (message.protocols != null && message.protocols.length) - for (var i = 0; i < message.protocols.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); - if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); - if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); - if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); - if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); - if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); - return writer; - }; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: { - message.routeType = reader.int32(); - break; - } - case 9: { - message.nextHopType = reader.int32(); - break; - } - case 14: { - message.routeScope = reader.int32(); - break; - } - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 19: { - message.region = reader.string(); - break; - } - case 3: { - message.destIpRange = reader.string(); - break; - } - case 4: { - message.nextHop = reader.string(); - break; - } - case 5: { - message.networkUri = reader.string(); - break; - } - case 6: { - message.priority = reader.int32(); - break; - } - case 7: { - if (!(message.instanceTags && message.instanceTags.length)) - message.instanceTags = []; - message.instanceTags.push(reader.string()); - break; - } - case 10: { - message.srcIpRange = reader.string(); - break; - } - case 11: { - if (!(message.destPortRanges && message.destPortRanges.length)) - message.destPortRanges = []; - message.destPortRanges.push(reader.string()); - break; - } - case 12: { - if (!(message.srcPortRanges && message.srcPortRanges.length)) - message.srcPortRanges = []; - message.srcPortRanges.push(reader.string()); - break; - } - case 13: { - if (!(message.protocols && message.protocols.length)) - message.protocols = []; - message.protocols.push(reader.string()); - break; - } - case 15: { - message.nccHubUri = reader.string(); - break; - } - case 16: { - message.nccSpokeUri = reader.string(); - break; - } - case 17: { - message.advertisedRouteSourceRouterUri = reader.string(); - break; - } - case 18: { - message.advertisedRouteNextHopUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RouteInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RouteInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.routeType != null && message.hasOwnProperty("routeType")) - switch (message.routeType) { - default: - return "routeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 101: - break; - } - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - switch (message.nextHopType) { - default: - return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) - switch (message.routeScope) { - default: - return "routeScope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - if (!$util.isString(message.destIpRange)) - return "destIpRange: string expected"; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - if (!$util.isString(message.nextHop)) - return "nextHop: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { - if (!Array.isArray(message.instanceTags)) - return "instanceTags: array expected"; - for (var i = 0; i < message.instanceTags.length; ++i) - if (!$util.isString(message.instanceTags[i])) - return "instanceTags: string[] expected"; - } - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - if (!$util.isString(message.srcIpRange)) - return "srcIpRange: string expected"; - if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { - if (!Array.isArray(message.destPortRanges)) - return "destPortRanges: array expected"; - for (var i = 0; i < message.destPortRanges.length; ++i) - if (!$util.isString(message.destPortRanges[i])) - return "destPortRanges: string[] expected"; - } - if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { - if (!Array.isArray(message.srcPortRanges)) - return "srcPortRanges: array expected"; - for (var i = 0; i < message.srcPortRanges.length; ++i) - if (!$util.isString(message.srcPortRanges[i])) - return "srcPortRanges: string[] expected"; - } - if (message.protocols != null && message.hasOwnProperty("protocols")) { - if (!Array.isArray(message.protocols)) - return "protocols: array expected"; - for (var i = 0; i < message.protocols.length; ++i) - if (!$util.isString(message.protocols[i])) - return "protocols: string[] expected"; - } - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - properties._nccHubUri = 1; - if (!$util.isString(message.nccHubUri)) - return "nccHubUri: string expected"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - properties._nccSpokeUri = 1; - if (!$util.isString(message.nccSpokeUri)) - return "nccSpokeUri: string expected"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - properties._advertisedRouteSourceRouterUri = 1; - if (!$util.isString(message.advertisedRouteSourceRouterUri)) - return "advertisedRouteSourceRouterUri: string expected"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - properties._advertisedRouteNextHopUri = 1; - if (!$util.isString(message.advertisedRouteNextHopUri)) - return "advertisedRouteNextHopUri: string expected"; - } - return null; - }; - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo - */ - RouteInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RouteInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); - switch (object.routeType) { - default: - if (typeof object.routeType === "number") { - message.routeType = object.routeType; - break; - } - break; - case "ROUTE_TYPE_UNSPECIFIED": - case 0: - message.routeType = 0; - break; - case "SUBNET": - case 1: - message.routeType = 1; - break; - case "STATIC": - case 2: - message.routeType = 2; - break; - case "DYNAMIC": - case 3: - message.routeType = 3; - break; - case "PEERING_SUBNET": - case 4: - message.routeType = 4; - break; - case "PEERING_STATIC": - case 5: - message.routeType = 5; - break; - case "PEERING_DYNAMIC": - case 6: - message.routeType = 6; - break; - case "POLICY_BASED": - case 7: - message.routeType = 7; - break; - case "ADVERTISED": - case 101: - message.routeType = 101; - break; - } - switch (object.nextHopType) { - default: - if (typeof object.nextHopType === "number") { - message.nextHopType = object.nextHopType; - break; - } - break; - case "NEXT_HOP_TYPE_UNSPECIFIED": - case 0: - message.nextHopType = 0; - break; - case "NEXT_HOP_IP": - case 1: - message.nextHopType = 1; - break; - case "NEXT_HOP_INSTANCE": - case 2: - message.nextHopType = 2; - break; - case "NEXT_HOP_NETWORK": - case 3: - message.nextHopType = 3; - break; - case "NEXT_HOP_PEERING": - case 4: - message.nextHopType = 4; - break; - case "NEXT_HOP_INTERCONNECT": - case 5: - message.nextHopType = 5; - break; - case "NEXT_HOP_VPN_TUNNEL": - case 6: - message.nextHopType = 6; - break; - case "NEXT_HOP_VPN_GATEWAY": - case 7: - message.nextHopType = 7; - break; - case "NEXT_HOP_INTERNET_GATEWAY": - case 8: - message.nextHopType = 8; - break; - case "NEXT_HOP_BLACKHOLE": - case 9: - message.nextHopType = 9; - break; - case "NEXT_HOP_ILB": - case 10: - message.nextHopType = 10; - break; - case "NEXT_HOP_ROUTER_APPLIANCE": - case 11: - message.nextHopType = 11; - break; - case "NEXT_HOP_NCC_HUB": - case 12: - message.nextHopType = 12; - break; - } - switch (object.routeScope) { - default: - if (typeof object.routeScope === "number") { - message.routeScope = object.routeScope; - break; - } - break; - case "ROUTE_SCOPE_UNSPECIFIED": - case 0: - message.routeScope = 0; - break; - case "NETWORK": - case 1: - message.routeScope = 1; - break; - case "NCC_HUB": - case 2: - message.routeScope = 2; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.region != null) - message.region = String(object.region); - if (object.destIpRange != null) - message.destIpRange = String(object.destIpRange); - if (object.nextHop != null) - message.nextHop = String(object.nextHop); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.instanceTags) { - if (!Array.isArray(object.instanceTags)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.instanceTags: array expected"); - message.instanceTags = []; - for (var i = 0; i < object.instanceTags.length; ++i) - message.instanceTags[i] = String(object.instanceTags[i]); - } - if (object.srcIpRange != null) - message.srcIpRange = String(object.srcIpRange); - if (object.destPortRanges) { - if (!Array.isArray(object.destPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.destPortRanges: array expected"); - message.destPortRanges = []; - for (var i = 0; i < object.destPortRanges.length; ++i) - message.destPortRanges[i] = String(object.destPortRanges[i]); - } - if (object.srcPortRanges) { - if (!Array.isArray(object.srcPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.srcPortRanges: array expected"); - message.srcPortRanges = []; - for (var i = 0; i < object.srcPortRanges.length; ++i) - message.srcPortRanges[i] = String(object.srcPortRanges[i]); - } - if (object.protocols) { - if (!Array.isArray(object.protocols)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.protocols: array expected"); - message.protocols = []; - for (var i = 0; i < object.protocols.length; ++i) - message.protocols[i] = String(object.protocols[i]); - } - if (object.nccHubUri != null) - message.nccHubUri = String(object.nccHubUri); - if (object.nccSpokeUri != null) - message.nccSpokeUri = String(object.nccSpokeUri); - if (object.advertisedRouteSourceRouterUri != null) - message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); - if (object.advertisedRouteNextHopUri != null) - message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); - return message; - }; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.RouteInfo} message RouteInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RouteInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.instanceTags = []; - object.destPortRanges = []; - object.srcPortRanges = []; - object.protocols = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.destIpRange = ""; - object.nextHop = ""; - object.networkUri = ""; - object.priority = 0; - object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; - object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; - object.srcIpRange = ""; - object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - object.destIpRange = message.destIpRange; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - object.nextHop = message.nextHop; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.instanceTags && message.instanceTags.length) { - object.instanceTags = []; - for (var j = 0; j < message.instanceTags.length; ++j) - object.instanceTags[j] = message.instanceTags[j]; - } - if (message.routeType != null && message.hasOwnProperty("routeType")) - object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] : message.routeType; - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - object.srcIpRange = message.srcIpRange; - if (message.destPortRanges && message.destPortRanges.length) { - object.destPortRanges = []; - for (var j = 0; j < message.destPortRanges.length; ++j) - object.destPortRanges[j] = message.destPortRanges[j]; - } - if (message.srcPortRanges && message.srcPortRanges.length) { - object.srcPortRanges = []; - for (var j = 0; j < message.srcPortRanges.length; ++j) - object.srcPortRanges[j] = message.srcPortRanges[j]; - } - if (message.protocols && message.protocols.length) { - object.protocols = []; - for (var j = 0; j < message.protocols.length; ++j) - object.protocols[j] = message.protocols[j]; - } - if (message.routeScope != null && message.hasOwnProperty("routeScope")) - object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - object.nccHubUri = message.nccHubUri; - if (options.oneofs) - object._nccHubUri = "nccHubUri"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - object.nccSpokeUri = message.nccSpokeUri; - if (options.oneofs) - object._nccSpokeUri = "nccSpokeUri"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; - if (options.oneofs) - object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; - if (options.oneofs) - object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; - } - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RouteInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - * @returns {Object.} JSON object - */ - RouteInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RouteInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RouteInfo"; - }; - - /** - * RouteType enum. - * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType - * @enum {number} - * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value - * @property {number} SUBNET=1 SUBNET value - * @property {number} STATIC=2 STATIC value - * @property {number} DYNAMIC=3 DYNAMIC value - * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value - * @property {number} PEERING_STATIC=5 PEERING_STATIC value - * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value - * @property {number} POLICY_BASED=7 POLICY_BASED value - * @property {number} ADVERTISED=101 ADVERTISED value - */ - RouteInfo.RouteType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUBNET"] = 1; - values[valuesById[2] = "STATIC"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - values[valuesById[4] = "PEERING_SUBNET"] = 4; - values[valuesById[5] = "PEERING_STATIC"] = 5; - values[valuesById[6] = "PEERING_DYNAMIC"] = 6; - values[valuesById[7] = "POLICY_BASED"] = 7; - values[valuesById[101] = "ADVERTISED"] = 101; - return values; - })(); - - /** - * NextHopType enum. - * @name google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType - * @enum {number} - * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value - * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value - * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value - * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value - * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value - * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value - * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value - * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value - * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value - * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value - * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value - * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value - * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value - */ - RouteInfo.NextHopType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEXT_HOP_IP"] = 1; - values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; - values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; - values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; - values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; - values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; - values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; - values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; - values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; - values[valuesById[10] = "NEXT_HOP_ILB"] = 10; - values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; - values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; - return values; - })(); - - /** - * RouteScope enum. - * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope - * @enum {number} - * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value - * @property {number} NETWORK=1 NETWORK value - * @property {number} NCC_HUB=2 NCC_HUB value - */ - RouteInfo.RouteScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NETWORK"] = 1; - values[valuesById[2] = "NCC_HUB"] = 2; - return values; - })(); - - return RouteInfo; - })(); - - v1beta1.GoogleServiceInfo = (function() { - - /** - * Properties of a GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGoogleServiceInfo - * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp - * @property {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType - */ - - /** - * Constructs a new GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GoogleServiceInfo. - * @implements IGoogleServiceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set - */ - function GoogleServiceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoogleServiceInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.sourceIp = ""; - - /** - * GoogleServiceInfo googleServiceType. - * @member {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType} googleServiceType - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.googleServiceType = 0; - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo instance - */ - GoogleServiceInfo.create = function create(properties) { - return new GoogleServiceInfo(properties); - }; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); - return writer; - }; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.googleServiceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoogleServiceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoogleServiceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - switch (message.googleServiceType) { - default: - return "googleServiceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - return null; - }; - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo - */ - GoogleServiceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - switch (object.googleServiceType) { - default: - if (typeof object.googleServiceType === "number") { - message.googleServiceType = object.googleServiceType; - break; - } - break; - case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": - case 0: - message.googleServiceType = 0; - break; - case "IAP": - case 1: - message.googleServiceType = 1; - break; - case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": - case 2: - message.googleServiceType = 2; - break; - case "CLOUD_DNS": - case 3: - message.googleServiceType = 3; - break; - case "GOOGLE_API": - case 4: - message.googleServiceType = 4; - break; - case "GOOGLE_API_PSC": - case 5: - message.googleServiceType = 5; - break; - case "GOOGLE_API_VPC_SC": - case 6: - message.googleServiceType = 6; - break; - } - return message; - }; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} message GoogleServiceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoogleServiceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; - return object; - }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @instance - * @returns {Object.} JSON object - */ - GoogleServiceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoogleServiceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GoogleServiceInfo"; - }; - - /** - * GoogleServiceType enum. - * @name google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType - * @enum {number} - * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value - * @property {number} IAP=1 IAP value - * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value - * @property {number} CLOUD_DNS=3 CLOUD_DNS value - * @property {number} GOOGLE_API=4 GOOGLE_API value - * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value - * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value - */ - GoogleServiceInfo.GoogleServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IAP"] = 1; - values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; - values[valuesById[3] = "CLOUD_DNS"] = 3; - values[valuesById[4] = "GOOGLE_API"] = 4; - values[valuesById[5] = "GOOGLE_API_PSC"] = 5; - values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; - return values; - })(); - - return GoogleServiceInfo; - })(); - - v1beta1.ForwardingRuleInfo = (function() { - - /** - * Properties of a ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IForwardingRuleInfo - * @property {string|null} [displayName] ForwardingRuleInfo displayName - * @property {string|null} [uri] ForwardingRuleInfo uri - * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol - * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange - * @property {string|null} [vip] ForwardingRuleInfo vip - * @property {string|null} [target] ForwardingRuleInfo target - * @property {string|null} [networkUri] ForwardingRuleInfo networkUri - * @property {string|null} [region] ForwardingRuleInfo region - * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName - * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget - */ - - /** - * Constructs a new ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ForwardingRuleInfo. - * @implements IForwardingRuleInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set - */ - function ForwardingRuleInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardingRuleInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.displayName = ""; - - /** - * ForwardingRuleInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.uri = ""; - - /** - * ForwardingRuleInfo matchedProtocol. - * @member {string} matchedProtocol - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedProtocol = ""; - - /** - * ForwardingRuleInfo matchedPortRange. - * @member {string} matchedPortRange - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedPortRange = ""; - - /** - * ForwardingRuleInfo vip. - * @member {string} vip - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.vip = ""; - - /** - * ForwardingRuleInfo target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.target = ""; - - /** - * ForwardingRuleInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.networkUri = ""; - - /** - * ForwardingRuleInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.region = ""; - - /** - * ForwardingRuleInfo loadBalancerName. - * @member {string} loadBalancerName - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.loadBalancerName = ""; - - /** - * ForwardingRuleInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * ForwardingRuleInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo instance - */ - ForwardingRuleInfo.create = function create(properties) { - return new ForwardingRuleInfo(properties); - }; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); - if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); - if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.matchedProtocol = reader.string(); - break; - } - case 6: { - message.matchedPortRange = reader.string(); - break; - } - case 4: { - message.vip = reader.string(); - break; - } - case 5: { - message.target = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.loadBalancerName = reader.string(); - break; - } - case 10: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 11: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardingRuleInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardingRuleInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - if (!$util.isString(message.matchedProtocol)) - return "matchedProtocol: string expected"; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - if (!$util.isString(message.matchedPortRange)) - return "matchedPortRange: string expected"; - if (message.vip != null && message.hasOwnProperty("vip")) - if (!$util.isString(message.vip)) - return "vip: string expected"; - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - if (!$util.isString(message.loadBalancerName)) - return "loadBalancerName: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo - */ - ForwardingRuleInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedProtocol != null) - message.matchedProtocol = String(object.matchedProtocol); - if (object.matchedPortRange != null) - message.matchedPortRange = String(object.matchedPortRange); - if (object.vip != null) - message.vip = String(object.vip); - if (object.target != null) - message.target = String(object.target); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - if (object.loadBalancerName != null) - message.loadBalancerName = String(object.loadBalancerName); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} message ForwardingRuleInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardingRuleInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedProtocol = ""; - object.vip = ""; - object.target = ""; - object.matchedPortRange = ""; - object.networkUri = ""; - object.region = ""; - object.loadBalancerName = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - object.matchedProtocol = message.matchedProtocol; - if (message.vip != null && message.hasOwnProperty("vip")) - object.vip = message.vip; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - object.matchedPortRange = message.matchedPortRange; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - object.loadBalancerName = message.loadBalancerName; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardingRuleInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo"; - }; - - return ForwardingRuleInfo; - })(); - - v1beta1.LoadBalancerInfo = (function() { - - /** - * Properties of a LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILoadBalancerInfo - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType - * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri - * @property {Array.|null} [backends] LoadBalancerInfo backends - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType - * @property {string|null} [backendUri] LoadBalancerInfo backendUri - */ - - /** - * Constructs a new LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LoadBalancerInfo. - * @implements ILoadBalancerInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set - */ - function LoadBalancerInfo(properties) { - this.backends = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerInfo loadBalancerType. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType} loadBalancerType - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.loadBalancerType = 0; - - /** - * LoadBalancerInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerInfo backends. - * @member {Array.} backends - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backends = $util.emptyArray; - - /** - * LoadBalancerInfo backendType. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType} backendType - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendType = 0; - - /** - * LoadBalancerInfo backendUri. - * @member {string} backendUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendUri = ""; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo instance - */ - LoadBalancerInfo.create = function create(properties) { - return new LoadBalancerInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); - if (message.backends != null && message.backends.length) - for (var i = 0; i < message.backends.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); - if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); - return writer; - }; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.loadBalancerType = reader.int32(); - break; - } - case 2: { - message.healthCheckUri = reader.string(); - break; - } - case 3: { - if (!(message.backends && message.backends.length)) - message.backends = []; - message.backends.push($root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.decode(reader, reader.uint32())); - break; - } - case 4: { - message.backendType = reader.int32(); - break; - } - case 5: { - message.backendUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - switch (message.loadBalancerType) { - default: - return "loadBalancerType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.backends != null && message.hasOwnProperty("backends")) { - if (!Array.isArray(message.backends)) - return "backends: array expected"; - for (var i = 0; i < message.backends.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify(message.backends[i]); - if (error) - return "backends." + error; - } - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - switch (message.backendType) { - default: - return "backendType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - if (!$util.isString(message.backendUri)) - return "backendUri: string expected"; - return null; - }; - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo - */ - LoadBalancerInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "INTERNAL_TCP_UDP": - case 1: - message.loadBalancerType = 1; - break; - case "NETWORK_TCP_UDP": - case 2: - message.loadBalancerType = 2; - break; - case "HTTP_PROXY": - case 3: - message.loadBalancerType = 3; - break; - case "TCP_PROXY": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY": - case 5: - message.loadBalancerType = 5; - break; - } - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - if (object.backends) { - if (!Array.isArray(object.backends)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: array expected"); - message.backends = []; - for (var i = 0; i < object.backends.length; ++i) { - if (typeof object.backends[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: object expected"); - message.backends[i] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.fromObject(object.backends[i]); - } - } - switch (object.backendType) { - default: - if (typeof object.backendType === "number") { - message.backendType = object.backendType; - break; - } - break; - case "BACKEND_TYPE_UNSPECIFIED": - case 0: - message.backendType = 0; - break; - case "BACKEND_SERVICE": - case 1: - message.backendType = 1; - break; - case "TARGET_POOL": - case 2: - message.backendType = 2; - break; - case "TARGET_INSTANCE": - case 3: - message.backendType = 3; - break; - } - if (object.backendUri != null) - message.backendUri = String(object.backendUri); - return message; - }; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} message LoadBalancerInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backends = []; - if (options.defaults) { - object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; - object.healthCheckUri = ""; - object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; - object.backendUri = ""; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.backends && message.backends.length) { - object.backends = []; - for (var j = 0; j < message.backends.length; ++j) - object.backends[j] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.toObject(message.backends[j], options); - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - object.backendUri = message.backendUri; - return object; - }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerInfo"; - }; - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value - * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value - * @property {number} HTTP_PROXY=3 HTTP_PROXY value - * @property {number} TCP_PROXY=4 TCP_PROXY value - * @property {number} SSL_PROXY=5 SSL_PROXY value - */ - LoadBalancerInfo.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; - values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; - values[valuesById[3] = "HTTP_PROXY"] = 3; - values[valuesById[4] = "TCP_PROXY"] = 4; - values[valuesById[5] = "SSL_PROXY"] = 5; - return values; - })(); - - /** - * BackendType enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType - * @enum {number} - * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value - * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value - * @property {number} TARGET_POOL=2 TARGET_POOL value - * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value - */ - LoadBalancerInfo.BackendType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKEND_SERVICE"] = 1; - values[valuesById[2] = "TARGET_POOL"] = 2; - values[valuesById[3] = "TARGET_INSTANCE"] = 3; - return values; - })(); - - return LoadBalancerInfo; - })(); - - v1beta1.LoadBalancerBackend = (function() { - - /** - * Properties of a LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILoadBalancerBackend - * @property {string|null} [displayName] LoadBalancerBackend displayName - * @property {string|null} [uri] LoadBalancerBackend uri - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState - * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules - * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules - */ - - /** - * Constructs a new LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LoadBalancerBackend. - * @implements ILoadBalancerBackend - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set - */ - function LoadBalancerBackend(properties) { - this.healthCheckAllowingFirewallRules = []; - this.healthCheckBlockingFirewallRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackend displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.displayName = ""; - - /** - * LoadBalancerBackend uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.uri = ""; - - /** - * LoadBalancerBackend healthCheckFirewallState. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckFirewallState = 0; - - /** - * LoadBalancerBackend healthCheckAllowingFirewallRules. - * @member {Array.} healthCheckAllowingFirewallRules - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; - - /** - * LoadBalancerBackend healthCheckBlockingFirewallRules. - * @member {Array.} healthCheckBlockingFirewallRules - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend instance - */ - LoadBalancerBackend.create = function create(properties) { - return new LoadBalancerBackend(properties); - }; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); - if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); - if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.healthCheckFirewallState = reader.int32(); - break; - } - case 4: { - if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) - message.healthCheckAllowingFirewallRules = []; - message.healthCheckAllowingFirewallRules.push(reader.string()); - break; - } - case 5: { - if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) - message.healthCheckBlockingFirewallRules = []; - message.healthCheckBlockingFirewallRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackend message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - switch (message.healthCheckFirewallState) { - default: - return "healthCheckFirewallState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { - if (!Array.isArray(message.healthCheckAllowingFirewallRules)) - return "healthCheckAllowingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) - return "healthCheckAllowingFirewallRules: string[] expected"; - } - if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { - if (!Array.isArray(message.healthCheckBlockingFirewallRules)) - return "healthCheckBlockingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) - return "healthCheckBlockingFirewallRules: string[] expected"; - } - return null; - }; - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend - */ - LoadBalancerBackend.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - switch (object.healthCheckFirewallState) { - default: - if (typeof object.healthCheckFirewallState === "number") { - message.healthCheckFirewallState = object.healthCheckFirewallState; - break; - } - break; - case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallState = 0; - break; - case "CONFIGURED": - case 1: - message.healthCheckFirewallState = 1; - break; - case "MISCONFIGURED": - case 2: - message.healthCheckFirewallState = 2; - break; - } - if (object.healthCheckAllowingFirewallRules) { - if (!Array.isArray(object.healthCheckAllowingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); - message.healthCheckAllowingFirewallRules = []; - for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) - message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); - } - if (object.healthCheckBlockingFirewallRules) { - if (!Array.isArray(object.healthCheckBlockingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); - message.healthCheckBlockingFirewallRules = []; - for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) - message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} message LoadBalancerBackend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.healthCheckAllowingFirewallRules = []; - object.healthCheckBlockingFirewallRules = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; - if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { - object.healthCheckAllowingFirewallRules = []; - for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) - object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; - } - if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { - object.healthCheckBlockingFirewallRules = []; - for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) - object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; - } - return object; - }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackend - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackend"; - }; - - /** - * HealthCheckFirewallState enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value - * @property {number} CONFIGURED=1 CONFIGURED value - * @property {number} MISCONFIGURED=2 MISCONFIGURED value - */ - LoadBalancerBackend.HealthCheckFirewallState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIGURED"] = 1; - values[valuesById[2] = "MISCONFIGURED"] = 2; - return values; - })(); - - return LoadBalancerBackend; - })(); - - v1beta1.VpnGatewayInfo = (function() { - - /** - * Properties of a VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpnGatewayInfo - * @property {string|null} [displayName] VpnGatewayInfo displayName - * @property {string|null} [uri] VpnGatewayInfo uri - * @property {string|null} [networkUri] VpnGatewayInfo networkUri - * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress - * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri - * @property {string|null} [region] VpnGatewayInfo region - */ - - /** - * Constructs a new VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpnGatewayInfo. - * @implements IVpnGatewayInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set - */ - function VpnGatewayInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnGatewayInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.displayName = ""; - - /** - * VpnGatewayInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.uri = ""; - - /** - * VpnGatewayInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.networkUri = ""; - - /** - * VpnGatewayInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.ipAddress = ""; - - /** - * VpnGatewayInfo vpnTunnelUri. - * @member {string} vpnTunnelUri - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.vpnTunnelUri = ""; - - /** - * VpnGatewayInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.region = ""; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo instance - */ - VpnGatewayInfo.create = function create(properties) { - return new VpnGatewayInfo(properties); - }; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 5: { - message.vpnTunnelUri = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnGatewayInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnGatewayInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - if (!$util.isString(message.vpnTunnelUri)) - return "vpnTunnelUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo - */ - VpnGatewayInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.vpnTunnelUri != null) - message.vpnTunnelUri = String(object.vpnTunnelUri); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} message VpnGatewayInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnGatewayInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.ipAddress = ""; - object.vpnTunnelUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - object.vpnTunnelUri = message.vpnTunnelUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - * @returns {Object.} JSON object - */ - VpnGatewayInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnGatewayInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnGatewayInfo"; - }; - - return VpnGatewayInfo; - })(); - - v1beta1.VpnTunnelInfo = (function() { - - /** - * Properties of a VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpnTunnelInfo - * @property {string|null} [displayName] VpnTunnelInfo displayName - * @property {string|null} [uri] VpnTunnelInfo uri - * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway - * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway - * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp - * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp - * @property {string|null} [networkUri] VpnTunnelInfo networkUri - * @property {string|null} [region] VpnTunnelInfo region - * @property {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType - */ - - /** - * Constructs a new VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpnTunnelInfo. - * @implements IVpnTunnelInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set - */ - function VpnTunnelInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnTunnelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.displayName = ""; - - /** - * VpnTunnelInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.uri = ""; - - /** - * VpnTunnelInfo sourceGateway. - * @member {string} sourceGateway - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGateway = ""; - - /** - * VpnTunnelInfo remoteGateway. - * @member {string} remoteGateway - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGateway = ""; - - /** - * VpnTunnelInfo remoteGatewayIp. - * @member {string} remoteGatewayIp - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGatewayIp = ""; - - /** - * VpnTunnelInfo sourceGatewayIp. - * @member {string} sourceGatewayIp - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGatewayIp = ""; - - /** - * VpnTunnelInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.networkUri = ""; - - /** - * VpnTunnelInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.region = ""; - - /** - * VpnTunnelInfo routingType. - * @member {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType} routingType - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.routingType = 0; - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo instance - */ - VpnTunnelInfo.create = function create(properties) { - return new VpnTunnelInfo(properties); - }; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); - if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); - if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); - if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); - return writer; - }; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.sourceGateway = reader.string(); - break; - } - case 4: { - message.remoteGateway = reader.string(); - break; - } - case 5: { - message.remoteGatewayIp = reader.string(); - break; - } - case 6: { - message.sourceGatewayIp = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.routingType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnTunnelInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnTunnelInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - if (!$util.isString(message.sourceGateway)) - return "sourceGateway: string expected"; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - if (!$util.isString(message.remoteGateway)) - return "remoteGateway: string expected"; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - if (!$util.isString(message.remoteGatewayIp)) - return "remoteGatewayIp: string expected"; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - if (!$util.isString(message.sourceGatewayIp)) - return "sourceGatewayIp: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.routingType != null && message.hasOwnProperty("routingType")) - switch (message.routingType) { - default: - return "routingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo - */ - VpnTunnelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.sourceGateway != null) - message.sourceGateway = String(object.sourceGateway); - if (object.remoteGateway != null) - message.remoteGateway = String(object.remoteGateway); - if (object.remoteGatewayIp != null) - message.remoteGatewayIp = String(object.remoteGatewayIp); - if (object.sourceGatewayIp != null) - message.sourceGatewayIp = String(object.sourceGatewayIp); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - switch (object.routingType) { - default: - if (typeof object.routingType === "number") { - message.routingType = object.routingType; - break; - } - break; - case "ROUTING_TYPE_UNSPECIFIED": - case 0: - message.routingType = 0; - break; - case "ROUTE_BASED": - case 1: - message.routingType = 1; - break; - case "POLICY_BASED": - case 2: - message.routingType = 2; - break; - case "DYNAMIC": - case 3: - message.routingType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} message VpnTunnelInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnTunnelInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.sourceGateway = ""; - object.remoteGateway = ""; - object.remoteGatewayIp = ""; - object.sourceGatewayIp = ""; - object.networkUri = ""; - object.region = ""; - object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - object.sourceGateway = message.sourceGateway; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - object.remoteGateway = message.remoteGateway; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - object.remoteGatewayIp = message.remoteGatewayIp; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - object.sourceGatewayIp = message.sourceGatewayIp; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.routingType != null && message.hasOwnProperty("routingType")) - object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; - return object; - }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - * @returns {Object.} JSON object - */ - VpnTunnelInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnTunnelInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnTunnelInfo"; - }; - - /** - * RoutingType enum. - * @name google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType - * @enum {number} - * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value - * @property {number} ROUTE_BASED=1 ROUTE_BASED value - * @property {number} POLICY_BASED=2 POLICY_BASED value - * @property {number} DYNAMIC=3 DYNAMIC value - */ - VpnTunnelInfo.RoutingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ROUTE_BASED"] = 1; - values[valuesById[2] = "POLICY_BASED"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - return values; - })(); - - return VpnTunnelInfo; - })(); - - v1beta1.EndpointInfo = (function() { - - /** - * Properties of an EndpointInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IEndpointInfo - * @property {string|null} [sourceIp] EndpointInfo sourceIp - * @property {string|null} [destinationIp] EndpointInfo destinationIp - * @property {string|null} [protocol] EndpointInfo protocol - * @property {number|null} [sourcePort] EndpointInfo sourcePort - * @property {number|null} [destinationPort] EndpointInfo destinationPort - * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri - * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri - * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri - */ - - /** - * Constructs a new EndpointInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an EndpointInfo. - * @implements IEndpointInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set - */ - function EndpointInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EndpointInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceIp = ""; - - /** - * EndpointInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationIp = ""; - - /** - * EndpointInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.protocol = ""; - - /** - * EndpointInfo sourcePort. - * @member {number} sourcePort - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourcePort = 0; - - /** - * EndpointInfo destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationPort = 0; - - /** - * EndpointInfo sourceNetworkUri. - * @member {string} sourceNetworkUri - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceNetworkUri = ""; - - /** - * EndpointInfo destinationNetworkUri. - * @member {string} destinationNetworkUri - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationNetworkUri = ""; - - /** - * EndpointInfo sourceAgentUri. - * @member {string} sourceAgentUri - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceAgentUri = ""; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo instance - */ - EndpointInfo.create = function create(properties) { - return new EndpointInfo(properties); - }; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); - if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); - if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); - if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); - return writer; - }; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.destinationIp = reader.string(); - break; - } - case 3: { - message.protocol = reader.string(); - break; - } - case 4: { - message.sourcePort = reader.int32(); - break; - } - case 5: { - message.destinationPort = reader.int32(); - break; - } - case 6: { - message.sourceNetworkUri = reader.string(); - break; - } - case 7: { - message.destinationNetworkUri = reader.string(); - break; - } - case 8: { - message.sourceAgentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EndpointInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EndpointInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isInteger(message.sourcePort)) - return "sourcePort: integer expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - if (!$util.isString(message.sourceNetworkUri)) - return "sourceNetworkUri: string expected"; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - if (!$util.isString(message.destinationNetworkUri)) - return "destinationNetworkUri: string expected"; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - if (!$util.isString(message.sourceAgentUri)) - return "sourceAgentUri: string expected"; - return null; - }; - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo - */ - EndpointInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.EndpointInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.sourcePort != null) - message.sourcePort = object.sourcePort | 0; - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - if (object.sourceNetworkUri != null) - message.sourceNetworkUri = String(object.sourceNetworkUri); - if (object.destinationNetworkUri != null) - message.destinationNetworkUri = String(object.destinationNetworkUri); - if (object.sourceAgentUri != null) - message.sourceAgentUri = String(object.sourceAgentUri); - return message; - }; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.EndpointInfo} message EndpointInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EndpointInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.destinationIp = ""; - object.protocol = ""; - object.sourcePort = 0; - object.destinationPort = 0; - object.sourceNetworkUri = ""; - object.destinationNetworkUri = ""; - object.sourceAgentUri = ""; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - object.sourceNetworkUri = message.sourceNetworkUri; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - object.destinationNetworkUri = message.destinationNetworkUri; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - object.sourceAgentUri = message.sourceAgentUri; - return object; - }; - - /** - * Converts this EndpointInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - * @returns {Object.} JSON object - */ - EndpointInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EndpointInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.EndpointInfo"; - }; - - return EndpointInfo; - })(); - - v1beta1.DeliverInfo = (function() { - - /** - * Properties of a DeliverInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDeliverInfo - * @property {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null} [target] DeliverInfo target - * @property {string|null} [resourceUri] DeliverInfo resourceUri - * @property {string|null} [ipAddress] DeliverInfo ipAddress - * @property {string|null} [storageBucket] DeliverInfo storageBucket - * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget - */ - - /** - * Constructs a new DeliverInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DeliverInfo. - * @implements IDeliverInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set - */ - function DeliverInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeliverInfo target. - * @member {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target} target - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.target = 0; - - /** - * DeliverInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.resourceUri = ""; - - /** - * DeliverInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.ipAddress = ""; - - /** - * DeliverInfo storageBucket. - * @member {string} storageBucket - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.storageBucket = ""; - - /** - * DeliverInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo instance - */ - DeliverInfo.create = function create(properties) { - return new DeliverInfo(properties); - }; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.storageBucket = reader.string(); - break; - } - case 5: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeliverInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeliverInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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: - case 15: - case 16: - case 17: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - if (!$util.isString(message.storageBucket)) - return "storageBucket: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo - */ - DeliverInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeliverInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "INSTANCE": - case 1: - message.target = 1; - break; - case "INTERNET": - case 2: - message.target = 2; - break; - case "GOOGLE_API": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "CLOUD_SQL_INSTANCE": - case 5: - message.target = 5; - break; - case "PSC_PUBLISHED_SERVICE": - case 6: - message.target = 6; - break; - case "PSC_GOOGLE_API": - case 7: - message.target = 7; - break; - case "PSC_VPC_SC": - case 8: - message.target = 8; - break; - case "SERVERLESS_NEG": - case 9: - message.target = 9; - break; - case "STORAGE_BUCKET": - case 10: - message.target = 10; - break; - case "PRIVATE_NETWORK": - case 11: - message.target = 11; - break; - case "CLOUD_FUNCTION": - case 12: - message.target = 12; - break; - case "APP_ENGINE_VERSION": - case 13: - message.target = 13; - break; - case "CLOUD_RUN_REVISION": - case 14: - message.target = 14; - break; - case "GOOGLE_MANAGED_SERVICE": - case 15: - message.target = 15; - break; - case "REDIS_INSTANCE": - case 16: - message.target = 16; - break; - case "REDIS_CLUSTER": - case 17: - message.target = 17; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.storageBucket != null) - message.storageBucket = String(object.storageBucket); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.DeliverInfo} message DeliverInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeliverInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - object.storageBucket = ""; - object.pscGoogleApiTarget = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - object.storageBucket = message.storageBucket; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this DeliverInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - * @returns {Object.} JSON object - */ - DeliverInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeliverInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeliverInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1beta1.DeliverInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} INTERNET=2 INTERNET value - * @property {number} GOOGLE_API=3 GOOGLE_API value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value - * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value - * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value - * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value - * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value - * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value - * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value - * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value - * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value - * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value - * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value - * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value - * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value - */ - DeliverInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "INTERNET"] = 2; - values[valuesById[3] = "GOOGLE_API"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; - values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; - values[valuesById[7] = "PSC_GOOGLE_API"] = 7; - values[valuesById[8] = "PSC_VPC_SC"] = 8; - values[valuesById[9] = "SERVERLESS_NEG"] = 9; - values[valuesById[10] = "STORAGE_BUCKET"] = 10; - values[valuesById[11] = "PRIVATE_NETWORK"] = 11; - values[valuesById[12] = "CLOUD_FUNCTION"] = 12; - values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; - values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; - values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; - values[valuesById[16] = "REDIS_INSTANCE"] = 16; - values[valuesById[17] = "REDIS_CLUSTER"] = 17; - return values; - })(); - - return DeliverInfo; - })(); - - v1beta1.ForwardInfo = (function() { - - /** - * Properties of a ForwardInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IForwardInfo - * @property {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null} [target] ForwardInfo target - * @property {string|null} [resourceUri] ForwardInfo resourceUri - * @property {string|null} [ipAddress] ForwardInfo ipAddress - */ - - /** - * Constructs a new ForwardInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ForwardInfo. - * @implements IForwardInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set - */ - function ForwardInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardInfo target. - * @member {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target} target - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.target = 0; - - /** - * ForwardInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.resourceUri = ""; - - /** - * ForwardInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.ipAddress = ""; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo instance - */ - ForwardInfo.create = function create(properties) { - return new ForwardInfo(properties); - }; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - return null; - }; - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo - */ - ForwardInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "PEERING_VPC": - case 1: - message.target = 1; - break; - case "VPN_GATEWAY": - case 2: - message.target = 2; - break; - case "INTERCONNECT": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": - case 5: - message.target = 5; - break; - case "CLOUD_SQL_INSTANCE": - case 6: - message.target = 6; - break; - case "ANOTHER_PROJECT": - case 7: - message.target = 7; - break; - case "NCC_HUB": - case 8: - message.target = 8; - break; - case "ROUTER_APPLIANCE": - case 9: - message.target = 9; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - return message; - }; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ForwardInfo} message ForwardInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this ForwardInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1beta1.ForwardInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} PEERING_VPC=1 PEERING_VPC value - * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value - * @property {number} INTERCONNECT=3 INTERCONNECT value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value - * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value - * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value - * @property {number} NCC_HUB=8 NCC_HUB value - * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value - */ - ForwardInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "PEERING_VPC"] = 1; - values[valuesById[2] = "VPN_GATEWAY"] = 2; - values[valuesById[3] = "INTERCONNECT"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; - values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; - values[valuesById[7] = "ANOTHER_PROJECT"] = 7; - values[valuesById[8] = "NCC_HUB"] = 8; - values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; - return values; - })(); - - return ForwardInfo; - })(); - - v1beta1.AbortInfo = (function() { - - /** - * Properties of an AbortInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IAbortInfo - * @property {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null} [cause] AbortInfo cause - * @property {string|null} [resourceUri] AbortInfo resourceUri - * @property {string|null} [ipAddress] AbortInfo ipAddress - * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission - */ - - /** - * Constructs a new AbortInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an AbortInfo. - * @implements IAbortInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set - */ - function AbortInfo(properties) { - this.projectsMissingPermission = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AbortInfo cause. - * @member {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.cause = 0; - - /** - * AbortInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.resourceUri = ""; - - /** - * AbortInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.ipAddress = ""; - - /** - * AbortInfo projectsMissingPermission. - * @member {Array.} projectsMissingPermission - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo instance - */ - AbortInfo.create = function create(properties) { - return new AbortInfo(properties); - }; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 3: { - if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) - message.projectsMissingPermission = []; - message.projectsMissingPermission.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AbortInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AbortInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 3: - case 7: - case 8: - case 11: - case 12: - case 13: - case 14: - case 2: - case 32: - case 23: - case 4: - case 28: - case 29: - case 36: - case 5: - case 6: - case 9: - case 10: - case 15: - case 16: - case 17: - case 18: - case 24: - case 25: - case 26: - case 27: - case 19: - case 20: - case 34: - case 35: - case 21: - case 22: - case 30: - case 31: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { - if (!Array.isArray(message.projectsMissingPermission)) - return "projectsMissingPermission: array expected"; - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - if (!$util.isString(message.projectsMissingPermission[i])) - return "projectsMissingPermission: string[] expected"; - } - return null; - }; - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo - */ - AbortInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AbortInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_NETWORK": - case 1: - message.cause = 1; - break; - case "UNKNOWN_PROJECT": - case 3: - message.cause = 3; - break; - case "NO_EXTERNAL_IP": - case 7: - message.cause = 7; - break; - case "UNINTENDED_DESTINATION": - case 8: - message.cause = 8; - break; - case "SOURCE_ENDPOINT_NOT_FOUND": - case 11: - message.cause = 11; - break; - case "MISMATCHED_SOURCE_NETWORK": - case 12: - message.cause = 12; - break; - case "DESTINATION_ENDPOINT_NOT_FOUND": - case 13: - message.cause = 13; - break; - case "MISMATCHED_DESTINATION_NETWORK": - case 14: - message.cause = 14; - break; - case "UNKNOWN_IP": - case 2: - message.cause = 2; - break; - case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": - case 32: - message.cause = 32; - break; - case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": - case 23: - message.cause = 23; - break; - case "PERMISSION_DENIED": - case 4: - message.cause = 4; - break; - case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": - case 28: - message.cause = 28; - break; - case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": - case 29: - message.cause = 29; - break; - case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": - case 36: - message.cause = 36; - break; - case "NO_SOURCE_LOCATION": - case 5: - message.cause = 5; - break; - case "INVALID_ARGUMENT": - case 6: - message.cause = 6; - break; - case "TRACE_TOO_LONG": - case 9: - message.cause = 9; - break; - case "INTERNAL_ERROR": - case 10: - message.cause = 10; - break; - case "UNSUPPORTED": - case 15: - message.cause = 15; - break; - case "MISMATCHED_IP_VERSION": - case 16: - message.cause = 16; - break; - case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": - case 17: - message.cause = 17; - break; - case "RESOURCE_CONFIG_NOT_FOUND": - case 18: - message.cause = 18; - break; - case "VM_INSTANCE_CONFIG_NOT_FOUND": - case 24: - message.cause = 24; - break; - case "NETWORK_CONFIG_NOT_FOUND": - case 25: - message.cause = 25; - break; - case "FIREWALL_CONFIG_NOT_FOUND": - case 26: - message.cause = 26; - break; - case "ROUTE_CONFIG_NOT_FOUND": - case 27: - message.cause = 27; - break; - case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": - case 19: - message.cause = 19; - break; - case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": - case 20: - message.cause = 20; - break; - case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": - case 34: - message.cause = 34; - break; - case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": - case 35: - message.cause = 35; - break; - case "SOURCE_FORWARDING_RULE_UNSUPPORTED": - case 21: - message.cause = 21; - break; - case "NON_ROUTABLE_IP_ADDRESS": - case 22: - message.cause = 22; - break; - case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": - case 30: - message.cause = 30; - break; - case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": - case 31: - message.cause = 31; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.projectsMissingPermission) { - if (!Array.isArray(object.projectsMissingPermission)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.AbortInfo.projectsMissingPermission: array expected"); - message.projectsMissingPermission = []; - for (var i = 0; i < object.projectsMissingPermission.length; ++i) - message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); - } - return message; - }; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.AbortInfo} message AbortInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AbortInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.projectsMissingPermission = []; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.projectsMissingPermission && message.projectsMissingPermission.length) { - object.projectsMissingPermission = []; - for (var j = 0; j < message.projectsMissingPermission.length; ++j) - object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this AbortInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - * @returns {Object.} JSON object - */ - AbortInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AbortInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AbortInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1beta1.AbortInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value - * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value - * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value - * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value - * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value - * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value - * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value - * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value - * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value - * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value - * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value - * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value - * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value - * @property {number} UNSUPPORTED=15 UNSUPPORTED value - * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value - * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value - * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value - * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value - * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value - * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value - * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value - * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value - * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value - * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value - * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value - * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value - * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value - * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value - * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value - */ - AbortInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; - values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; - values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; - values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; - values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; - values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; - values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; - values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; - values[valuesById[2] = "UNKNOWN_IP"] = 2; - values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; - values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; - values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; - values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; - values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; - values[valuesById[6] = "INVALID_ARGUMENT"] = 6; - values[valuesById[9] = "TRACE_TOO_LONG"] = 9; - values[valuesById[10] = "INTERNAL_ERROR"] = 10; - values[valuesById[15] = "UNSUPPORTED"] = 15; - values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; - values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; - values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; - values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; - values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; - values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; - values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; - values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; - values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; - values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; - values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; - values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; - values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; - values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; - values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; - return values; - })(); - - return AbortInfo; - })(); - - v1beta1.DropInfo = (function() { - - /** - * Properties of a DropInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDropInfo - * @property {google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null} [cause] DropInfo cause - * @property {string|null} [resourceUri] DropInfo resourceUri - * @property {string|null} [sourceIp] DropInfo sourceIp - * @property {string|null} [destinationIp] DropInfo destinationIp - * @property {string|null} [region] DropInfo region - */ - - /** - * Constructs a new DropInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DropInfo. - * @implements IDropInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set - */ - function DropInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DropInfo cause. - * @member {google.cloud.networkmanagement.v1beta1.DropInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.cause = 0; - - /** - * DropInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.resourceUri = ""; - - /** - * DropInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.sourceIp = ""; - - /** - * DropInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.destinationIp = ""; - - /** - * DropInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.region = ""; - - /** - * Creates a new DropInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo instance - */ - DropInfo.create = function create(properties) { - return new DropInfo(properties); - }; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); - return writer; - }; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.sourceIp = reader.string(); - break; - } - case 4: { - message.destinationIp = reader.string(); - break; - } - case 5: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DropInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DropInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 42: - case 43: - case 49: - case 50: - case 51: - case 52: - case 53: - case 44: - case 45: - case 46: - case 7: - case 8: - case 47: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 27: - case 28: - case 68: - case 69: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 38: - case 36: - case 21: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 63: - case 22: - case 23: - case 24: - case 60: - case 61: - case 25: - case 26: - case 41: - case 48: - case 54: - case 58: - case 57: - case 64: - case 55: - case 56: - case 29: - case 37: - case 39: - case 40: - case 59: - case 62: - case 65: - case 66: - case 67: - case 70: - case 71: - case 72: - case 73: - case 74: - case 78: - case 75: - case 76: - case 77: - case 79: - case 80: - case 81: - case 82: - case 83: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo - */ - DropInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DropInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_EXTERNAL_ADDRESS": - case 1: - message.cause = 1; - break; - case "FOREIGN_IP_DISALLOWED": - case 2: - message.cause = 2; - break; - case "FIREWALL_RULE": - case 3: - message.cause = 3; - break; - case "NO_ROUTE": - case 4: - message.cause = 4; - break; - case "ROUTE_BLACKHOLE": - case 5: - message.cause = 5; - break; - case "ROUTE_WRONG_NETWORK": - case 6: - message.cause = 6; - break; - case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": - case 42: - message.cause = 42; - break; - case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": - case 43: - message.cause = 43; - break; - case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": - case 49: - message.cause = 49; - break; - case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": - case 50: - message.cause = 50; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": - case 51: - message.cause = 51; - break; - case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": - case 52: - message.cause = 52; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": - case 53: - message.cause = 53; - break; - case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": - case 44: - message.cause = 44; - break; - case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": - case 45: - message.cause = 45; - break; - case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": - case 46: - message.cause = 46; - break; - case "PRIVATE_TRAFFIC_TO_INTERNET": - case 7: - message.cause = 7; - break; - case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": - case 8: - message.cause = 8; - break; - case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": - case 47: - message.cause = 47; - break; - case "NO_EXTERNAL_ADDRESS": - case 9: - message.cause = 9; - break; - case "UNKNOWN_INTERNAL_ADDRESS": - case 10: - message.cause = 10; - break; - case "FORWARDING_RULE_MISMATCH": - case 11: - message.cause = 11; - break; - case "FORWARDING_RULE_NO_INSTANCES": - case 12: - message.cause = 12; - break; - case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": - case 13: - message.cause = 13; - break; - case "INSTANCE_NOT_RUNNING": - case 14: - message.cause = 14; - break; - case "GKE_CLUSTER_NOT_RUNNING": - case 27: - message.cause = 27; - break; - case "CLOUD_SQL_INSTANCE_NOT_RUNNING": - case 28: - message.cause = 28; - break; - case "REDIS_INSTANCE_NOT_RUNNING": - case 68: - message.cause = 68; - break; - case "REDIS_CLUSTER_NOT_RUNNING": - case 69: - message.cause = 69; - break; - case "TRAFFIC_TYPE_BLOCKED": - case 15: - message.cause = 15; - break; - case "GKE_MASTER_UNAUTHORIZED_ACCESS": - case 16: - message.cause = 16; - break; - case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": - case 17: - message.cause = 17; - break; - case "DROPPED_INSIDE_GKE_SERVICE": - case 18: - message.cause = 18; - break; - case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": - case 19: - message.cause = 19; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PEERING": - case 20: - message.cause = 20; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": - case 38: - message.cause = 38; - break; - case "GKE_PSC_ENDPOINT_MISSING": - case 36: - message.cause = 36; - break; - case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": - case 21: - message.cause = 21; - break; - case "GKE_CONTROL_PLANE_REGION_MISMATCH": - case 30: - message.cause = 30; - break; - case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": - case 31: - message.cause = 31; - break; - case "GKE_CONTROL_PLANE_NO_ROUTE": - case 32: - message.cause = 32; - break; - case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": - case 33: - message.cause = 33; - break; - case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": - case 34: - message.cause = 34; - break; - case "CLOUD_SQL_INSTANCE_NO_ROUTE": - case 35: - message.cause = 35; - break; - case "CLOUD_SQL_CONNECTOR_REQUIRED": - case 63: - message.cause = 63; - break; - case "CLOUD_FUNCTION_NOT_ACTIVE": - case 22: - message.cause = 22; - break; - case "VPC_CONNECTOR_NOT_SET": - case 23: - message.cause = 23; - break; - case "VPC_CONNECTOR_NOT_RUNNING": - case 24: - message.cause = 24; - break; - case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": - case 60: - message.cause = 60; - break; - case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": - case 61: - message.cause = 61; - break; - case "FORWARDING_RULE_REGION_MISMATCH": - case 25: - message.cause = 25; - break; - case "PSC_CONNECTION_NOT_ACCEPTED": - case 26: - message.cause = 26; - break; - case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": - case 41: - message.cause = 41; - break; - case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": - case 48: - message.cause = 48; - break; - case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": - case 54: - message.cause = 54; - break; - case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": - case 58: - message.cause = 58; - break; - case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": - case 57: - message.cause = 57; - break; - case "PSC_TRANSITIVITY_NOT_PROPAGATED": - case 64: - message.cause = 64; - break; - case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": - case 55: - message.cause = 55; - break; - case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": - case 56: - message.cause = 56; - break; - case "CLOUD_RUN_REVISION_NOT_READY": - case 29: - message.cause = 29; - break; - case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": - case 37: - message.cause = 37; - break; - case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": - case 39: - message.cause = 39; - break; - case "CLOUD_NAT_NO_ADDRESSES": - case 40: - message.cause = 40; - break; - case "ROUTING_LOOP": - case 59: - message.cause = 59; - break; - case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": - case 62: - message.cause = 62; - break; - case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": - case 65: - message.cause = 65; - break; - case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": - case 66: - message.cause = 66; - break; - case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": - case 67: - message.cause = 67; - break; - case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": - case 70: - message.cause = 70; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PORT": - case 71: - message.cause = 71; - break; - case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": - case 72: - message.cause = 72; - break; - case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": - case 73: - message.cause = 73; - break; - case "REDIS_INSTANCE_NO_EXTERNAL_IP": - case 74: - message.cause = 74; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": - case 78: - message.cause = 78; - break; - case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": - case 75: - message.cause = 75; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PORT": - case 76: - message.cause = 76; - break; - case "REDIS_CLUSTER_NO_EXTERNAL_IP": - case 77: - message.cause = 77; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": - case 79: - message.cause = 79; - break; - case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": - case 80: - message.cause = 80; - break; - case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": - case 81: - message.cause = 81; - break; - case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": - case 82: - message.cause = 82; - break; - case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": - case 83: - message.cause = 83; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.DropInfo} message DropInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DropInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.sourceIp = ""; - object.destinationIp = ""; - object.region = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this DropInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - * @returns {Object.} JSON object - */ - DropInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DropInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DropInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1beta1.DropInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value - * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value - * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value - * @property {number} NO_ROUTE=4 NO_ROUTE value - * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value - * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value - * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value - * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value - * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value - * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value - * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value - * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value - * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value - * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value - * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value - * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value - * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value - * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value - * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value - * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value - * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value - * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value - * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value - * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value - * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value - * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value - * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value - * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value - * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value - * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value - * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value - * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value - * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value - * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value - * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value - * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value - * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value - * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value - * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value - * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value - * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value - * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value - * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value - * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value - * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value - * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value - * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value - * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value - * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value - * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value - * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value - * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value - * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value - * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value - * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value - * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value - * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value - * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value - * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value - * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value - * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value - * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value - * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value - * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value - * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value - * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value - * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value - * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value - * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value - * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value - */ - DropInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; - values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; - values[valuesById[3] = "FIREWALL_RULE"] = 3; - values[valuesById[4] = "NO_ROUTE"] = 4; - values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; - values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; - values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; - values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; - values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; - values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; - values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; - values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; - values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; - values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; - values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; - values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; - values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; - values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; - values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; - values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; - values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; - values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; - values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; - values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; - values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; - values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; - values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; - values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; - values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; - values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; - values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; - values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; - values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; - values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; - values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; - values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; - values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; - values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; - values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; - values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; - values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; - values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; - values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; - values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; - values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; - values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; - values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; - values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; - values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; - values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; - values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; - values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; - values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; - values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; - values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; - values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; - values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; - values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; - values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; - values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; - values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; - values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; - values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; - values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; - values[valuesById[59] = "ROUTING_LOOP"] = 59; - values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; - values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; - values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; - values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; - values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; - values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; - values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; - values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; - values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; - values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; - values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; - values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; - values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; - values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; - values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; - values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; - values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; - values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; - return values; - })(); - - return DropInfo; - })(); - - v1beta1.GKEMasterInfo = (function() { - - /** - * Properties of a GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGKEMasterInfo - * @property {string|null} [clusterUri] GKEMasterInfo clusterUri - * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri - * @property {string|null} [internalIp] GKEMasterInfo internalIp - * @property {string|null} [externalIp] GKEMasterInfo externalIp - * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint - */ - - /** - * Constructs a new GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GKEMasterInfo. - * @implements IGKEMasterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set - */ - function GKEMasterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GKEMasterInfo clusterUri. - * @member {string} clusterUri - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterUri = ""; - - /** - * GKEMasterInfo clusterNetworkUri. - * @member {string} clusterNetworkUri - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterNetworkUri = ""; - - /** - * GKEMasterInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.internalIp = ""; - - /** - * GKEMasterInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.externalIp = ""; - - /** - * GKEMasterInfo dnsEndpoint. - * @member {string} dnsEndpoint - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.dnsEndpoint = ""; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo instance - */ - GKEMasterInfo.create = function create(properties) { - return new GKEMasterInfo(properties); - }; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); - if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); - return writer; - }; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.clusterUri = reader.string(); - break; - } - case 4: { - message.clusterNetworkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.dnsEndpoint = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GKEMasterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GKEMasterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - if (!$util.isString(message.clusterUri)) - return "clusterUri: string expected"; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - if (!$util.isString(message.clusterNetworkUri)) - return "clusterNetworkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) - if (!$util.isString(message.dnsEndpoint)) - return "dnsEndpoint: string expected"; - return null; - }; - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo - */ - GKEMasterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); - if (object.clusterUri != null) - message.clusterUri = String(object.clusterUri); - if (object.clusterNetworkUri != null) - message.clusterNetworkUri = String(object.clusterNetworkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.dnsEndpoint != null) - message.dnsEndpoint = String(object.dnsEndpoint); - return message; - }; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} message GKEMasterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GKEMasterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterUri = ""; - object.clusterNetworkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.dnsEndpoint = ""; - } - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - object.clusterUri = message.clusterUri; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - object.clusterNetworkUri = message.clusterNetworkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) - object.dnsEndpoint = message.dnsEndpoint; - return object; - }; - - /** - * Converts this GKEMasterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - * @returns {Object.} JSON object - */ - GKEMasterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GKEMasterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GKEMasterInfo"; - }; - - return GKEMasterInfo; - })(); - - v1beta1.CloudSQLInstanceInfo = (function() { - - /** - * Properties of a CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICloudSQLInstanceInfo - * @property {string|null} [displayName] CloudSQLInstanceInfo displayName - * @property {string|null} [uri] CloudSQLInstanceInfo uri - * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri - * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp - * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp - * @property {string|null} [region] CloudSQLInstanceInfo region - */ - - /** - * Constructs a new CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CloudSQLInstanceInfo. - * @implements ICloudSQLInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set - */ - function CloudSQLInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudSQLInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.displayName = ""; - - /** - * CloudSQLInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.uri = ""; - - /** - * CloudSQLInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.networkUri = ""; - - /** - * CloudSQLInstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.internalIp = ""; - - /** - * CloudSQLInstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.externalIp = ""; - - /** - * CloudSQLInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.region = ""; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance - */ - CloudSQLInstanceInfo.create = function create(properties) { - return new CloudSQLInstanceInfo(properties); - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); - return writer; - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudSQLInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - */ - CloudSQLInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudSQLInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo"; - }; - - return CloudSQLInstanceInfo; - })(); - - v1beta1.RedisInstanceInfo = (function() { - - /** - * Properties of a RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRedisInstanceInfo - * @property {string|null} [displayName] RedisInstanceInfo displayName - * @property {string|null} [uri] RedisInstanceInfo uri - * @property {string|null} [networkUri] RedisInstanceInfo networkUri - * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp - * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp - * @property {string|null} [region] RedisInstanceInfo region - */ - - /** - * Constructs a new RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RedisInstanceInfo. - * @implements IRedisInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set - */ - function RedisInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.displayName = ""; - - /** - * RedisInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.uri = ""; - - /** - * RedisInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.networkUri = ""; - - /** - * RedisInstanceInfo primaryEndpointIp. - * @member {string} primaryEndpointIp - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.primaryEndpointIp = ""; - - /** - * RedisInstanceInfo readEndpointIp. - * @member {string} readEndpointIp - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.readEndpointIp = ""; - - /** - * RedisInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.region = ""; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo instance - */ - RedisInstanceInfo.create = function create(properties) { - return new RedisInstanceInfo(properties); - }; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); - if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.primaryEndpointIp = reader.string(); - break; - } - case 5: { - message.readEndpointIp = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - if (!$util.isString(message.primaryEndpointIp)) - return "primaryEndpointIp: string expected"; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - if (!$util.isString(message.readEndpointIp)) - return "readEndpointIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo - */ - RedisInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.primaryEndpointIp != null) - message.primaryEndpointIp = String(object.primaryEndpointIp); - if (object.readEndpointIp != null) - message.readEndpointIp = String(object.readEndpointIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} message RedisInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.primaryEndpointIp = ""; - object.readEndpointIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - object.primaryEndpointIp = message.primaryEndpointIp; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - object.readEndpointIp = message.readEndpointIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - RedisInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisInstanceInfo"; - }; - - return RedisInstanceInfo; - })(); - - v1beta1.RedisClusterInfo = (function() { - - /** - * Properties of a RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRedisClusterInfo - * @property {string|null} [displayName] RedisClusterInfo displayName - * @property {string|null} [uri] RedisClusterInfo uri - * @property {string|null} [networkUri] RedisClusterInfo networkUri - * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress - * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress - * @property {string|null} [location] RedisClusterInfo location - */ - - /** - * Constructs a new RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RedisClusterInfo. - * @implements IRedisClusterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set - */ - function RedisClusterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisClusterInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.displayName = ""; - - /** - * RedisClusterInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.uri = ""; - - /** - * RedisClusterInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.networkUri = ""; - - /** - * RedisClusterInfo discoveryEndpointIpAddress. - * @member {string} discoveryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; - - /** - * RedisClusterInfo secondaryEndpointIpAddress. - * @member {string} secondaryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; - - /** - * RedisClusterInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.location = ""; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo instance - */ - RedisClusterInfo.create = function create(properties) { - return new RedisClusterInfo(properties); - }; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); - if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); - return writer; - }; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.discoveryEndpointIpAddress = reader.string(); - break; - } - case 5: { - message.secondaryEndpointIpAddress = reader.string(); - break; - } - case 6: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisClusterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisClusterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - if (!$util.isString(message.discoveryEndpointIpAddress)) - return "discoveryEndpointIpAddress: string expected"; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - if (!$util.isString(message.secondaryEndpointIpAddress)) - return "secondaryEndpointIpAddress: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo - */ - RedisClusterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.discoveryEndpointIpAddress != null) - message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); - if (object.secondaryEndpointIpAddress != null) - message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} message RedisClusterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisClusterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.discoveryEndpointIpAddress = ""; - object.secondaryEndpointIpAddress = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this RedisClusterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - * @returns {Object.} JSON object - */ - RedisClusterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisClusterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisClusterInfo"; - }; - - return RedisClusterInfo; - })(); - - v1beta1.CloudFunctionInfo = (function() { - - /** - * Properties of a CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICloudFunctionInfo - * @property {string|null} [displayName] CloudFunctionInfo displayName - * @property {string|null} [uri] CloudFunctionInfo uri - * @property {string|null} [location] CloudFunctionInfo location - * @property {number|Long|null} [versionId] CloudFunctionInfo versionId - */ - - /** - * Constructs a new CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CloudFunctionInfo. - * @implements ICloudFunctionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set - */ - function CloudFunctionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.displayName = ""; - - /** - * CloudFunctionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.uri = ""; - - /** - * CloudFunctionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.location = ""; - - /** - * CloudFunctionInfo versionId. - * @member {number|Long} versionId - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo instance - */ - CloudFunctionInfo.create = function create(properties) { - return new CloudFunctionInfo(properties); - }; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); - return writer; - }; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - case 4: { - message.versionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) - return "versionId: integer|Long expected"; - return null; - }; - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo - */ - CloudFunctionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.versionId != null) - if ($util.Long) - (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; - else if (typeof object.versionId === "string") - message.versionId = parseInt(object.versionId, 10); - else if (typeof object.versionId === "number") - message.versionId = object.versionId; - else if (typeof object.versionId === "object") - message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} message CloudFunctionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionId = options.longs === String ? "0" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (typeof message.versionId === "number") - object.versionId = options.longs === String ? String(message.versionId) : message.versionId; - else - object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; - return object; - }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudFunctionInfo"; - }; - - return CloudFunctionInfo; - })(); - - v1beta1.CloudRunRevisionInfo = (function() { - - /** - * Properties of a CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICloudRunRevisionInfo - * @property {string|null} [displayName] CloudRunRevisionInfo displayName - * @property {string|null} [uri] CloudRunRevisionInfo uri - * @property {string|null} [location] CloudRunRevisionInfo location - * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri - */ - - /** - * Constructs a new CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CloudRunRevisionInfo. - * @implements ICloudRunRevisionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set - */ - function CloudRunRevisionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.displayName = ""; - - /** - * CloudRunRevisionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.uri = ""; - - /** - * CloudRunRevisionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.location = ""; - - /** - * CloudRunRevisionInfo serviceUri. - * @member {string} serviceUri - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.serviceUri = ""; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo instance - */ - CloudRunRevisionInfo.create = function create(properties) { - return new CloudRunRevisionInfo(properties); - }; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - case 5: { - message.serviceUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - if (!$util.isString(message.serviceUri)) - return "serviceUri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo - */ - CloudRunRevisionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.serviceUri != null) - message.serviceUri = String(object.serviceUri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} message CloudRunRevisionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - object.serviceUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - object.serviceUri = message.serviceUri; - return object; - }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo"; - }; - - return CloudRunRevisionInfo; - })(); - - v1beta1.AppEngineVersionInfo = (function() { - - /** - * Properties of an AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IAppEngineVersionInfo - * @property {string|null} [displayName] AppEngineVersionInfo displayName - * @property {string|null} [uri] AppEngineVersionInfo uri - * @property {string|null} [runtime] AppEngineVersionInfo runtime - * @property {string|null} [environment] AppEngineVersionInfo environment - */ - - /** - * Constructs a new AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an AppEngineVersionInfo. - * @implements IAppEngineVersionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set - */ - function AppEngineVersionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.displayName = ""; - - /** - * AppEngineVersionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.uri = ""; - - /** - * AppEngineVersionInfo runtime. - * @member {string} runtime - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.runtime = ""; - - /** - * AppEngineVersionInfo environment. - * @member {string} environment - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.environment = ""; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo instance - */ - AppEngineVersionInfo.create = function create(properties) { - return new AppEngineVersionInfo(properties); - }; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.runtime = reader.string(); - break; - } - case 4: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.runtime != null && message.hasOwnProperty("runtime")) - if (!$util.isString(message.runtime)) - return "runtime: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo - */ - AppEngineVersionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.runtime != null) - message.runtime = String(object.runtime); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} message AppEngineVersionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.runtime = ""; - object.environment = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.runtime != null && message.hasOwnProperty("runtime")) - object.runtime = message.runtime; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo"; - }; - - return AppEngineVersionInfo; - })(); - - v1beta1.VpcConnectorInfo = (function() { - - /** - * Properties of a VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpcConnectorInfo - * @property {string|null} [displayName] VpcConnectorInfo displayName - * @property {string|null} [uri] VpcConnectorInfo uri - * @property {string|null} [location] VpcConnectorInfo location - */ - - /** - * Constructs a new VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpcConnectorInfo. - * @implements IVpcConnectorInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set - */ - function VpcConnectorInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpcConnectorInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.displayName = ""; - - /** - * VpcConnectorInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.uri = ""; - - /** - * VpcConnectorInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.location = ""; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo instance - */ - VpcConnectorInfo.create = function create(properties) { - return new VpcConnectorInfo(properties); - }; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - return writer; - }; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcConnectorInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcConnectorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo - */ - VpcConnectorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} message VpcConnectorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcConnectorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - * @returns {Object.} JSON object - */ - VpcConnectorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcConnectorInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcConnectorInfo"; - }; - - return VpcConnectorInfo; - })(); - - v1beta1.NatInfo = (function() { - - /** - * Properties of a NatInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface INatInfo - * @property {google.cloud.networkmanagement.v1beta1.NatInfo.Type|null} [type] NatInfo type - * @property {string|null} [protocol] NatInfo protocol - * @property {string|null} [networkUri] NatInfo networkUri - * @property {string|null} [oldSourceIp] NatInfo oldSourceIp - * @property {string|null} [newSourceIp] NatInfo newSourceIp - * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp - * @property {string|null} [newDestinationIp] NatInfo newDestinationIp - * @property {number|null} [oldSourcePort] NatInfo oldSourcePort - * @property {number|null} [newSourcePort] NatInfo newSourcePort - * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort - * @property {number|null} [newDestinationPort] NatInfo newDestinationPort - * @property {string|null} [routerUri] NatInfo routerUri - * @property {string|null} [natGatewayName] NatInfo natGatewayName - */ - - /** - * Constructs a new NatInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a NatInfo. - * @implements INatInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set - */ - function NatInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NatInfo type. - * @member {google.cloud.networkmanagement.v1beta1.NatInfo.Type} type - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.type = 0; - - /** - * NatInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.protocol = ""; - - /** - * NatInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.networkUri = ""; - - /** - * NatInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourceIp = ""; - - /** - * NatInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newSourceIp = ""; - - /** - * NatInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationIp = ""; - - /** - * NatInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationIp = ""; - - /** - * NatInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourcePort = 0; - - /** - * NatInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newSourcePort = 0; - - /** - * NatInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationPort = 0; - - /** - * NatInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationPort = 0; - - /** - * NatInfo routerUri. - * @member {string} routerUri - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.routerUri = ""; - - /** - * NatInfo natGatewayName. - * @member {string} natGatewayName - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.natGatewayName = ""; - - /** - * Creates a new NatInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo instance - */ - NatInfo.create = function create(properties) { - return new NatInfo(properties); - }; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); - if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); - if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); - return writer; - }; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.protocol = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.oldSourceIp = reader.string(); - break; - } - case 5: { - message.newSourceIp = reader.string(); - break; - } - case 6: { - message.oldDestinationIp = reader.string(); - break; - } - case 7: { - message.newDestinationIp = reader.string(); - break; - } - case 8: { - message.oldSourcePort = reader.int32(); - break; - } - case 9: { - message.newSourcePort = reader.int32(); - break; - } - case 10: { - message.oldDestinationPort = reader.int32(); - break; - } - case 11: { - message.newDestinationPort = reader.int32(); - break; - } - case 12: { - message.routerUri = reader.string(); - break; - } - case 13: { - message.natGatewayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NatInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NatInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - if (!$util.isString(message.routerUri)) - return "routerUri: string expected"; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - if (!$util.isString(message.natGatewayName)) - return "natGatewayName: string expected"; - return null; - }; - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo - */ - NatInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NatInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INTERNAL_TO_EXTERNAL": - case 1: - message.type = 1; - break; - case "EXTERNAL_TO_INTERNAL": - case 2: - message.type = 2; - break; - case "CLOUD_NAT": - case 3: - message.type = 3; - break; - case "PRIVATE_SERVICE_CONNECT": - case 4: - message.type = 4; - break; - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.routerUri != null) - message.routerUri = String(object.routerUri); - if (object.natGatewayName != null) - message.natGatewayName = String(object.natGatewayName); - return message; - }; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.NatInfo} message NatInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NatInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.protocol = ""; - object.networkUri = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.routerUri = ""; - object.natGatewayName = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] : message.type; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - object.routerUri = message.routerUri; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - object.natGatewayName = message.natGatewayName; - return object; - }; - - /** - * Converts this NatInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - * @returns {Object.} JSON object - */ - NatInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NatInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NatInfo"; - }; - - /** - * Type enum. - * @name google.cloud.networkmanagement.v1beta1.NatInfo.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value - * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value - * @property {number} CLOUD_NAT=3 CLOUD_NAT value - * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value - */ - NatInfo.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; - values[valuesById[3] = "CLOUD_NAT"] = 3; - values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; - return values; - })(); - - return NatInfo; - })(); - - v1beta1.ProxyConnectionInfo = (function() { - - /** - * Properties of a ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IProxyConnectionInfo - * @property {string|null} [protocol] ProxyConnectionInfo protocol - * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp - * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp - * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp - * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp - * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort - * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort - * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort - * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort - * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri - * @property {string|null} [networkUri] ProxyConnectionInfo networkUri - */ - - /** - * Constructs a new ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ProxyConnectionInfo. - * @implements IProxyConnectionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set - */ - function ProxyConnectionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProxyConnectionInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.protocol = ""; - - /** - * ProxyConnectionInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourceIp = ""; - - /** - * ProxyConnectionInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourceIp = ""; - - /** - * ProxyConnectionInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationIp = ""; - - /** - * ProxyConnectionInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationIp = ""; - - /** - * ProxyConnectionInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourcePort = 0; - - /** - * ProxyConnectionInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourcePort = 0; - - /** - * ProxyConnectionInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationPort = 0; - - /** - * ProxyConnectionInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationPort = 0; - - /** - * ProxyConnectionInfo subnetUri. - * @member {string} subnetUri - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.subnetUri = ""; - - /** - * ProxyConnectionInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.networkUri = ""; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo instance - */ - ProxyConnectionInfo.create = function create(properties) { - return new ProxyConnectionInfo(properties); - }; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); - if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); - return writer; - }; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.protocol = reader.string(); - break; - } - case 2: { - message.oldSourceIp = reader.string(); - break; - } - case 3: { - message.newSourceIp = reader.string(); - break; - } - case 4: { - message.oldDestinationIp = reader.string(); - break; - } - case 5: { - message.newDestinationIp = reader.string(); - break; - } - case 6: { - message.oldSourcePort = reader.int32(); - break; - } - case 7: { - message.newSourcePort = reader.int32(); - break; - } - case 8: { - message.oldDestinationPort = reader.int32(); - break; - } - case 9: { - message.newDestinationPort = reader.int32(); - break; - } - case 10: { - message.subnetUri = reader.string(); - break; - } - case 11: { - message.networkUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProxyConnectionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProxyConnectionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - if (!$util.isString(message.subnetUri)) - return "subnetUri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - return null; - }; - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo - */ - ProxyConnectionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.subnetUri != null) - message.subnetUri = String(object.subnetUri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - return message; - }; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} message ProxyConnectionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProxyConnectionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.protocol = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.subnetUri = ""; - object.networkUri = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - object.subnetUri = message.subnetUri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - return object; - }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - * @returns {Object.} JSON object - */ - ProxyConnectionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo"; - }; - - return ProxyConnectionInfo; - })(); - - v1beta1.LoadBalancerBackendInfo = (function() { - - /** - * Properties of a LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILoadBalancerBackendInfo - * @property {string|null} [name] LoadBalancerBackendInfo name - * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri - * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri - * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri - * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri - * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri - * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget - * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState - */ - - /** - * Constructs a new LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LoadBalancerBackendInfo. - * @implements ILoadBalancerBackendInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set - */ - function LoadBalancerBackendInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackendInfo name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.name = ""; - - /** - * LoadBalancerBackendInfo instanceUri. - * @member {string} instanceUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceUri = ""; - - /** - * LoadBalancerBackendInfo backendServiceUri. - * @member {string} backendServiceUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendServiceUri = ""; - - /** - * LoadBalancerBackendInfo instanceGroupUri. - * @member {string} instanceGroupUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; - - /** - * LoadBalancerBackendInfo networkEndpointGroupUri. - * @member {string} networkEndpointGroupUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; - - /** - * LoadBalancerBackendInfo backendBucketUri. - * @member {string} backendBucketUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendBucketUri = ""; - - /** - * LoadBalancerBackendInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * LoadBalancerBackendInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; - - /** - * LoadBalancerBackendInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerBackendInfo healthCheckFirewallsConfigState. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance - */ - LoadBalancerBackendInfo.create = function create(properties) { - return new LoadBalancerBackendInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); - if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); - if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); - if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); - if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); - if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.instanceUri = reader.string(); - break; - } - case 3: { - message.backendServiceUri = reader.string(); - break; - } - case 4: { - message.instanceGroupUri = reader.string(); - break; - } - case 5: { - message.networkEndpointGroupUri = reader.string(); - break; - } - case 8: { - message.backendBucketUri = reader.string(); - break; - } - case 9: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 10: { - message.pscGoogleApiTarget = reader.string(); - break; - } - case 6: { - message.healthCheckUri = reader.string(); - break; - } - case 7: { - message.healthCheckFirewallsConfigState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackendInfo.verify = function verify(message) { - if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) - if (!$util.isString(message.instanceUri)) - return "instanceUri: string expected"; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - if (!$util.isString(message.backendServiceUri)) - return "backendServiceUri: string expected"; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - if (!$util.isString(message.instanceGroupUri)) - return "instanceGroupUri: string expected"; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - if (!$util.isString(message.networkEndpointGroupUri)) - return "networkEndpointGroupUri: string expected"; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - if (!$util.isString(message.backendBucketUri)) - return "backendBucketUri: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - switch (message.healthCheckFirewallsConfigState) { - default: - return "healthCheckFirewallsConfigState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - */ - LoadBalancerBackendInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.instanceUri != null) - message.instanceUri = String(object.instanceUri); - if (object.backendServiceUri != null) - message.backendServiceUri = String(object.backendServiceUri); - if (object.instanceGroupUri != null) - message.instanceGroupUri = String(object.instanceGroupUri); - if (object.networkEndpointGroupUri != null) - message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); - if (object.backendBucketUri != null) - message.backendBucketUri = String(object.backendBucketUri); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - switch (object.healthCheckFirewallsConfigState) { - default: - if (typeof object.healthCheckFirewallsConfigState === "number") { - message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; - break; - } - break; - case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallsConfigState = 0; - break; - case "FIREWALLS_CONFIGURED": - case 1: - message.healthCheckFirewallsConfigState = 1; - break; - case "FIREWALLS_PARTIALLY_CONFIGURED": - case 2: - message.healthCheckFirewallsConfigState = 2; - break; - case "FIREWALLS_NOT_CONFIGURED": - case 3: - message.healthCheckFirewallsConfigState = 3; - break; - case "FIREWALLS_UNSUPPORTED": - case 4: - message.healthCheckFirewallsConfigState = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackendInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.instanceUri = ""; - object.backendServiceUri = ""; - object.instanceGroupUri = ""; - object.networkEndpointGroupUri = ""; - object.healthCheckUri = ""; - object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; - object.backendBucketUri = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) - object.instanceUri = message.instanceUri; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - object.backendServiceUri = message.backendServiceUri; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - object.instanceGroupUri = message.instanceGroupUri; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - object.networkEndpointGroupUri = message.networkEndpointGroupUri; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - object.backendBucketUri = message.backendBucketUri; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo"; - }; - - /** - * HealthCheckFirewallsConfigState enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value - * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value - * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value - * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value - * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value - */ - LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; - values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; - values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; - values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; - return values; - })(); - - return LoadBalancerBackendInfo; - })(); - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value - * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value - * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value - * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value - * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value - * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value - * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value - * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value - * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value - * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value - */ - v1beta1.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; - values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; - values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; - values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; - values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; - values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; - values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; - values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; - values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; - values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; - return values; - })(); - - v1beta1.StorageBucketInfo = (function() { - - /** - * Properties of a StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IStorageBucketInfo - * @property {string|null} [bucket] StorageBucketInfo bucket - */ - - /** - * Constructs a new StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a StorageBucketInfo. - * @implements IStorageBucketInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set - */ - function StorageBucketInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageBucketInfo bucket. - * @member {string} bucket - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @instance - */ - StorageBucketInfo.prototype.bucket = ""; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo instance - */ - StorageBucketInfo.create = function create(properties) { - return new StorageBucketInfo(properties); - }; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - return writer; - }; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageBucketInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageBucketInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - return null; - }; - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo - */ - StorageBucketInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); - if (object.bucket != null) - message.bucket = String(object.bucket); - return message; - }; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} message StorageBucketInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageBucketInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bucket = ""; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - return object; - }; - - /** - * Converts this StorageBucketInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @instance - * @returns {Object.} JSON object - */ - StorageBucketInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageBucketInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.StorageBucketInfo"; - }; - - return StorageBucketInfo; - })(); - - v1beta1.ServerlessNegInfo = (function() { - - /** - * Properties of a ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IServerlessNegInfo - * @property {string|null} [negUri] ServerlessNegInfo negUri - */ - - /** - * Constructs a new ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ServerlessNegInfo. - * @implements IServerlessNegInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set - */ - function ServerlessNegInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerlessNegInfo negUri. - * @member {string} negUri - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @instance - */ - ServerlessNegInfo.prototype.negUri = ""; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo instance - */ - ServerlessNegInfo.create = function create(properties) { - return new ServerlessNegInfo(properties); - }; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); - return writer; - }; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.negUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerlessNegInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerlessNegInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.negUri != null && message.hasOwnProperty("negUri")) - if (!$util.isString(message.negUri)) - return "negUri: string expected"; - return null; - }; - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo - */ - ServerlessNegInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); - if (object.negUri != null) - message.negUri = String(object.negUri); - return message; - }; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} message ServerlessNegInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerlessNegInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.negUri = ""; - if (message.negUri != null && message.hasOwnProperty("negUri")) - object.negUri = message.negUri; - return object; - }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @instance - * @returns {Object.} JSON object - */ - ServerlessNegInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerlessNegInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ServerlessNegInfo"; - }; - - return ServerlessNegInfo; - })(); - - v1beta1.ReachabilityService = (function() { - - /** - * Constructs a new ReachabilityService service. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ReachabilityService - * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; - - /** - * Creates new ReachabilityService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. - */ - ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef ListConnectivityTestsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse - */ - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { - return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, request, callback); - }, "name", { value: "ListConnectivityTests" }); - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef GetConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} [response] ConnectivityTest - */ - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { - return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest, request, callback); - }, "name", { value: "GetConnectivityTest" }); - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef CreateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { - return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConnectivityTest" }); - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef UpdateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { - return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateConnectivityTest" }); - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef RerunConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { - return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RerunConnectivityTest" }); - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef DeleteConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { - return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConnectivityTest" }); - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ReachabilityService; - })(); - - v1beta1.ListConnectivityTestsRequest = (function() { - - /** - * Properties of a ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListConnectivityTestsRequest - * @property {string|null} [parent] ListConnectivityTestsRequest parent - * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize - * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken - * @property {string|null} [filter] ListConnectivityTestsRequest filter - * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy - */ - - /** - * Constructs a new ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListConnectivityTestsRequest. - * @implements IListConnectivityTestsRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set - */ - function ListConnectivityTestsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListConnectivityTestsRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.parent = ""; - - /** - * ListConnectivityTestsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageSize = 0; - - /** - * ListConnectivityTestsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageToken = ""; - - /** - * ListConnectivityTestsRequest filter. - * @member {string} filter - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.filter = ""; - - /** - * ListConnectivityTestsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance - */ - ListConnectivityTestsRequest.create = function create(properties) { - return new ListConnectivityTestsRequest(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - */ - ListConnectivityTestsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest"; - }; - - return ListConnectivityTestsRequest; - })(); - - v1beta1.ListConnectivityTestsResponse = (function() { - - /** - * Properties of a ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListConnectivityTestsResponse - * @property {Array.|null} [resources] ListConnectivityTestsResponse resources - * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable - */ - - /** - * Constructs a new ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListConnectivityTestsResponse. - * @implements IListConnectivityTestsResponse - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set - */ - function ListConnectivityTestsResponse(properties) { - this.resources = []; - 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]]; - } - - /** - * ListConnectivityTestsResponse resources. - * @member {Array.} resources - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; - - /** - * ListConnectivityTestsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.nextPageToken = ""; - - /** - * ListConnectivityTestsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance - */ - ListConnectivityTestsResponse.create = function create(properties) { - return new ListConnectivityTestsResponse(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resources[i]); - if (error) - return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - */ - ListConnectivityTestsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse"; - }; - - return ListConnectivityTestsResponse; - })(); - - v1beta1.GetConnectivityTestRequest = (function() { - - /** - * Properties of a GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGetConnectivityTestRequest - * @property {string|null} [name] GetConnectivityTestRequest name - */ - - /** - * Constructs a new GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GetConnectivityTestRequest. - * @implements IGetConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set - */ - function GetConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @instance - */ - GetConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest instance - */ - GetConnectivityTestRequest.create = function create(properties) { - return new GetConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encode = function encode(message, writer) { - 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); - 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetConnectivityTestRequest.verify = function verify(message) { - if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest - */ - GetConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} message GetConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - GetConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest"; - }; - - return GetConnectivityTestRequest; - })(); - - v1beta1.CreateConnectivityTestRequest = (function() { - - /** - * Properties of a CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICreateConnectivityTestRequest - * @property {string|null} [parent] CreateConnectivityTestRequest parent - * @property {string|null} [testId] CreateConnectivityTestRequest testId - * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource - */ - - /** - * Constructs a new CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CreateConnectivityTestRequest. - * @implements ICreateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set - */ - function CreateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateConnectivityTestRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.parent = ""; - - /** - * CreateConnectivityTestRequest testId. - * @member {string} testId - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.testId = ""; - - /** - * CreateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance - */ - CreateConnectivityTestRequest.create = function create(properties) { - return new CreateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.testId = reader.string(); - break; - } - case 3: { - message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) - if (!$util.isString(message.testId)) - return "testId: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - */ - CreateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.testId != null) - message.testId = String(object.testId); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.testId = ""; - object.resource = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.testId != null && message.hasOwnProperty("testId")) - object.testId = message.testId; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest"; - }; - - return CreateConnectivityTestRequest; - })(); - - v1beta1.UpdateConnectivityTestRequest = (function() { - - /** - * Properties of an UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IUpdateConnectivityTestRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask - * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource - */ - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an UpdateConnectivityTestRequest. - * @implements IUpdateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set - */ - function UpdateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateConnectivityTestRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.updateMask = null; - - /** - * UpdateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance - */ - UpdateConnectivityTestRequest.create = function create(properties) { - return new UpdateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); - 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.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - */ - UpdateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.resource = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest"; - }; - - return UpdateConnectivityTestRequest; - })(); - - v1beta1.DeleteConnectivityTestRequest = (function() { - - /** - * Properties of a DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDeleteConnectivityTestRequest - * @property {string|null} [name] DeleteConnectivityTestRequest name - */ - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DeleteConnectivityTestRequest. - * @implements IDeleteConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set - */ - function DeleteConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @instance - */ - DeleteConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance - */ - DeleteConnectivityTestRequest.create = function create(properties) { - return new DeleteConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encode = function encode(message, writer) { - 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); - 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConnectivityTestRequest.verify = function verify(message) { - if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - */ - DeleteConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest"; - }; - - return DeleteConnectivityTestRequest; - })(); - - v1beta1.RerunConnectivityTestRequest = (function() { - - /** - * Properties of a RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRerunConnectivityTestRequest - * @property {string|null} [name] RerunConnectivityTestRequest name - */ - - /** - * Constructs a new RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RerunConnectivityTestRequest. - * @implements IRerunConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set - */ - function RerunConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RerunConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @instance - */ - RerunConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance - */ - RerunConnectivityTestRequest.create = function create(properties) { - return new RerunConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encode = function encode(message, writer) { - 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); - 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RerunConnectivityTestRequest.verify = function verify(message) { - if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - */ - RerunConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest"; - }; - - return RerunConnectivityTestRequest; - })(); - - v1beta1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.networkmanagement.v1beta1 - * @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} [statusDetail] OperationMetadata statusDetail - * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusDetail = ""; - - /** - * OperationMetadata cancelRequested. - * @member {boolean} cancelRequested - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.cancelRequested = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); - if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusDetail = reader.string(); - break; - } - case 6: { - message.cancelRequested = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - 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.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - if (typeof message.cancelRequested !== "boolean") - return "cancelRequested: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: 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.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.OperationMetadata) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.cancelRequested != null) - message.cancelRequested = Boolean(object.cancelRequested); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusDetail = ""; - object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - object.cancelRequested = message.cancelRequested; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1beta1.VpcFlowLogsService = (function() { - - /** - * Constructs a new VpcFlowLogsService service. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpcFlowLogsService - * @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 VpcFlowLogsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (VpcFlowLogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VpcFlowLogsService; - - /** - * Creates new VpcFlowLogsService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @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 {VpcFlowLogsService} RPC service. Useful where requests and/or responses are streamed. - */ - VpcFlowLogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef ListVpcFlowLogsConfigsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} [response] ListVpcFlowLogsConfigsResponse - */ - - /** - * Calls ListVpcFlowLogsConfigs. - * @function listVpcFlowLogsConfigs - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback} callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.listVpcFlowLogsConfigs = function listVpcFlowLogsConfigs(request, callback) { - return this.rpcCall(listVpcFlowLogsConfigs, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, request, callback); - }, "name", { value: "ListVpcFlowLogsConfigs" }); - - /** - * Calls ListVpcFlowLogsConfigs. - * @function listVpcFlowLogsConfigs - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef GetVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} [response] VpcFlowLogsConfig - */ - - /** - * Calls GetVpcFlowLogsConfig. - * @function getVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and VpcFlowLogsConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.getVpcFlowLogsConfig = function getVpcFlowLogsConfig(request, callback) { - return this.rpcCall(getVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, request, callback); - }, "name", { value: "GetVpcFlowLogsConfig" }); - - /** - * Calls GetVpcFlowLogsConfig. - * @function getVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef CreateVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateVpcFlowLogsConfig. - * @function createVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.createVpcFlowLogsConfig = function createVpcFlowLogsConfig(request, callback) { - return this.rpcCall(createVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateVpcFlowLogsConfig" }); - - /** - * Calls CreateVpcFlowLogsConfig. - * @function createVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef UpdateVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateVpcFlowLogsConfig. - * @function updateVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.updateVpcFlowLogsConfig = function updateVpcFlowLogsConfig(request, callback) { - return this.rpcCall(updateVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateVpcFlowLogsConfig" }); - - /** - * Calls UpdateVpcFlowLogsConfig. - * @function updateVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef DeleteVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteVpcFlowLogsConfig. - * @function deleteVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.deleteVpcFlowLogsConfig = function deleteVpcFlowLogsConfig(request, callback) { - return this.rpcCall(deleteVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteVpcFlowLogsConfig" }); - - /** - * Calls DeleteVpcFlowLogsConfig. - * @function deleteVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return VpcFlowLogsService; - })(); - - v1beta1.ListVpcFlowLogsConfigsRequest = (function() { - - /** - * Properties of a ListVpcFlowLogsConfigsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListVpcFlowLogsConfigsRequest - * @property {string|null} [parent] ListVpcFlowLogsConfigsRequest parent - * @property {number|null} [pageSize] ListVpcFlowLogsConfigsRequest pageSize - * @property {string|null} [pageToken] ListVpcFlowLogsConfigsRequest pageToken - * @property {string|null} [filter] ListVpcFlowLogsConfigsRequest filter - * @property {string|null} [orderBy] ListVpcFlowLogsConfigsRequest orderBy - */ - - /** - * Constructs a new ListVpcFlowLogsConfigsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListVpcFlowLogsConfigsRequest. - * @implements IListVpcFlowLogsConfigsRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set - */ - function ListVpcFlowLogsConfigsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListVpcFlowLogsConfigsRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.parent = ""; - - /** - * ListVpcFlowLogsConfigsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.pageSize = 0; - - /** - * ListVpcFlowLogsConfigsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.pageToken = ""; - - /** - * ListVpcFlowLogsConfigsRequest filter. - * @member {string} filter - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.filter = ""; - - /** - * ListVpcFlowLogsConfigsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest instance - */ - ListVpcFlowLogsConfigsRequest.create = function create(properties) { - return new ListVpcFlowLogsConfigsRequest(properties); - }; - - /** - * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); - 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 ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVpcFlowLogsConfigsRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest - */ - ListVpcFlowLogsConfigsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); - 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 ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - * @returns {Object.} JSON object - */ - ListVpcFlowLogsConfigsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVpcFlowLogsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest"; - }; - - return ListVpcFlowLogsConfigsRequest; - })(); - - v1beta1.ListVpcFlowLogsConfigsResponse = (function() { - - /** - * Properties of a ListVpcFlowLogsConfigsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListVpcFlowLogsConfigsResponse - * @property {Array.|null} [vpcFlowLogsConfigs] ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs - * @property {string|null} [nextPageToken] ListVpcFlowLogsConfigsResponse nextPageToken - * @property {Array.|null} [unreachable] ListVpcFlowLogsConfigsResponse unreachable - */ - - /** - * Constructs a new ListVpcFlowLogsConfigsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListVpcFlowLogsConfigsResponse. - * @implements IListVpcFlowLogsConfigsResponse - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set - */ - function ListVpcFlowLogsConfigsResponse(properties) { - this.vpcFlowLogsConfigs = []; - 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]]; - } - - /** - * ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. - * @member {Array.} vpcFlowLogsConfigs - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - */ - ListVpcFlowLogsConfigsResponse.prototype.vpcFlowLogsConfigs = $util.emptyArray; - - /** - * ListVpcFlowLogsConfigsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - */ - ListVpcFlowLogsConfigsResponse.prototype.nextPageToken = ""; - - /** - * ListVpcFlowLogsConfigsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - */ - ListVpcFlowLogsConfigsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse instance - */ - ListVpcFlowLogsConfigsResponse.create = function create(properties) { - return new ListVpcFlowLogsConfigsResponse(properties); - }; - - /** - * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vpcFlowLogsConfigs != null && message.vpcFlowLogsConfigs.length) - for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length)) - message.vpcFlowLogsConfigs = []; - message.vpcFlowLogsConfigs.push($root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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 ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVpcFlowLogsConfigsResponse message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVpcFlowLogsConfigsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vpcFlowLogsConfigs != null && message.hasOwnProperty("vpcFlowLogsConfigs")) { - if (!Array.isArray(message.vpcFlowLogsConfigs)) - return "vpcFlowLogsConfigs: array expected"; - for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfigs[i]); - if (error) - return "vpcFlowLogsConfigs." + 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 ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse - */ - ListVpcFlowLogsConfigsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); - if (object.vpcFlowLogsConfigs) { - if (!Array.isArray(object.vpcFlowLogsConfigs)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: array expected"); - message.vpcFlowLogsConfigs = []; - for (var i = 0; i < object.vpcFlowLogsConfigs.length; ++i) { - if (typeof object.vpcFlowLogsConfigs[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: object expected"); - message.vpcFlowLogsConfigs[i] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfigs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.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 ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVpcFlowLogsConfigsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.vpcFlowLogsConfigs = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length) { - object.vpcFlowLogsConfigs = []; - for (var j = 0; j < message.vpcFlowLogsConfigs.length; ++j) - object.vpcFlowLogsConfigs[j] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - * @returns {Object.} JSON object - */ - ListVpcFlowLogsConfigsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsResponse - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVpcFlowLogsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse"; - }; - - return ListVpcFlowLogsConfigsResponse; - })(); - - v1beta1.GetVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of a GetVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGetVpcFlowLogsConfigRequest - * @property {string|null} [name] GetVpcFlowLogsConfigRequest name - */ - - /** - * Constructs a new GetVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GetVpcFlowLogsConfigRequest. - * @implements IGetVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function GetVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVpcFlowLogsConfigRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @instance - */ - GetVpcFlowLogsConfigRequest.prototype.name = ""; - - /** - * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest instance - */ - GetVpcFlowLogsConfigRequest.create = function create(properties) { - return new GetVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVpcFlowLogsConfigRequest.encode = function encode(message, writer) { - 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 GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); - 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 GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVpcFlowLogsConfigRequest.verify = function verify(message) { - if (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 GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest - */ - GetVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVpcFlowLogsConfigRequest.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 GetVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest"; - }; - - return GetVpcFlowLogsConfigRequest; - })(); - - v1beta1.CreateVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of a CreateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICreateVpcFlowLogsConfigRequest - * @property {string|null} [parent] CreateVpcFlowLogsConfigRequest parent - * @property {string|null} [vpcFlowLogsConfigId] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId - * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig - */ - - /** - * Constructs a new CreateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CreateVpcFlowLogsConfigRequest. - * @implements ICreateVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function CreateVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateVpcFlowLogsConfigRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - */ - CreateVpcFlowLogsConfigRequest.prototype.parent = ""; - - /** - * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. - * @member {string} vpcFlowLogsConfigId - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - */ - CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfigId = ""; - - /** - * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. - * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - */ - CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; - - /** - * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest instance - */ - CreateVpcFlowLogsConfigRequest.create = function create(properties) { - return new CreateVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfigId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.vpcFlowLogsConfigId); - if (message.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) - $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.vpcFlowLogsConfigId = reader.string(); - break; - } - case 3: { - message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) - if (!$util.isString(message.vpcFlowLogsConfigId)) - return "vpcFlowLogsConfigId: string expected"; - if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); - if (error) - return "vpcFlowLogsConfig." + error; - } - return null; - }; - - /** - * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest - */ - CreateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.vpcFlowLogsConfigId != null) - message.vpcFlowLogsConfigId = String(object.vpcFlowLogsConfigId); - if (object.vpcFlowLogsConfig != null) { - if (typeof object.vpcFlowLogsConfig !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); - message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); - } - return message; - }; - - /** - * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.vpcFlowLogsConfigId = ""; - object.vpcFlowLogsConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) - object.vpcFlowLogsConfigId = message.vpcFlowLogsConfigId; - if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) - object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); - return object; - }; - - /** - * Converts this CreateVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - CreateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest"; - }; - - return CreateVpcFlowLogsConfigRequest; - })(); - - v1beta1.UpdateVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of an UpdateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IUpdateVpcFlowLogsConfigRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVpcFlowLogsConfigRequest updateMask - * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig - */ - - /** - * Constructs a new UpdateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an UpdateVpcFlowLogsConfigRequest. - * @implements IUpdateVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function UpdateVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateVpcFlowLogsConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @instance - */ - UpdateVpcFlowLogsConfigRequest.prototype.updateMask = null; - - /** - * UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. - * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @instance - */ - UpdateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; - - /** - * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest instance - */ - UpdateVpcFlowLogsConfigRequest.create = function create(properties) { - return new UpdateVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) - $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); - 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.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); - if (error) - return "vpcFlowLogsConfig." + error; - } - return null; - }; - - /** - * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest - */ - UpdateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.vpcFlowLogsConfig != null) { - if (typeof object.vpcFlowLogsConfig !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); - message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); - } - return message; - }; - - /** - * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.vpcFlowLogsConfig = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) - object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); - return object; - }; - - /** - * Converts this UpdateVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest"; - }; - - return UpdateVpcFlowLogsConfigRequest; - })(); - - v1beta1.DeleteVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of a DeleteVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDeleteVpcFlowLogsConfigRequest - * @property {string|null} [name] DeleteVpcFlowLogsConfigRequest name - */ - - /** - * Constructs a new DeleteVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DeleteVpcFlowLogsConfigRequest. - * @implements IDeleteVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function DeleteVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteVpcFlowLogsConfigRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @instance - */ - DeleteVpcFlowLogsConfigRequest.prototype.name = ""; - - /** - * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest instance - */ - DeleteVpcFlowLogsConfigRequest.create = function create(properties) { - return new DeleteVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVpcFlowLogsConfigRequest.encode = function encode(message, writer) { - 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 DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); - 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 DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteVpcFlowLogsConfigRequest.verify = function verify(message) { - if (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 DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest - */ - DeleteVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteVpcFlowLogsConfigRequest.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 DeleteVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest"; - }; - - return DeleteVpcFlowLogsConfigRequest; - })(); - - v1beta1.VpcFlowLogsConfig = (function() { - - /** - * Properties of a VpcFlowLogsConfig. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpcFlowLogsConfig - * @property {string|null} [name] VpcFlowLogsConfig name - * @property {string|null} [description] VpcFlowLogsConfig description - * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null} [state] VpcFlowLogsConfig state - * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null} [aggregationInterval] VpcFlowLogsConfig aggregationInterval - * @property {number|null} [flowSampling] VpcFlowLogsConfig flowSampling - * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null} [metadata] VpcFlowLogsConfig metadata - * @property {Array.|null} [metadataFields] VpcFlowLogsConfig metadataFields - * @property {string|null} [filterExpr] VpcFlowLogsConfig filterExpr - * @property {string|null} [interconnectAttachment] VpcFlowLogsConfig interconnectAttachment - * @property {string|null} [vpnTunnel] VpcFlowLogsConfig vpnTunnel - * @property {Object.|null} [labels] VpcFlowLogsConfig labels - * @property {google.protobuf.ITimestamp|null} [createTime] VpcFlowLogsConfig createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] VpcFlowLogsConfig updateTime - */ - - /** - * Constructs a new VpcFlowLogsConfig. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpcFlowLogsConfig. - * @implements IVpcFlowLogsConfig - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set - */ - function VpcFlowLogsConfig(properties) { - this.metadataFields = []; - 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]]; - } - - /** - * VpcFlowLogsConfig name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.name = ""; - - /** - * VpcFlowLogsConfig description. - * @member {string|null|undefined} description - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.description = null; - - /** - * VpcFlowLogsConfig state. - * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null|undefined} state - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.state = null; - - /** - * VpcFlowLogsConfig aggregationInterval. - * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null|undefined} aggregationInterval - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.aggregationInterval = null; - - /** - * VpcFlowLogsConfig flowSampling. - * @member {number|null|undefined} flowSampling - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.flowSampling = null; - - /** - * VpcFlowLogsConfig metadata. - * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null|undefined} metadata - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.metadata = null; - - /** - * VpcFlowLogsConfig metadataFields. - * @member {Array.} metadataFields - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.metadataFields = $util.emptyArray; - - /** - * VpcFlowLogsConfig filterExpr. - * @member {string|null|undefined} filterExpr - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.filterExpr = null; - - /** - * VpcFlowLogsConfig interconnectAttachment. - * @member {string|null|undefined} interconnectAttachment - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.interconnectAttachment = null; - - /** - * VpcFlowLogsConfig vpnTunnel. - * @member {string|null|undefined} vpnTunnel - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.vpnTunnel = null; - - /** - * VpcFlowLogsConfig labels. - * @member {Object.} labels - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.labels = $util.emptyObject; - - /** - * VpcFlowLogsConfig createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.createTime = null; - - /** - * VpcFlowLogsConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * VpcFlowLogsConfig _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _state. - * @member {"state"|undefined} _state - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_state", { - get: $util.oneOfGetter($oneOfFields = ["state"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _aggregationInterval. - * @member {"aggregationInterval"|undefined} _aggregationInterval - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_aggregationInterval", { - get: $util.oneOfGetter($oneOfFields = ["aggregationInterval"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _flowSampling. - * @member {"flowSampling"|undefined} _flowSampling - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_flowSampling", { - get: $util.oneOfGetter($oneOfFields = ["flowSampling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _filterExpr. - * @member {"filterExpr"|undefined} _filterExpr - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_filterExpr", { - get: $util.oneOfGetter($oneOfFields = ["filterExpr"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig targetResource. - * @member {"interconnectAttachment"|"vpnTunnel"|undefined} targetResource - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "targetResource", { - get: $util.oneOfGetter($oneOfFields = ["interconnectAttachment", "vpnTunnel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new VpcFlowLogsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig instance - */ - VpcFlowLogsConfig.create = function create(properties) { - return new VpcFlowLogsConfig(properties); - }; - - /** - * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcFlowLogsConfig.encode = function encode(message, writer) { - if (!writer) - 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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.aggregationInterval != null && Object.hasOwnProperty.call(message, "aggregationInterval")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aggregationInterval); - if (message.flowSampling != null && Object.hasOwnProperty.call(message, "flowSampling")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.flowSampling); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.metadata); - if (message.metadataFields != null && message.metadataFields.length) - for (var i = 0; i < message.metadataFields.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.metadataFields[i]); - if (message.filterExpr != null && Object.hasOwnProperty.call(message, "filterExpr")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.filterExpr); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).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 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.interconnectAttachment != null && Object.hasOwnProperty.call(message, "interconnectAttachment")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.interconnectAttachment); - if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.vpnTunnel); - return writer; - }; - - /** - * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcFlowLogsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcFlowLogsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(), 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.state = reader.int32(); - break; - } - case 4: { - message.aggregationInterval = reader.int32(); - break; - } - case 5: { - message.flowSampling = reader.float(); - break; - } - case 6: { - message.metadata = reader.int32(); - break; - } - case 7: { - if (!(message.metadataFields && message.metadataFields.length)) - message.metadataFields = []; - message.metadataFields.push(reader.string()); - break; - } - case 8: { - message.filterExpr = reader.string(); - break; - } - case 102: { - message.interconnectAttachment = reader.string(); - break; - } - case 103: { - message.vpnTunnel = reader.string(); - break; - } - case 11: { - 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 9: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcFlowLogsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcFlowLogsConfig message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcFlowLogsConfig.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.state != null && message.hasOwnProperty("state")) { - properties._state = 1; - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { - properties._aggregationInterval = 1; - switch (message.aggregationInterval) { - default: - return "aggregationInterval: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - } - if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { - properties._flowSampling = 1; - if (typeof message.flowSampling !== "number") - return "flowSampling: number expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - switch (message.metadata) { - default: - return "metadata: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.metadataFields != null && message.hasOwnProperty("metadataFields")) { - if (!Array.isArray(message.metadataFields)) - return "metadataFields: array expected"; - for (var i = 0; i < message.metadataFields.length; ++i) - if (!$util.isString(message.metadataFields[i])) - return "metadataFields: string[] expected"; - } - if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { - properties._filterExpr = 1; - if (!$util.isString(message.filterExpr)) - return "filterExpr: string expected"; - } - if (message.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { - properties.targetResource = 1; - if (!$util.isString(message.interconnectAttachment)) - return "interconnectAttachment: string expected"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - if (properties.targetResource === 1) - return "targetResource: multiple values"; - properties.targetResource = 1; - if (!$util.isString(message.vpnTunnel)) - return "vpnTunnel: 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; - } - return null; - }; - - /** - * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig - */ - VpcFlowLogsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ENABLED": - case 1: - message.state = 1; - break; - case "DISABLED": - case 2: - message.state = 2; - break; - } - switch (object.aggregationInterval) { - default: - if (typeof object.aggregationInterval === "number") { - message.aggregationInterval = object.aggregationInterval; - break; - } - break; - case "AGGREGATION_INTERVAL_UNSPECIFIED": - case 0: - message.aggregationInterval = 0; - break; - case "INTERVAL_5_SEC": - case 1: - message.aggregationInterval = 1; - break; - case "INTERVAL_30_SEC": - case 2: - message.aggregationInterval = 2; - break; - case "INTERVAL_1_MIN": - case 3: - message.aggregationInterval = 3; - break; - case "INTERVAL_5_MIN": - case 4: - message.aggregationInterval = 4; - break; - case "INTERVAL_10_MIN": - case 5: - message.aggregationInterval = 5; - break; - case "INTERVAL_15_MIN": - case 6: - message.aggregationInterval = 6; - break; - } - if (object.flowSampling != null) - message.flowSampling = Number(object.flowSampling); - switch (object.metadata) { - default: - if (typeof object.metadata === "number") { - message.metadata = object.metadata; - break; - } - break; - case "METADATA_UNSPECIFIED": - case 0: - message.metadata = 0; - break; - case "INCLUDE_ALL_METADATA": - case 1: - message.metadata = 1; - break; - case "EXCLUDE_ALL_METADATA": - case 2: - message.metadata = 2; - break; - case "CUSTOM_METADATA": - case 3: - message.metadata = 3; - break; - } - if (object.metadataFields) { - if (!Array.isArray(object.metadataFields)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.metadataFields: array expected"); - message.metadataFields = []; - for (var i = 0; i < object.metadataFields.length; ++i) - message.metadataFields[i] = String(object.metadataFields[i]); - } - if (object.filterExpr != null) - message.filterExpr = String(object.filterExpr); - if (object.interconnectAttachment != null) - message.interconnectAttachment = String(object.interconnectAttachment); - if (object.vpnTunnel != null) - message.vpnTunnel = String(object.vpnTunnel); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} message VpcFlowLogsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcFlowLogsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metadataFields = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - } - 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.state != null && message.hasOwnProperty("state")) { - object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] : message.state; - if (options.oneofs) - object._state = "state"; - } - if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { - object.aggregationInterval = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] === undefined ? message.aggregationInterval : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] : message.aggregationInterval; - if (options.oneofs) - object._aggregationInterval = "aggregationInterval"; - } - if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { - object.flowSampling = options.json && !isFinite(message.flowSampling) ? String(message.flowSampling) : message.flowSampling; - if (options.oneofs) - object._flowSampling = "flowSampling"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] === undefined ? message.metadata : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] : message.metadata; - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.metadataFields && message.metadataFields.length) { - object.metadataFields = []; - for (var j = 0; j < message.metadataFields.length; ++j) - object.metadataFields[j] = message.metadataFields[j]; - } - if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { - object.filterExpr = message.filterExpr; - if (options.oneofs) - object._filterExpr = "filterExpr"; - } - 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.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { - object.interconnectAttachment = message.interconnectAttachment; - if (options.oneofs) - object.targetResource = "interconnectAttachment"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - object.vpnTunnel = message.vpnTunnel; - if (options.oneofs) - object.targetResource = "vpnTunnel"; - } - return object; - }; - - /** - * Converts this VpcFlowLogsConfig to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - * @returns {Object.} JSON object - */ - VpcFlowLogsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcFlowLogsConfig - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcFlowLogsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig"; - }; - - /** - * State enum. - * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - */ - VpcFlowLogsConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - return values; - })(); - - /** - * AggregationInterval enum. - * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval - * @enum {number} - * @property {number} AGGREGATION_INTERVAL_UNSPECIFIED=0 AGGREGATION_INTERVAL_UNSPECIFIED value - * @property {number} INTERVAL_5_SEC=1 INTERVAL_5_SEC value - * @property {number} INTERVAL_30_SEC=2 INTERVAL_30_SEC value - * @property {number} INTERVAL_1_MIN=3 INTERVAL_1_MIN value - * @property {number} INTERVAL_5_MIN=4 INTERVAL_5_MIN value - * @property {number} INTERVAL_10_MIN=5 INTERVAL_10_MIN value - * @property {number} INTERVAL_15_MIN=6 INTERVAL_15_MIN value - */ - VpcFlowLogsConfig.AggregationInterval = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AGGREGATION_INTERVAL_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERVAL_5_SEC"] = 1; - values[valuesById[2] = "INTERVAL_30_SEC"] = 2; - values[valuesById[3] = "INTERVAL_1_MIN"] = 3; - values[valuesById[4] = "INTERVAL_5_MIN"] = 4; - values[valuesById[5] = "INTERVAL_10_MIN"] = 5; - values[valuesById[6] = "INTERVAL_15_MIN"] = 6; - return values; - })(); - - /** - * Metadata enum. - * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata - * @enum {number} - * @property {number} METADATA_UNSPECIFIED=0 METADATA_UNSPECIFIED value - * @property {number} INCLUDE_ALL_METADATA=1 INCLUDE_ALL_METADATA value - * @property {number} EXCLUDE_ALL_METADATA=2 EXCLUDE_ALL_METADATA value - * @property {number} CUSTOM_METADATA=3 CUSTOM_METADATA value - */ - VpcFlowLogsConfig.Metadata = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METADATA_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE_ALL_METADATA"] = 1; - values[valuesById[2] = "EXCLUDE_ALL_METADATA"] = 2; - values[valuesById[3] = "CUSTOM_METADATA"] = 3; - return values; - })(); - - return VpcFlowLogsConfig; - })(); - - return v1beta1; - })(); - - return networkmanagement; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - 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; - })(); - - 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.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; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - 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; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - 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"]); - } - 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.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.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.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - google.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-networkmanagement/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json deleted file mode 100644 index d0087788008..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json +++ /dev/null @@ -1,4682 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "networkmanagement": { - "nested": { - "v1beta1": { - "options": { - "csharp_namespace": "Google.Cloud.NetworkManagement.V1Beta1", - "go_package": "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb", - "java_multiple_files": true, - "java_outer_classname": "VpcFlowLogsConfigProto", - "java_package": "com.google.cloud.networkmanagement.v1beta1", - "php_namespace": "Google\\Cloud\\NetworkManagement\\V1beta1", - "ruby_package": "Google::Cloud::NetworkManagement::V1beta1" - }, - "nested": { - "ConnectivityTest": { - "options": { - "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", - "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "source": { - "type": "Endpoint", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destination": { - "type": "Endpoint", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "protocol": { - "type": "string", - "id": 5 - }, - "relatedProjects": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reachabilityDetails": { - "type": "ReachabilityDetails", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "probingDetails": { - "type": "ProbingDetails", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bypassFirewallChecks": { - "type": "bool", - "id": 17 - } - } - }, - "Endpoint": { - "oneofs": { - "_forwardingRuleTarget": { - "oneof": [ - "forwardingRuleTarget" - ] - }, - "_loadBalancerId": { - "oneof": [ - "loadBalancerId" - ] - }, - "_loadBalancerType": { - "oneof": [ - "loadBalancerType" - ] - } - }, - "fields": { - "ipAddress": { - "type": "string", - "id": 1 - }, - "port": { - "type": "int32", - "id": 2 - }, - "instance": { - "type": "string", - "id": 3 - }, - "forwardingRule": { - "type": "string", - "id": 13 - }, - "forwardingRuleTarget": { - "type": "ForwardingRuleTarget", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "gkeMasterCluster": { - "type": "string", - "id": 7 - }, - "fqdn": { - "type": "string", - "id": 19 - }, - "cloudSqlInstance": { - "type": "string", - "id": 8 - }, - "redisInstance": { - "type": "string", - "id": 17 - }, - "redisCluster": { - "type": "string", - "id": 18 - }, - "cloudFunction": { - "type": "CloudFunctionEndpoint", - "id": 10 - }, - "appEngineVersion": { - "type": "AppEngineVersionEndpoint", - "id": 11 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionEndpoint", - "id": 12 - }, - "network": { - "type": "string", - "id": 4 - }, - "networkType": { - "type": "NetworkType", - "id": 5 - }, - "projectId": { - "type": "string", - "id": 6 - } - }, - "nested": { - "NetworkType": { - "values": { - "NETWORK_TYPE_UNSPECIFIED": 0, - "GCP_NETWORK": 1, - "NON_GCP_NETWORK": 2 - } - }, - "ForwardingRuleTarget": { - "values": { - "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "LOAD_BALANCER": 2, - "VPN_GATEWAY": 3, - "PSC": 4 - } - }, - "CloudFunctionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "AppEngineVersionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "CloudRunRevisionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - } - } - }, - "ReachabilityDetails": { - "fields": { - "result": { - "type": "Result", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "traces": { - "rule": "repeated", - "type": "Trace", - "id": 5 - } - }, - "nested": { - "Result": { - "values": { - "RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "AMBIGUOUS": 4, - "UNDETERMINED": 5 - } - } - } - }, - "LatencyPercentile": { - "fields": { - "percent": { - "type": "int32", - "id": 1 - }, - "latencyMicros": { - "type": "int64", - "id": 2 - } - } - }, - "LatencyDistribution": { - "fields": { - "latencyPercentiles": { - "rule": "repeated", - "type": "LatencyPercentile", - "id": 1 - } - } - }, - "ProbingDetails": { - "fields": { - "result": { - "type": "ProbingResult", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "abortCause": { - "type": "ProbingAbortCause", - "id": 4 - }, - "sentProbeCount": { - "type": "int32", - "id": 5 - }, - "successfulProbeCount": { - "type": "int32", - "id": 6 - }, - "endpointInfo": { - "type": "EndpointInfo", - "id": 7 - }, - "probingLatency": { - "type": "LatencyDistribution", - "id": 8 - }, - "destinationEgressLocation": { - "type": "EdgeLocation", - "id": 9 - } - }, - "nested": { - "ProbingResult": { - "values": { - "PROBING_RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "REACHABILITY_INCONSISTENT": 3, - "UNDETERMINED": 4 - } - }, - "ProbingAbortCause": { - "values": { - "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, - "PERMISSION_DENIED": 1, - "NO_SOURCE_LOCATION": 2 - } - }, - "EdgeLocation": { - "fields": { - "metropolitanArea": { - "type": "string", - "id": 1 - } - } - } - } - }, - "Trace": { - "fields": { - "endpointInfo": { - "type": "EndpointInfo", - "id": 1 - }, - "steps": { - "rule": "repeated", - "type": "Step", - "id": 2 - }, - "forwardTraceId": { - "type": "int32", - "id": 4 - } - } - }, - "Step": { - "oneofs": { - "stepInfo": { - "oneof": [ - "instance", - "firewall", - "route", - "endpoint", - "googleService", - "forwardingRule", - "vpnGateway", - "vpnTunnel", - "vpcConnector", - "deliver", - "forward", - "abort", - "drop", - "loadBalancer", - "network", - "gkeMaster", - "cloudSqlInstance", - "redisInstance", - "redisCluster", - "cloudFunction", - "appEngineVersion", - "cloudRunRevision", - "nat", - "proxyConnection", - "loadBalancerBackendInfo", - "storageBucket", - "serverlessNeg" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - }, - "causesDrop": { - "type": "bool", - "id": 3 - }, - "projectId": { - "type": "string", - "id": 4 - }, - "instance": { - "type": "InstanceInfo", - "id": 5 - }, - "firewall": { - "type": "FirewallInfo", - "id": 6 - }, - "route": { - "type": "RouteInfo", - "id": 7 - }, - "endpoint": { - "type": "EndpointInfo", - "id": 8 - }, - "googleService": { - "type": "GoogleServiceInfo", - "id": 24 - }, - "forwardingRule": { - "type": "ForwardingRuleInfo", - "id": 9 - }, - "vpnGateway": { - "type": "VpnGatewayInfo", - "id": 10 - }, - "vpnTunnel": { - "type": "VpnTunnelInfo", - "id": 11 - }, - "vpcConnector": { - "type": "VpcConnectorInfo", - "id": 21 - }, - "deliver": { - "type": "DeliverInfo", - "id": 12 - }, - "forward": { - "type": "ForwardInfo", - "id": 13 - }, - "abort": { - "type": "AbortInfo", - "id": 14 - }, - "drop": { - "type": "DropInfo", - "id": 15 - }, - "loadBalancer": { - "type": "LoadBalancerInfo", - "id": 16, - "options": { - "deprecated": true - } - }, - "network": { - "type": "NetworkInfo", - "id": 17 - }, - "gkeMaster": { - "type": "GKEMasterInfo", - "id": 18 - }, - "cloudSqlInstance": { - "type": "CloudSQLInstanceInfo", - "id": 19 - }, - "redisInstance": { - "type": "RedisInstanceInfo", - "id": 30 - }, - "redisCluster": { - "type": "RedisClusterInfo", - "id": 31 - }, - "cloudFunction": { - "type": "CloudFunctionInfo", - "id": 20 - }, - "appEngineVersion": { - "type": "AppEngineVersionInfo", - "id": 22 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionInfo", - "id": 23 - }, - "nat": { - "type": "NatInfo", - "id": 25 - }, - "proxyConnection": { - "type": "ProxyConnectionInfo", - "id": 26 - }, - "loadBalancerBackendInfo": { - "type": "LoadBalancerBackendInfo", - "id": 27 - }, - "storageBucket": { - "type": "StorageBucketInfo", - "id": 28 - }, - "serverlessNeg": { - "type": "ServerlessNegInfo", - "id": 29 - } - }, - "nested": { - "State": { - "valuesOptions": { - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { - "deprecated": true - }, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { - "deprecated": true - } - }, - "values": { - "STATE_UNSPECIFIED": 0, - "START_FROM_INSTANCE": 1, - "START_FROM_INTERNET": 2, - "START_FROM_GOOGLE_SERVICE": 27, - "START_FROM_PRIVATE_NETWORK": 3, - "START_FROM_GKE_MASTER": 21, - "START_FROM_CLOUD_SQL_INSTANCE": 22, - "START_FROM_REDIS_INSTANCE": 32, - "START_FROM_REDIS_CLUSTER": 33, - "START_FROM_CLOUD_FUNCTION": 23, - "START_FROM_APP_ENGINE_VERSION": 25, - "START_FROM_CLOUD_RUN_REVISION": 26, - "START_FROM_STORAGE_BUCKET": 29, - "START_FROM_PSC_PUBLISHED_SERVICE": 30, - "START_FROM_SERVERLESS_NEG": 31, - "APPLY_INGRESS_FIREWALL_RULE": 4, - "APPLY_EGRESS_FIREWALL_RULE": 5, - "APPLY_ROUTE": 6, - "APPLY_FORWARDING_RULE": 7, - "ANALYZE_LOAD_BALANCER_BACKEND": 28, - "SPOOFING_APPROVED": 8, - "ARRIVE_AT_INSTANCE": 9, - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, - "ARRIVE_AT_VPN_GATEWAY": 12, - "ARRIVE_AT_VPN_TUNNEL": 13, - "ARRIVE_AT_VPC_CONNECTOR": 24, - "NAT": 14, - "PROXY_CONNECTION": 15, - "DELIVER": 16, - "DROP": 17, - "FORWARD": 18, - "ABORT": 19, - "VIEWER_PERMISSION_MISSING": 20 - } - } - } - }, - "InstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "interface": { - "type": "string", - "id": 3 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "networkTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "serviceAccount": { - "type": "string", - "id": 8, - "options": { - "deprecated": true - } - }, - "pscNetworkAttachmentUri": { - "type": "string", - "id": 9 - } - } - }, - "NetworkInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedSubnetUri": { - "type": "string", - "id": 5 - }, - "matchedIpRange": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "FirewallInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "direction": { - "type": "string", - "id": 3 - }, - "action": { - "type": "string", - "id": 4 - }, - "priority": { - "type": "int32", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 6 - }, - "targetTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "targetServiceAccounts": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "policy": { - "type": "string", - "id": 9 - }, - "policyUri": { - "type": "string", - "id": 11 - }, - "firewallRuleType": { - "type": "FirewallRuleType", - "id": 10 - } - }, - "nested": { - "FirewallRuleType": { - "values": { - "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, - "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, - "VPC_FIREWALL_RULE": 2, - "IMPLIED_VPC_FIREWALL_RULE": 3, - "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, - "NETWORK_FIREWALL_POLICY_RULE": 5, - "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, - "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, - "TRACKING_STATE": 101 - } - } - } - }, - "RouteInfo": { - "oneofs": { - "_nccHubUri": { - "oneof": [ - "nccHubUri" - ] - }, - "_nccSpokeUri": { - "oneof": [ - "nccSpokeUri" - ] - }, - "_advertisedRouteSourceRouterUri": { - "oneof": [ - "advertisedRouteSourceRouterUri" - ] - }, - "_advertisedRouteNextHopUri": { - "oneof": [ - "advertisedRouteNextHopUri" - ] - } - }, - "fields": { - "routeType": { - "type": "RouteType", - "id": 8 - }, - "nextHopType": { - "type": "NextHopType", - "id": 9 - }, - "routeScope": { - "type": "RouteScope", - "id": 14 - }, - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "region": { - "type": "string", - "id": 19 - }, - "destIpRange": { - "type": "string", - "id": 3 - }, - "nextHop": { - "type": "string", - "id": 4 - }, - "networkUri": { - "type": "string", - "id": 5 - }, - "priority": { - "type": "int32", - "id": 6 - }, - "instanceTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "srcIpRange": { - "type": "string", - "id": 10 - }, - "destPortRanges": { - "rule": "repeated", - "type": "string", - "id": 11 - }, - "srcPortRanges": { - "rule": "repeated", - "type": "string", - "id": 12 - }, - "protocols": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "nccHubUri": { - "type": "string", - "id": 15, - "options": { - "proto3_optional": true - } - }, - "nccSpokeUri": { - "type": "string", - "id": 16, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteSourceRouterUri": { - "type": "string", - "id": 17, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteNextHopUri": { - "type": "string", - "id": 18, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "RouteType": { - "values": { - "ROUTE_TYPE_UNSPECIFIED": 0, - "SUBNET": 1, - "STATIC": 2, - "DYNAMIC": 3, - "PEERING_SUBNET": 4, - "PEERING_STATIC": 5, - "PEERING_DYNAMIC": 6, - "POLICY_BASED": 7, - "ADVERTISED": 101 - } - }, - "NextHopType": { - "values": { - "NEXT_HOP_TYPE_UNSPECIFIED": 0, - "NEXT_HOP_IP": 1, - "NEXT_HOP_INSTANCE": 2, - "NEXT_HOP_NETWORK": 3, - "NEXT_HOP_PEERING": 4, - "NEXT_HOP_INTERCONNECT": 5, - "NEXT_HOP_VPN_TUNNEL": 6, - "NEXT_HOP_VPN_GATEWAY": 7, - "NEXT_HOP_INTERNET_GATEWAY": 8, - "NEXT_HOP_BLACKHOLE": 9, - "NEXT_HOP_ILB": 10, - "NEXT_HOP_ROUTER_APPLIANCE": 11, - "NEXT_HOP_NCC_HUB": 12 - } - }, - "RouteScope": { - "values": { - "ROUTE_SCOPE_UNSPECIFIED": 0, - "NETWORK": 1, - "NCC_HUB": 2 - } - } - } - }, - "GoogleServiceInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "googleServiceType": { - "type": "GoogleServiceType", - "id": 2 - } - }, - "nested": { - "GoogleServiceType": { - "values": { - "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, - "IAP": 1, - "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, - "CLOUD_DNS": 3, - "GOOGLE_API": 4, - "GOOGLE_API_PSC": 5, - "GOOGLE_API_VPC_SC": 6 - } - } - } - }, - "ForwardingRuleInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedProtocol": { - "type": "string", - "id": 3 - }, - "matchedPortRange": { - "type": "string", - "id": 6 - }, - "vip": { - "type": "string", - "id": 4 - }, - "target": { - "type": "string", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "loadBalancerName": { - "type": "string", - "id": 9 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 10 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerInfo": { - "fields": { - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 1 - }, - "healthCheckUri": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "backends": { - "rule": "repeated", - "type": "LoadBalancerBackend", - "id": 3 - }, - "backendType": { - "type": "BackendType", - "id": 4 - }, - "backendUri": { - "type": "string", - "id": 5 - } - }, - "nested": { - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "INTERNAL_TCP_UDP": 1, - "NETWORK_TCP_UDP": 2, - "HTTP_PROXY": 3, - "TCP_PROXY": 4, - "SSL_PROXY": 5 - } - }, - "BackendType": { - "values": { - "BACKEND_TYPE_UNSPECIFIED": 0, - "BACKEND_SERVICE": 1, - "TARGET_POOL": 2, - "TARGET_INSTANCE": 3 - } - } - } - }, - "LoadBalancerBackend": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "healthCheckFirewallState": { - "type": "HealthCheckFirewallState", - "id": 3 - }, - "healthCheckAllowingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "healthCheckBlockingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "HealthCheckFirewallState": { - "values": { - "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, - "CONFIGURED": 1, - "MISCONFIGURED": 2 - } - } - } - }, - "VpnGatewayInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "ipAddress": { - "type": "string", - "id": 4 - }, - "vpnTunnelUri": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "VpnTunnelInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "sourceGateway": { - "type": "string", - "id": 3 - }, - "remoteGateway": { - "type": "string", - "id": 4 - }, - "remoteGatewayIp": { - "type": "string", - "id": 5 - }, - "sourceGatewayIp": { - "type": "string", - "id": 6 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "routingType": { - "type": "RoutingType", - "id": 9 - } - }, - "nested": { - "RoutingType": { - "values": { - "ROUTING_TYPE_UNSPECIFIED": 0, - "ROUTE_BASED": 1, - "POLICY_BASED": 2, - "DYNAMIC": 3 - } - } - } - }, - "EndpointInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "destinationIp": { - "type": "string", - "id": 2 - }, - "protocol": { - "type": "string", - "id": 3 - }, - "sourcePort": { - "type": "int32", - "id": 4 - }, - "destinationPort": { - "type": "int32", - "id": 5 - }, - "sourceNetworkUri": { - "type": "string", - "id": 6 - }, - "destinationNetworkUri": { - "type": "string", - "id": 7 - }, - "sourceAgentUri": { - "type": "string", - "id": 8 - } - } - }, - "DeliverInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "storageBucket": { - "type": "string", - "id": 4 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Target": { - "values": { - "TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "INTERNET": 2, - "GOOGLE_API": 3, - "GKE_MASTER": 4, - "CLOUD_SQL_INSTANCE": 5, - "PSC_PUBLISHED_SERVICE": 6, - "PSC_GOOGLE_API": 7, - "PSC_VPC_SC": 8, - "SERVERLESS_NEG": 9, - "STORAGE_BUCKET": 10, - "PRIVATE_NETWORK": 11, - "CLOUD_FUNCTION": 12, - "APP_ENGINE_VERSION": 13, - "CLOUD_RUN_REVISION": 14, - "GOOGLE_MANAGED_SERVICE": 15, - "REDIS_INSTANCE": 16, - "REDIS_CLUSTER": 17 - } - } - } - }, - "ForwardInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - } - }, - "nested": { - "Target": { - "valuesOptions": { - "GKE_MASTER": { - "deprecated": true - }, - "CLOUD_SQL_INSTANCE": { - "deprecated": true - } - }, - "values": { - "TARGET_UNSPECIFIED": 0, - "PEERING_VPC": 1, - "VPN_GATEWAY": 2, - "INTERCONNECT": 3, - "GKE_MASTER": 4, - "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, - "CLOUD_SQL_INSTANCE": 6, - "ANOTHER_PROJECT": 7, - "NCC_HUB": 8, - "ROUTER_APPLIANCE": 9 - } - } - } - }, - "AbortInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "projectsMissingPermission": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Cause": { - "valuesOptions": { - "UNKNOWN_NETWORK": { - "deprecated": true - }, - "UNKNOWN_PROJECT": { - "deprecated": true - }, - "NO_EXTERNAL_IP": { - "deprecated": true - }, - "UNINTENDED_DESTINATION": { - "deprecated": true - }, - "SOURCE_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_SOURCE_NETWORK": { - "deprecated": true - }, - "DESTINATION_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_DESTINATION_NETWORK": { - "deprecated": true - } - }, - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_NETWORK": 1, - "UNKNOWN_PROJECT": 3, - "NO_EXTERNAL_IP": 7, - "UNINTENDED_DESTINATION": 8, - "SOURCE_ENDPOINT_NOT_FOUND": 11, - "MISMATCHED_SOURCE_NETWORK": 12, - "DESTINATION_ENDPOINT_NOT_FOUND": 13, - "MISMATCHED_DESTINATION_NETWORK": 14, - "UNKNOWN_IP": 2, - "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, - "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, - "PERMISSION_DENIED": 4, - "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, - "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, - "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, - "NO_SOURCE_LOCATION": 5, - "INVALID_ARGUMENT": 6, - "TRACE_TOO_LONG": 9, - "INTERNAL_ERROR": 10, - "UNSUPPORTED": 15, - "MISMATCHED_IP_VERSION": 16, - "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, - "RESOURCE_CONFIG_NOT_FOUND": 18, - "VM_INSTANCE_CONFIG_NOT_FOUND": 24, - "NETWORK_CONFIG_NOT_FOUND": 25, - "FIREWALL_CONFIG_NOT_FOUND": 26, - "ROUTE_CONFIG_NOT_FOUND": 27, - "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, - "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, - "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, - "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, - "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, - "NON_ROUTABLE_IP_ADDRESS": 22, - "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, - "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 - } - } - } - }, - "DropInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "sourceIp": { - "type": "string", - "id": 3 - }, - "destinationIp": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Cause": { - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_EXTERNAL_ADDRESS": 1, - "FOREIGN_IP_DISALLOWED": 2, - "FIREWALL_RULE": 3, - "NO_ROUTE": 4, - "ROUTE_BLACKHOLE": 5, - "ROUTE_WRONG_NETWORK": 6, - "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, - "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, - "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, - "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, - "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, - "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, - "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, - "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, - "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, - "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, - "PRIVATE_TRAFFIC_TO_INTERNET": 7, - "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, - "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, - "NO_EXTERNAL_ADDRESS": 9, - "UNKNOWN_INTERNAL_ADDRESS": 10, - "FORWARDING_RULE_MISMATCH": 11, - "FORWARDING_RULE_NO_INSTANCES": 12, - "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, - "INSTANCE_NOT_RUNNING": 14, - "GKE_CLUSTER_NOT_RUNNING": 27, - "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, - "REDIS_INSTANCE_NOT_RUNNING": 68, - "REDIS_CLUSTER_NOT_RUNNING": 69, - "TRAFFIC_TYPE_BLOCKED": 15, - "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, - "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, - "DROPPED_INSIDE_GKE_SERVICE": 18, - "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, - "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, - "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, - "GKE_PSC_ENDPOINT_MISSING": 36, - "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, - "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, - "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, - "GKE_CONTROL_PLANE_NO_ROUTE": 32, - "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, - "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, - "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, - "CLOUD_SQL_CONNECTOR_REQUIRED": 63, - "CLOUD_FUNCTION_NOT_ACTIVE": 22, - "VPC_CONNECTOR_NOT_SET": 23, - "VPC_CONNECTOR_NOT_RUNNING": 24, - "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, - "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, - "FORWARDING_RULE_REGION_MISMATCH": 25, - "PSC_CONNECTION_NOT_ACCEPTED": 26, - "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, - "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, - "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, - "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, - "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, - "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, - "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, - "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, - "CLOUD_RUN_REVISION_NOT_READY": 29, - "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, - "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, - "CLOUD_NAT_NO_ADDRESSES": 40, - "ROUTING_LOOP": 59, - "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, - "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, - "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, - "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, - "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, - "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, - "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, - "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, - "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, - "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, - "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, - "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, - "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, - "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, - "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, - "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, - "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, - "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 - } - } - } - }, - "GKEMasterInfo": { - "fields": { - "clusterUri": { - "type": "string", - "id": 2 - }, - "clusterNetworkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "dnsEndpoint": { - "type": "string", - "id": 7 - } - } - }, - "CloudSQLInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "region": { - "type": "string", - "id": 7 - } - } - }, - "RedisInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "primaryEndpointIp": { - "type": "string", - "id": 4 - }, - "readEndpointIp": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "RedisClusterInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "discoveryEndpointIpAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "secondaryEndpointIpAddress": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "location": { - "type": "string", - "id": 6 - } - } - }, - "CloudFunctionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - }, - "versionId": { - "type": "int64", - "id": 4 - } - } - }, - "CloudRunRevisionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 4 - }, - "serviceUri": { - "type": "string", - "id": 5 - } - } - }, - "AppEngineVersionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "runtime": { - "type": "string", - "id": 3 - }, - "environment": { - "type": "string", - "id": 4 - } - } - }, - "VpcConnectorInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - } - } - }, - "NatInfo": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "protocol": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "oldSourceIp": { - "type": "string", - "id": 4 - }, - "newSourceIp": { - "type": "string", - "id": 5 - }, - "oldDestinationIp": { - "type": "string", - "id": 6 - }, - "newDestinationIp": { - "type": "string", - "id": 7 - }, - "oldSourcePort": { - "type": "int32", - "id": 8 - }, - "newSourcePort": { - "type": "int32", - "id": 9 - }, - "oldDestinationPort": { - "type": "int32", - "id": 10 - }, - "newDestinationPort": { - "type": "int32", - "id": 11 - }, - "routerUri": { - "type": "string", - "id": 12 - }, - "natGatewayName": { - "type": "string", - "id": 13 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "INTERNAL_TO_EXTERNAL": 1, - "EXTERNAL_TO_INTERNAL": 2, - "CLOUD_NAT": 3, - "PRIVATE_SERVICE_CONNECT": 4 - } - } - } - }, - "ProxyConnectionInfo": { - "fields": { - "protocol": { - "type": "string", - "id": 1 - }, - "oldSourceIp": { - "type": "string", - "id": 2 - }, - "newSourceIp": { - "type": "string", - "id": 3 - }, - "oldDestinationIp": { - "type": "string", - "id": 4 - }, - "newDestinationIp": { - "type": "string", - "id": 5 - }, - "oldSourcePort": { - "type": "int32", - "id": 6 - }, - "newSourcePort": { - "type": "int32", - "id": 7 - }, - "oldDestinationPort": { - "type": "int32", - "id": 8 - }, - "newDestinationPort": { - "type": "int32", - "id": 9 - }, - "subnetUri": { - "type": "string", - "id": 10 - }, - "networkUri": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerBackendInfo": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "instanceUri": { - "type": "string", - "id": 2 - }, - "backendServiceUri": { - "type": "string", - "id": 3 - }, - "instanceGroupUri": { - "type": "string", - "id": 4 - }, - "networkEndpointGroupUri": { - "type": "string", - "id": 5 - }, - "backendBucketUri": { - "type": "string", - "id": 8 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 9 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 10 - }, - "healthCheckUri": { - "type": "string", - "id": 6 - }, - "healthCheckFirewallsConfigState": { - "type": "HealthCheckFirewallsConfigState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "HealthCheckFirewallsConfigState": { - "values": { - "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, - "FIREWALLS_CONFIGURED": 1, - "FIREWALLS_PARTIALLY_CONFIGURED": 2, - "FIREWALLS_NOT_CONFIGURED": 3, - "FIREWALLS_UNSUPPORTED": 4 - } - } - } - }, - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "HTTPS_ADVANCED_LOAD_BALANCER": 1, - "HTTPS_LOAD_BALANCER": 2, - "REGIONAL_HTTPS_LOAD_BALANCER": 3, - "INTERNAL_HTTPS_LOAD_BALANCER": 4, - "SSL_PROXY_LOAD_BALANCER": 5, - "TCP_PROXY_LOAD_BALANCER": 6, - "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, - "NETWORK_LOAD_BALANCER": 8, - "LEGACY_NETWORK_LOAD_BALANCER": 9, - "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 - } - }, - "StorageBucketInfo": { - "fields": { - "bucket": { - "type": "string", - "id": 1 - } - } - }, - "ServerlessNegInfo": { - "fields": { - "negUri": { - "type": "string", - "id": 1 - } - } - }, - "ReachabilityService": { - "options": { - "(google.api.default_host)": "networkmanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListConnectivityTests": { - "requestType": "ListConnectivityTestsRequest", - "responseType": "ListConnectivityTestsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - } - } - ] - }, - "GetConnectivityTest": { - "requestType": "GetConnectivityTestRequest", - "responseType": "ConnectivityTest", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - } - } - ] - }, - "CreateConnectivityTest": { - "requestType": "CreateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", - "(google.api.http).body": "resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", - "body": "resource" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateConnectivityTest": { - "requestType": "UpdateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "(google.api.http).body": "resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "body": "resource" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RerunConnectivityTest": { - "requestType": "RerunConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteConnectivityTest": { - "requestType": "DeleteConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "ListConnectivityTestsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListConnectivityTestsResponse": { - "fields": { - "resources": { - "rule": "repeated", - "type": "ConnectivityTest", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "CreateConnectivityTestRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "testId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateConnectivityTestRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "RerunConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "target": { - "type": "string", - "id": 3 - }, - "verb": { - "type": "string", - "id": 4 - }, - "statusDetail": { - "type": "string", - "id": 5 - }, - "cancelRequested": { - "type": "bool", - "id": 6 - }, - "apiVersion": { - "type": "string", - "id": 7 - } - } - }, - "VpcFlowLogsService": { - "options": { - "(google.api.default_host)": "networkmanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListVpcFlowLogsConfigs": { - "requestType": "ListVpcFlowLogsConfigsRequest", - "responseType": "ListVpcFlowLogsConfigsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetVpcFlowLogsConfig": { - "requestType": "GetVpcFlowLogsConfigRequest", - "responseType": "VpcFlowLogsConfig", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateVpcFlowLogsConfig": { - "requestType": "CreateVpcFlowLogsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", - "(google.api.http).body": "vpc_flow_logs_config", - "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id", - "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", - "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", - "body": "vpc_flow_logs_config" - } - }, - { - "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "VpcFlowLogsConfig", - "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - } - } - ] - }, - "UpdateVpcFlowLogsConfig": { - "requestType": "UpdateVpcFlowLogsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "(google.api.http).body": "vpc_flow_logs_config", - "(google.api.method_signature)": "vpc_flow_logs_config,update_mask", - "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", - "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "body": "vpc_flow_logs_config" - } - }, - { - "(google.api.method_signature)": "vpc_flow_logs_config,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "VpcFlowLogsConfig", - "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - } - } - ] - }, - "DeleteVpcFlowLogsConfig": { - "requestType": "DeleteVpcFlowLogsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - } - } - ] - } - } - }, - "ListVpcFlowLogsConfigsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - }, - "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" - } - } - } - }, - "ListVpcFlowLogsConfigsResponse": { - "fields": { - "vpcFlowLogsConfigs": { - "rule": "repeated", - "type": "VpcFlowLogsConfig", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetVpcFlowLogsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - } - } - }, - "CreateVpcFlowLogsConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - }, - "vpcFlowLogsConfigId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - }, - "vpcFlowLogsConfig": { - "type": "VpcFlowLogsConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateVpcFlowLogsConfigRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "vpcFlowLogsConfig": { - "type": "VpcFlowLogsConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteVpcFlowLogsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - } - } - }, - "VpcFlowLogsConfig": { - "options": { - "(google.api.resource).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}", - "(google.api.resource).plural": "vpcFlowLogsConfigs", - "(google.api.resource).singular": "vpcFlowLogsConfig" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_state": { - "oneof": [ - "state" - ] - }, - "_aggregationInterval": { - "oneof": [ - "aggregationInterval" - ] - }, - "_flowSampling": { - "oneof": [ - "flowSampling" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_filterExpr": { - "oneof": [ - "filterExpr" - ] - }, - "targetResource": { - "oneof": [ - "interconnectAttachment", - "vpnTunnel" - ] - } - }, - "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 - } - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "aggregationInterval": { - "type": "AggregationInterval", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "flowSampling": { - "type": "float", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadata": { - "type": "Metadata", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadataFields": { - "rule": "repeated", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filterExpr": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "interconnectAttachment": { - "type": "string", - "id": 102 - }, - "vpnTunnel": { - "type": "string", - "id": 103 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2 - } - }, - "AggregationInterval": { - "values": { - "AGGREGATION_INTERVAL_UNSPECIFIED": 0, - "INTERVAL_5_SEC": 1, - "INTERVAL_30_SEC": 2, - "INTERVAL_1_MIN": 3, - "INTERVAL_5_MIN": 4, - "INTERVAL_10_MIN": 5, - "INTERVAL_15_MIN": 6 - } - }, - "Metadata": { - "values": { - "METADATA_UNSPECIFIED": 0, - "INCLUDE_ALL_METADATA": 1, - "EXCLUDE_ALL_METADATA": 2, - "CUSTOM_METADATA": 3 - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - } - } - }, - "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 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js deleted file mode 100644 index 05458c89c11..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js +++ /dev/null @@ -1,79 +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, testId, resource) { - // [START networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - */ - // const testId = 'abc123' - /** - * Required. A `ConnectivityTest` resource - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callCreateConnectivityTest() { - // Construct request - const request = { - parent, - testId, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.createConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js deleted file mode 100644 index 22a9e8e6bcc..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callDeleteConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.deleteConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js deleted file mode 100644 index 136815a174a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.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 networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callGetConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await networkmanagementClient.getConnectivityTest(request); - console.log(response); - } - - callGetConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js deleted file mode 100644 index 0f13d2d7bd8..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.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(parent) { - // [START networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Number of `ConnectivityTests` to return. - */ - // const pageSize = 1234 - /** - * Page token from an earlier query, as returned in `next_page_token`. - */ - // const pageToken = 'abc123' - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callListConnectivityTests() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = networkmanagementClient.listConnectivityTestsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListConnectivityTests(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js deleted file mode 100644 index 060a9e295e1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callRerunConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.rerunConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRerunConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js deleted file mode 100644 index f6925cd1908..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js +++ /dev/null @@ -1,68 +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, resource) { - // [START networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. Only fields specified in update_mask are updated. - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callUpdateConnectivityTest() { - // Construct request - const request = { - updateMask, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.updateConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json deleted file mode 100644 index 526ea089821..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json +++ /dev/null @@ -1,511 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-networkmanagement", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.networkmanagement.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async", - "title": "ReachabilityService listConnectivityTests Sample", - "origin": "API_DEFINITION", - "description": " Lists all Connectivity Tests owned by a project.", - "canonical": true, - "file": "reachability_service.list_connectivity_tests.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", - "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.networkmanagement.v1beta1.ListConnectivityTestsResponse", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async", - "title": "ReachabilityService getConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific Connectivity Test.", - "canonical": true, - "file": "reachability_service.get_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async", - "title": "ReachabilityService createConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", - "canonical": true, - "file": "reachability_service.create_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "test_id", - "type": "TYPE_STRING" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async", - "title": "ReachabilityService updateConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", - "canonical": true, - "file": "reachability_service.update_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async", - "title": "ReachabilityService rerunConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", - "canonical": true, - "file": "reachability_service.rerun_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async", - "title": "ReachabilityService deleteConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific `ConnectivityTest`.", - "canonical": true, - "file": "reachability_service.delete_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async", - "title": "ReachabilityService listVpcFlowLogsConfigs Sample", - "origin": "API_DEFINITION", - "description": " Lists all `VpcFlowLogsConfigs` in a given project.", - "canonical": true, - "file": "vpc_flow_logs_service.list_vpc_flow_logs_configs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListVpcFlowLogsConfigs", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", - "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.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "ListVpcFlowLogsConfigs", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async", - "title": "ReachabilityService getVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific `VpcFlowLogsConfig`.", - "canonical": true, - "file": "vpc_flow_logs_service.get_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "GetVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async", - "title": "ReachabilityService createVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", - "canonical": true, - "file": "vpc_flow_logs_service.create_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "vpc_flow_logs_config_id", - "type": "TYPE_STRING" - }, - { - "name": "vpc_flow_logs_config", - "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "CreateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async", - "title": "ReachabilityService updateVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", - "canonical": true, - "file": "vpc_flow_logs_service.update_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "vpc_flow_logs_config", - "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "UpdateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async", - "title": "ReachabilityService deleteVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific `VpcFlowLogsConfig`.", - "canonical": true, - "file": "vpc_flow_logs_service.delete_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "DeleteVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js deleted file mode 100644 index be3d5827f4b..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js +++ /dev/null @@ -1,73 +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, vpcFlowLogsConfigId, vpcFlowLogsConfig) { - // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the VPC Flow Logs configuration to create: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Required. ID of the `VpcFlowLogsConfig`. - */ - // const vpcFlowLogsConfigId = 'abc123' - /** - * Required. A `VpcFlowLogsConfig` resource - */ - // const vpcFlowLogsConfig = {} - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callCreateVpcFlowLogsConfig() { - // Construct request - const request = { - parent, - vpcFlowLogsConfigId, - vpcFlowLogsConfig, - }; - - // Run request - const [operation] = await networkmanagementClient.createVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js deleted file mode 100644 index 5c029e6248c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callDeleteVpcFlowLogsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.deleteVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js deleted file mode 100644 index 7fca2193c11..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.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 networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callGetVpcFlowLogsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await networkmanagementClient.getVpcFlowLogsConfig(request); - console.log(response); - } - - callGetVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js deleted file mode 100644 index 79caacd62bf..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js +++ /dev/null @@ -1,83 +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 networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Optional. Number of `VpcFlowLogsConfigs` to return. - */ - // const pageSize = 1234 - /** - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - */ - // const pageToken = 'abc123' - /** - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported CEL logic operators - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - */ - // const filter = 'abc123' - /** - * Optional. Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callListVpcFlowLogsConfigs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = networkmanagementClient.listVpcFlowLogsConfigsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListVpcFlowLogsConfigs(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js deleted file mode 100644 index ee3fbc9e1fb..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js +++ /dev/null @@ -1,68 +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, vpcFlowLogsConfig) { - // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. Only fields specified in update_mask are updated. - */ - // const vpcFlowLogsConfig = {} - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callUpdateVpcFlowLogsConfig() { - // Construct request - const request = { - updateMask, - vpcFlowLogsConfig, - }; - - // Run request - const [operation] = await networkmanagementClient.updateVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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-networkmanagement/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts deleted file mode 100644 index cdc6c3b552c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts +++ /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. ** - -import * as v1beta1 from './v1beta1'; -const ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; -type ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; -const VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; -type VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; -export {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; -export default {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json deleted file mode 100644 index 8318960dbe5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.networkmanagement.v1beta1", - "libraryPackage": "@google-cloud/network-management", - "services": { - "ReachabilityService": { - "clients": { - "grpc": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - } - } - }, - "VpcFlowLogsService": { - "clients": { - "grpc": { - "libraryClient": "VpcFlowLogsServiceClient", - "rpcs": { - "GetVpcFlowLogsConfig": { - "methods": [ - "getVpcFlowLogsConfig" - ] - }, - "CreateVpcFlowLogsConfig": { - "methods": [ - "createVpcFlowLogsConfig" - ] - }, - "UpdateVpcFlowLogsConfig": { - "methods": [ - "updateVpcFlowLogsConfig" - ] - }, - "DeleteVpcFlowLogsConfig": { - "methods": [ - "deleteVpcFlowLogsConfig" - ] - }, - "ListVpcFlowLogsConfigs": { - "methods": [ - "listVpcFlowLogsConfigs", - "listVpcFlowLogsConfigsStream", - "listVpcFlowLogsConfigsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "VpcFlowLogsServiceClient", - "rpcs": { - "GetVpcFlowLogsConfig": { - "methods": [ - "getVpcFlowLogsConfig" - ] - }, - "CreateVpcFlowLogsConfig": { - "methods": [ - "createVpcFlowLogsConfig" - ] - }, - "UpdateVpcFlowLogsConfig": { - "methods": [ - "updateVpcFlowLogsConfig" - ] - }, - "DeleteVpcFlowLogsConfig": { - "methods": [ - "deleteVpcFlowLogsConfig" - ] - }, - "ListVpcFlowLogsConfigs": { - "methods": [ - "listVpcFlowLogsConfigs", - "listVpcFlowLogsConfigsStream", - "listVpcFlowLogsConfigsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts deleted file mode 100644 index f8ad762c8da..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts +++ /dev/null @@ -1,20 +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 {ReachabilityServiceClient} from './reachability_service_client'; -export {VpcFlowLogsServiceClient} from './vpc_flow_logs_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts deleted file mode 100644 index b0e51c2f99b..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts +++ /dev/null @@ -1,1647 +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/v1beta1/reachability_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './reachability_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The Reachability service in the Google Cloud Network Management API provides - * services that analyze the reachability within a single Google Virtual Private - * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - * networks, or between VPC networks and internet hosts. A reachability analysis - * is based on Google Cloud network configurations. - * - * You can use the analysis results to verify these configurations and - * to troubleshoot connectivity issues. - * @class - * @memberof v1beta1 - */ -export class ReachabilityServiceClient { - 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; - reachabilityServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ReachabilityServiceClient. - * - * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; - 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 = 'networkmanagement.' + 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 = { - connectivityTestPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/global/connectivityTests/{test}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' - ), - }; - - // 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 = { - listConnectivityTests: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') - }; - - 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; - const createConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const updateConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; - const updateConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const rerunConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; - const rerunConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const deleteConnectivityTestResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), - createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), - updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), - updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), - rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), - rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), - deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), - deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.networkmanagement.v1beta1.ReachabilityService', 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.reachabilityServiceStub) { - return this.reachabilityServiceStub; - } - - // Put together the "service stub" for - // google.cloud.networkmanagement.v1beta1.ReachabilityService. - this.reachabilityServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.ReachabilityService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.networkmanagement.v1beta1.ReachabilityService, - 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 reachabilityServiceStubMethods = - ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; - for (const methodName of reachabilityServiceStubMethods) { - const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; - } - - /** - * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. - * 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/v1beta1/reachability_service.get_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async - */ - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|undefined, {}|undefined - ]>; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); - } - -/** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param {string} request.testId - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource - * Required. A `ConnectivityTest` 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 - * 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/v1beta1/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async - */ - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - 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.createConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createConnectivityTest()`. - * @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/v1beta1/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async - */ - async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for more details. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource - * Required. Only fields specified in update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - 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({ - 'resource.name': request.resource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateConnectivityTest()`. - * @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/v1beta1/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async - */ - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - 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.rerunConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `rerunConnectivityTest()`. - * @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/v1beta1/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async - */ - async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific `ConnectivityTest`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - 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.deleteConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteConnectivityTest()`. - * @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/v1beta1/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all Connectivity Tests owned by a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. - * 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse - ]>; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>, - callback?: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTestsStream( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.createStream( - this.innerApiCalls.listConnectivityTests as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listConnectivityTests`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. 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/v1beta1/reachability_service.list_connectivity_tests.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async - */ - listConnectivityTestsAsync( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.asyncIterate( - this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. - * - * @param {string} project - * @param {string} test - * @returns {string} Resource name string. - */ - connectivityTestPath(project:string,test:string) { - return this.pathTemplates.connectivityTestPathTemplate.render({ - project: project, - test: test, - }); - } - - /** - * Parse the project from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; - } - - /** - * Parse the test from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the test. - */ - matchTestFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified vpcFlowLogsConfig resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} vpc_flow_logs_config - * @returns {string} Resource name string. - */ - vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ - project: project, - location: location, - vpc_flow_logs_config: vpcFlowLogsConfig, - }); - } - - /** - * Parse the project from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; - } - - /** - * Parse the location from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; - } - - /** - * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the vpc_flow_logs_config. - */ - matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; - } - - /** - * 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.reachabilityServiceStub && !this._terminated) { - return this.reachabilityServiceStub.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-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json deleted file mode 100644 index 0d2fd849ae5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1beta1.ReachabilityService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListConnectivityTests": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RerunConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json deleted file mode 100644 index 54de9f63455..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" -] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts deleted file mode 100644 index d69b58611c2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts +++ /dev/null @@ -1,1523 +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/v1beta1/vpc_flow_logs_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './vpc_flow_logs_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The VPC Flow Logs service in the Google Cloud Network Management API provides - * configurations that generate Flow Logs. The service and the configuration - * resources created using this service are global. - * @class - * @memberof v1beta1 - */ -export class VpcFlowLogsServiceClient { - 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; - vpcFlowLogsServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of VpcFlowLogsServiceClient. - * - * @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 VpcFlowLogsServiceClient({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 VpcFlowLogsServiceClient; - 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 = 'networkmanagement.' + 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 = { - connectivityTestPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/global/connectivityTests/{test}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' - ), - }; - - // 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 = { - listVpcFlowLogsConfigs: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'vpcFlowLogsConfigs') - }; - - 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createVpcFlowLogsConfigResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; - const createVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const updateVpcFlowLogsConfigResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; - const updateVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const deleteVpcFlowLogsConfigResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createVpcFlowLogsConfigResponse.decode.bind(createVpcFlowLogsConfigResponse), - createVpcFlowLogsConfigMetadata.decode.bind(createVpcFlowLogsConfigMetadata)), - updateVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateVpcFlowLogsConfigResponse.decode.bind(updateVpcFlowLogsConfigResponse), - updateVpcFlowLogsConfigMetadata.decode.bind(updateVpcFlowLogsConfigMetadata)), - deleteVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteVpcFlowLogsConfigResponse.decode.bind(deleteVpcFlowLogsConfigResponse), - deleteVpcFlowLogsConfigMetadata.decode.bind(deleteVpcFlowLogsConfigMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.networkmanagement.v1beta1.VpcFlowLogsService', 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.vpcFlowLogsServiceStub) { - return this.vpcFlowLogsServiceStub; - } - - // Put together the "service stub" for - // google.cloud.networkmanagement.v1beta1.VpcFlowLogsService. - this.vpcFlowLogsServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.VpcFlowLogsService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.networkmanagement.v1beta1.VpcFlowLogsService, - 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 vpcFlowLogsServiceStubMethods = - ['listVpcFlowLogsConfigs', 'getVpcFlowLogsConfig', 'createVpcFlowLogsConfig', 'updateVpcFlowLogsConfig', 'deleteVpcFlowLogsConfig']; - for (const methodName of vpcFlowLogsServiceStubMethods) { - const callPromise = this.vpcFlowLogsServiceStub.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.vpcFlowLogsServiceStub; - } - - /** - * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific `VpcFlowLogsConfig`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. - * 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/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async - */ - getVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|undefined, {}|undefined - ]>; - getVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>): void; - getVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>): void; - getVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|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.getVpcFlowLogsConfig(request, options, callback); - } - -/** - * Creates a new `VpcFlowLogsConfig`. - * If a configuration with the exact same settings already exists (even if the - * ID is different), the creation fails. - * Notes: - * 1. Creating a configuration with state=DISABLED will fail. - * 2. The following fields are not considrered as `settings` for the purpose - * of the check mentioned above, therefore - creating another configuration - * with the same fields but different values for the following fields will - * fail as well: - * - name - * - create_time - * - update_time - * - labels - * - description - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VPC Flow Logs configuration to create: - * `projects/{project_id}/locations/global` - * @param {string} request.vpcFlowLogsConfigId - * Required. ID of the `VpcFlowLogsConfig`. - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig - * Required. A `VpcFlowLogsConfig` 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 - * 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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async - */ - createVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - 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.createVpcFlowLogsConfig(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createVpcFlowLogsConfig()`. - * @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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async - */ - async checkCreateVpcFlowLogsConfigProgress(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.createVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an existing `VpcFlowLogsConfig`. - * If a configuration with the exact same settings already exists (even if the - * ID is different), the creation fails. - * Notes: - * 1. The following fields are not considrered as `settings` for the purpose - * of the check mentioned above, therefore - updating another configuration - * with the same fields but different values for the following fields will - * fail as well: - * - name - * - create_time - * - update_time - * - labels - * - description - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig - * Required. Only fields specified in update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async - */ - updateVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - 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({ - 'vpc_flow_logs_config.name': request.vpcFlowLogsConfig!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateVpcFlowLogsConfig(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateVpcFlowLogsConfig()`. - * @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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async - */ - async checkUpdateVpcFlowLogsConfigProgress(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.updateVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific `VpcFlowLogsConfig`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async - */ - deleteVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - 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.deleteVpcFlowLogsConfig(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteVpcFlowLogsConfig()`. - * @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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async - */ - async checkDeleteVpcFlowLogsConfigProgress(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.deleteVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all `VpcFlowLogsConfigs` in a given project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - * @param {number} [request.pageSize] - * Optional. Number of `VpcFlowLogsConfigs` to return. - * @param {string} [request.pageToken] - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - * @param {string} [request.filter] - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported [CEL logic operators] - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. - * 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 `listVpcFlowLogsConfigsAsync()` - * 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. - */ - listVpcFlowLogsConfigs( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse - ]>; - listVpcFlowLogsConfigs( - request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; - listVpcFlowLogsConfigs( - request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; - listVpcFlowLogsConfigs( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>, - callback?: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listVpcFlowLogsConfigs(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - * @param {number} [request.pageSize] - * Optional. Number of `VpcFlowLogsConfigs` to return. - * @param {string} [request.pageToken] - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - * @param {string} [request.filter] - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported [CEL logic operators] - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig} 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 `listVpcFlowLogsConfigsAsync()` - * 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. - */ - listVpcFlowLogsConfigsStream( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - 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['listVpcFlowLogsConfigs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listVpcFlowLogsConfigs.createStream( - this.innerApiCalls.listVpcFlowLogsConfigs as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listVpcFlowLogsConfigs`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - * @param {number} [request.pageSize] - * Optional. Number of `VpcFlowLogsConfigs` to return. - * @param {string} [request.pageToken] - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - * @param {string} [request.filter] - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported [CEL logic operators] - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. 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/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async - */ - listVpcFlowLogsConfigsAsync( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - 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['listVpcFlowLogsConfigs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listVpcFlowLogsConfigs.asyncIterate( - this.innerApiCalls['listVpcFlowLogsConfigs'] 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 connectivityTest resource name string. - * - * @param {string} project - * @param {string} test - * @returns {string} Resource name string. - */ - connectivityTestPath(project:string,test:string) { - return this.pathTemplates.connectivityTestPathTemplate.render({ - project: project, - test: test, - }); - } - - /** - * Parse the project from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; - } - - /** - * Parse the test from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the test. - */ - matchTestFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; - } - - /** - * 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 project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified vpcFlowLogsConfig resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} vpc_flow_logs_config - * @returns {string} Resource name string. - */ - vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ - project: project, - location: location, - vpc_flow_logs_config: vpcFlowLogsConfig, - }); - } - - /** - * Parse the project from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; - } - - /** - * Parse the location from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; - } - - /** - * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the vpc_flow_logs_config. - */ - matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; - } - - /** - * 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.vpcFlowLogsServiceStub && !this._terminated) { - return this.vpcFlowLogsServiceStub.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-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json deleted file mode 100644 index fd883cb5ab0..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListVpcFlowLogsConfigs": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json deleted file mode 100644 index 54de9f63455..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" -] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index c429b7bd73d..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,28 +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 networkmanagement = require('@google-cloud/network-management'); - -function main() { - const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); - const vpcFlowLogsServiceClient = new networkmanagement.VpcFlowLogsServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 6ec4f20b4c2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,38 +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 {ReachabilityServiceClient, VpcFlowLogsServiceClient} from '@google-cloud/network-management'; - -// check that the client class type name can be used -function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { - client.close(); -} -function doStuffWithVpcFlowLogsServiceClient(client: VpcFlowLogsServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const reachabilityServiceClient = new ReachabilityServiceClient(); - doStuffWithReachabilityServiceClient(reachabilityServiceClient); - // check that the client instance can be created - const vpcFlowLogsServiceClient = new VpcFlowLogsServiceClient(); - doStuffWithVpcFlowLogsServiceClient(vpcFlowLogsServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts deleted file mode 100644 index 279ec3242ac..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts +++ /dev/null @@ -1,2064 +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 reachabilityserviceModule 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('v1beta1.ReachabilityServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - 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 = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.servicePath; - assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - await client.initialize(); - assert(client.reachabilityServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.reachabilityServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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('getConnectivityTest', () => { - it('invokes getConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); - const [response] = await client.getConnectivityTest(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConnectivityTest( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with closed client', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConnectivityTest(request), expectedError); - }); - }); - - describe('createConnectivityTest', () => { - it('invokes createConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createConnectivityTest( - 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.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateConnectivityTest', () => { - it('invokes updateConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateConnectivityTest( - 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.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('rerunConnectivityTest', () => { - it('invokes rerunConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.rerunConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rerunConnectivityTest( - 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.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.rerunConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.rerunConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRerunConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRerunConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteConnectivityTest', () => { - it('invokes deleteConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteConnectivityTest( - 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.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listConnectivityTests', () => { - it('invokes listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectivityTests(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listConnectivityTests( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listConnectivityTests(request), expectedError); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTestsStream without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { - 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.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listConnectivityTestsStream with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; - const iterable = client.listConnectivityTestsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectivityTestsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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('connectivityTest', () => { - const fakePath = "/rendered/path/connectivityTest"; - const expectedParameters = { - project: "projectValue", - test: "testValue", - }; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectivityTestPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectivityTestPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectivityTestPath', () => { - const result = client.connectivityTestPath("projectValue", "testValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectivityTestName', () => { - const result = client.matchProjectFromConnectivityTestName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTestFromConnectivityTestName', () => { - const result = client.matchTestFromConnectivityTestName(fakePath); - assert.strictEqual(result, "testValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('vpcFlowLogsConfig', () => { - const fakePath = "/rendered/path/vpcFlowLogsConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - vpc_flow_logs_config: "vpcFlowLogsConfigValue", - }; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('vpcFlowLogsConfigPath', () => { - const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromVpcFlowLogsConfigName', () => { - const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromVpcFlowLogsConfigName', () => { - const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { - const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "vpcFlowLogsConfigValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts deleted file mode 100644 index e972bc7a15c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts +++ /dev/null @@ -1,1948 +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 vpcflowlogsserviceModule 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('v1beta1.VpcFlowLogsServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - 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 = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.servicePath; - assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); - await client.initialize(); - assert(client.vpcFlowLogsServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.vpcFlowLogsServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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('getVpcFlowLogsConfig', () => { - it('invokes getVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() - ); - client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getVpcFlowLogsConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() - ); - client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVpcFlowLogsConfig( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVpcFlowLogsConfig with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVpcFlowLogsConfig with closed client', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); - }); - }); - - describe('createVpcFlowLogsConfig', () => { - it('invokes createVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.createVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createVpcFlowLogsConfig( - 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.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVpcFlowLogsConfig with call error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVpcFlowLogsConfig with LRO error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createVpcFlowLogsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateVpcFlowLogsConfigProgress without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkCreateVpcFlowLogsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateVpcFlowLogsConfigProgress with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkCreateVpcFlowLogsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateVpcFlowLogsConfig', () => { - it('invokes updateVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateVpcFlowLogsConfig( - 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.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVpcFlowLogsConfig with call error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVpcFlowLogsConfig with LRO error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateVpcFlowLogsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateVpcFlowLogsConfigProgress without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkUpdateVpcFlowLogsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateVpcFlowLogsConfigProgress with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkUpdateVpcFlowLogsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteVpcFlowLogsConfig', () => { - it('invokes deleteVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteVpcFlowLogsConfig( - 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.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVpcFlowLogsConfig with call error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVpcFlowLogsConfig with LRO error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteVpcFlowLogsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteVpcFlowLogsConfigProgress without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkDeleteVpcFlowLogsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteVpcFlowLogsConfigProgress with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkDeleteVpcFlowLogsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listVpcFlowLogsConfigs', () => { - it('invokes listVpcFlowLogsConfigs without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(expectedResponse); - const [response] = await client.listVpcFlowLogsConfigs(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVpcFlowLogsConfigs without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listVpcFlowLogsConfigs( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVpcFlowLogsConfigs with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listVpcFlowLogsConfigs(request), expectedError); - const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVpcFlowLogsConfigsStream without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVpcFlowLogsConfigsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { - 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.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listVpcFlowLogsConfigsStream with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listVpcFlowLogsConfigsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVpcFlowLogsConfigs without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; - const iterable = client.listVpcFlowLogsConfigsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVpcFlowLogsConfigs with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVpcFlowLogsConfigsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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('connectivityTest', () => { - const fakePath = "/rendered/path/connectivityTest"; - const expectedParameters = { - project: "projectValue", - test: "testValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectivityTestPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectivityTestPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectivityTestPath', () => { - const result = client.connectivityTestPath("projectValue", "testValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectivityTestName', () => { - const result = client.matchProjectFromConnectivityTestName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTestFromConnectivityTestName', () => { - const result = client.matchTestFromConnectivityTestName(fakePath); - assert.strictEqual(result, "testValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('vpcFlowLogsConfig', () => { - const fakePath = "/rendered/path/vpcFlowLogsConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - vpc_flow_logs_config: "vpcFlowLogsConfigValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('vpcFlowLogsConfigPath', () => { - const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromVpcFlowLogsConfigName', () => { - const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromVpcFlowLogsConfigName', () => { - const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { - const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "vpcFlowLogsConfigValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js deleted file mode 100644 index d975be0ab73..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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: 'ReachabilityService', - filename: './reachability-service.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto index f19aa294008..a001077d66c 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -220,10 +220,16 @@ message Endpoint { optional LoadBalancerType load_balancer_type = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A cluster URI for [Google Kubernetes Engine - // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // A cluster URI for [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). string gke_master_cluster = 7; + // DNS endpoint of [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // Requires gke_master_cluster to be set, can't be used simultaneoulsly with + // ip_address or network. Applicable only to destination endpoint. + string fqdn = 19; + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. string cloud_sql_instance = 8; diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/trace.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/trace.proto index 8c772c7f0f4..b8169361686 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/trace.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1beta1/trace.proto @@ -1486,6 +1486,10 @@ message DropInfo { // Packet from the unknown peered network is dropped due to no known route // from the source network to the destination IP address. NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + + // Sending packets processed by the Private NAT Gateways to the Private + // Service Connect endpoints is not supported. + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; } // Cause that the packet is dropped. @@ -1513,11 +1517,14 @@ message GKEMasterInfo { // URI of a GKE cluster network. string cluster_network_uri = 4; - // Internal IP address of a GKE cluster master. + // Internal IP address of a GKE cluster control plane. string internal_ip = 5; - // External IP address of a GKE cluster master. + // External IP address of a GKE cluster control plane. string external_ip = 6; + + // DNS endpoint of a GKE cluster control plane. + string dns_endpoint = 7; } // For display only. Metadata associated with a Cloud SQL instance. diff --git a/packages/google-cloud-networkmanagement/protos/protos.d.ts b/packages/google-cloud-networkmanagement/protos/protos.d.ts index 9b204e55546..52dd5131da9 100644 --- a/packages/google-cloud-networkmanagement/protos/protos.d.ts +++ b/packages/google-cloud-networkmanagement/protos/protos.d.ts @@ -6907,6 +6907,9 @@ export namespace google { /** Endpoint gkeMasterCluster */ gkeMasterCluster?: (string|null); + /** Endpoint fqdn */ + fqdn?: (string|null); + /** Endpoint cloudSqlInstance */ cloudSqlInstance?: (string|null); @@ -6968,6 +6971,9 @@ export namespace google { /** Endpoint gkeMasterCluster. */ public gkeMasterCluster: string; + /** Endpoint fqdn. */ + public fqdn: string; + /** Endpoint cloudSqlInstance. */ public cloudSqlInstance: string; @@ -10712,7 +10718,8 @@ export namespace google { REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82 + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 } } @@ -10730,6 +10737,9 @@ export namespace google { /** GKEMasterInfo externalIp */ externalIp?: (string|null); + + /** GKEMasterInfo dnsEndpoint */ + dnsEndpoint?: (string|null); } /** Represents a GKEMasterInfo. */ @@ -10753,6 +10763,9 @@ export namespace google { /** GKEMasterInfo externalIp. */ public externalIp: string; + /** GKEMasterInfo dnsEndpoint. */ + public dnsEndpoint: string; + /** * Creates a new GKEMasterInfo instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-networkmanagement/protos/protos.js b/packages/google-cloud-networkmanagement/protos/protos.js index 00db996335c..b1dcdb37210 100644 --- a/packages/google-cloud-networkmanagement/protos/protos.js +++ b/packages/google-cloud-networkmanagement/protos/protos.js @@ -19486,6 +19486,7 @@ * @property {string|null} [loadBalancerId] Endpoint loadBalancerId * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster + * @property {string|null} [fqdn] Endpoint fqdn * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance * @property {string|null} [redisInstance] Endpoint redisInstance * @property {string|null} [redisCluster] Endpoint redisCluster @@ -19576,6 +19577,14 @@ */ Endpoint.prototype.gkeMasterCluster = ""; + /** + * Endpoint fqdn. + * @member {string} fqdn + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.fqdn = ""; + /** * Endpoint cloudSqlInstance. * @member {string} cloudSqlInstance @@ -19742,6 +19751,8 @@ writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); + if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); return writer; }; @@ -19808,6 +19819,10 @@ message.gkeMasterCluster = reader.string(); break; } + case 19: { + message.fqdn = reader.string(); + break; + } case 8: { message.cloudSqlInstance = reader.string(); break; @@ -19932,6 +19947,9 @@ if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) if (!$util.isString(message.gkeMasterCluster)) return "gkeMasterCluster: string expected"; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + if (!$util.isString(message.fqdn)) + return "fqdn: string expected"; if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) if (!$util.isString(message.cloudSqlInstance)) return "cloudSqlInstance: string expected"; @@ -20078,6 +20096,8 @@ } if (object.gkeMasterCluster != null) message.gkeMasterCluster = String(object.gkeMasterCluster); + if (object.fqdn != null) + message.fqdn = String(object.fqdn); if (object.cloudSqlInstance != null) message.cloudSqlInstance = String(object.cloudSqlInstance); if (object.redisInstance != null) @@ -20154,6 +20174,7 @@ object.forwardingRule = ""; object.redisInstance = ""; object.redisCluster = ""; + object.fqdn = ""; } if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) object.ipAddress = message.ipAddress; @@ -20198,6 +20219,8 @@ object.redisInstance = message.redisInstance; if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) object.redisCluster = message.redisCluster; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + object.fqdn = message.fqdn; return object; }; @@ -30668,6 +30691,7 @@ case 80: case 81: case 82: + case 83: break; } if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) @@ -31036,6 +31060,10 @@ case 82: message.cause = 82; break; + case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": + case 83: + message.cause = 83; + break; } if (object.resourceUri != null) message.resourceUri = String(object.resourceUri); @@ -31194,6 +31222,7 @@ * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value + * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value */ DropInfo.Cause = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -31280,6 +31309,7 @@ values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; + values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; return values; })(); @@ -31296,6 +31326,7 @@ * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri * @property {string|null} [internalIp] GKEMasterInfo internalIp * @property {string|null} [externalIp] GKEMasterInfo externalIp + * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint */ /** @@ -31345,6 +31376,14 @@ */ GKEMasterInfo.prototype.externalIp = ""; + /** + * GKEMasterInfo dnsEndpoint. + * @member {string} dnsEndpoint + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.dnsEndpoint = ""; + /** * Creates a new GKEMasterInfo instance using the specified properties. * @function create @@ -31377,6 +31416,8 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); return writer; }; @@ -31427,6 +31468,10 @@ message.externalIp = reader.string(); break; } + case 7: { + message.dnsEndpoint = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31474,6 +31519,9 @@ if (message.externalIp != null && message.hasOwnProperty("externalIp")) if (!$util.isString(message.externalIp)) return "externalIp: string expected"; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + if (!$util.isString(message.dnsEndpoint)) + return "dnsEndpoint: string expected"; return null; }; @@ -31497,6 +31545,8 @@ message.internalIp = String(object.internalIp); if (object.externalIp != null) message.externalIp = String(object.externalIp); + if (object.dnsEndpoint != null) + message.dnsEndpoint = String(object.dnsEndpoint); return message; }; @@ -31518,6 +31568,7 @@ object.clusterNetworkUri = ""; object.internalIp = ""; object.externalIp = ""; + object.dnsEndpoint = ""; } if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) object.clusterUri = message.clusterUri; @@ -31527,6 +31578,8 @@ object.internalIp = message.internalIp; if (message.externalIp != null && message.hasOwnProperty("externalIp")) object.externalIp = message.externalIp; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + object.dnsEndpoint = message.dnsEndpoint; return object; }; diff --git a/packages/google-cloud-networkmanagement/protos/protos.json b/packages/google-cloud-networkmanagement/protos/protos.json index 76c87175237..2832516a39f 100644 --- a/packages/google-cloud-networkmanagement/protos/protos.json +++ b/packages/google-cloud-networkmanagement/protos/protos.json @@ -2316,6 +2316,10 @@ "type": "string", "id": 7 }, + "fqdn": { + "type": "string", + "id": 19 + }, "cloudSqlInstance": { "type": "string", "id": 8 @@ -3598,7 +3602,8 @@ "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, - "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82 + "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, + "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 } } } @@ -3620,6 +3625,10 @@ "externalIp": { "type": "string", "id": 6 + }, + "dnsEndpoint": { + "type": "string", + "id": 7 } } }, From 03f3b41d5ce5769a597a43ce3877995b26282fcb Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 8 Nov 2024 09:05:55 +0000 Subject: [PATCH 3/4] feat: add DNS endpoint of Google Kubernetes Engine cluster control plane feat: add more detailed drop causes to corresponding enum docs: update outdated comments PiperOrigin-RevId: 694367344 Source-Link: https://github.com/googleapis/googleapis/commit/e6fd904e4cf0c6d30fc7755be4443829f879e5d4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/73da0bbf8103b172823d3ce5a5f0baafdef32e60 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW5ldHdvcmttYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiI3M2RhMGJiZjgxMDNiMTcyODIzZDNjZTVhNWYwYmFhZmRlZjMyZTYwIn0= --- .../v1/.eslintignore | 7 + .../v1/.eslintrc.json | 3 + .../v1/.gitignore | 14 + .../v1/.jsdoc.js | 55 + .../v1/.mocharc.js | 33 + .../v1/.prettierrc.js | 22 + .../v1/README.md | 1 + .../v1/package.json | 58 + .../v1/connectivity_test.proto | 422 + .../networkmanagement/v1/reachability.proto | 309 + .../cloud/networkmanagement/v1/trace.proto | 1872 + .../v1/protos/protos.d.ts | 14653 ++++++ .../v1/protos/protos.js | 40473 +++++++++++++++ .../v1/protos/protos.json | 4280 ++ ...bility_service.create_connectivity_test.js | 79 + ...bility_service.delete_connectivity_test.js | 63 + ...chability_service.get_connectivity_test.js | 62 + ...ability_service.list_connectivity_tests.js | 95 + ...ability_service.rerun_connectivity_test.js | 63 + ...bility_service.update_connectivity_test.js | 68 + ...ata_google.cloud.networkmanagement.v1.json | 283 + .../v1/src/index.ts | 25 + .../v1/src/v1/gapic_metadata.json | 87 + .../v1/src/v1/index.ts | 19 + .../v1/src/v1/reachability_service_client.ts | 1595 + .../reachability_service_client_config.json | 56 + .../v1/reachability_service_proto_list.json | 5 + .../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_reachability_service_v1.ts | 2018 + .../v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + .../v1beta1/.eslintignore | 7 + .../v1beta1/.eslintrc.json | 3 + .../v1beta1/.gitignore | 14 + .../v1beta1/.jsdoc.js | 55 + .../v1beta1/.mocharc.js | 33 + .../v1beta1/.prettierrc.js | 22 + .../v1beta1/README.md | 1 + .../v1beta1/package.json | 59 + .../v1beta1/connectivity_test.proto | 422 + .../v1beta1/reachability.proto | 304 + .../networkmanagement/v1beta1/trace.proto | 1876 + .../v1beta1/vpc_flow_logs.proto | 228 + .../v1beta1/vpc_flow_logs_config.proto | 152 + .../v1beta1/protos/protos.d.ts | 15637 ++++++ .../v1beta1/protos/protos.js | 42968 ++++++++++++++++ .../v1beta1/protos/protos.json | 4682 ++ ...bility_service.create_connectivity_test.js | 79 + ...bility_service.delete_connectivity_test.js | 63 + ...chability_service.get_connectivity_test.js | 62 + ...ability_service.list_connectivity_tests.js | 95 + ...ability_service.rerun_connectivity_test.js | 63 + ...bility_service.update_connectivity_test.js | 68 + ...oogle.cloud.networkmanagement.v1beta1.json | 511 + ...ogs_service.create_vpc_flow_logs_config.js | 73 + ...ogs_service.delete_vpc_flow_logs_config.js | 63 + ...w_logs_service.get_vpc_flow_logs_config.js | 62 + ...logs_service.list_vpc_flow_logs_configs.js | 83 + ...ogs_service.update_vpc_flow_logs_config.js | 68 + .../v1beta1/src/index.ts | 27 + .../v1beta1/src/v1beta1/gapic_metadata.json | 155 + .../v1beta1/src/v1beta1/index.ts | 20 + .../v1beta1/reachability_service_client.ts | 1647 + .../reachability_service_client_config.json | 56 + .../reachability_service_proto_list.json | 7 + .../v1beta1/vpc_flow_logs_service_client.ts | 1523 + .../vpc_flow_logs_service_client_config.json | 46 + .../vpc_flow_logs_service_proto_list.json | 7 + .../system-test/fixtures/sample/src/index.js | 28 + .../system-test/fixtures/sample/src/index.ts | 38 + .../v1beta1/system-test/install.ts | 49 + .../gapic_reachability_service_v1beta1.ts | 2064 + .../gapic_vpc_flow_logs_service_v1beta1.ts | 1948 + .../v1beta1/tsconfig.json | 19 + .../v1beta1/webpack.config.js | 64 + 77 files changed, 142362 insertions(+) create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/README.md create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/package.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js new file mode 100644 index 00000000000..22d92e8132c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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/network-management', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1/README.md new file mode 100644 index 00000000000..90c3778ad46 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/README.md @@ -0,0 +1 @@ +Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1/package.json new file mode 100644 index 00000000000..607215c940a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/network-management", + "version": "0.1.0", + "description": "Networkmanagement client for Node.js", + "repository": "googleapis/nodejs-networkmanagement", + "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 networkmanagement", + "networkmanagement", + "reachability service" + ], + "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-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto new file mode 100644 index 00000000000..e52ec167970 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -0,0 +1,422 @@ +// 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.networkmanagement.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1/trace.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TestOuterClass"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// A Connectivity Test for a network reachability analysis. +message ConnectivityTest { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + pattern: "projects/{project}/locations/global/connectivityTests/{test}" + }; + + // Identifier. Unique name of the resource using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + string description = 2; + + // Required. Source specification of the Connectivity Test. + // + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify + // the source location. + // + // Examples: + // If the source IP address is an internal IP address within a Google Cloud + // Virtual Private Cloud (VPC) network, then you must also specify the VPC + // network. Otherwise, specify the VM instance, which already contains its + // internal IP address and VPC network information. + // + // If the source of the test is within an on-premises network, then you must + // provide the destination VPC network. + // + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to identify the + // endpoint. So, you must also specify the source IP address or VPC network. + // + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that you don't + // intend to test. + Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination specification of the Connectivity Test. + // + // You can use a combination of destination IP address, Compute Engine + // VM instance, or VPC network to uniquely identify the destination + // location. + // + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either + // a destination IP address or VPC network to identify the destination + // interface. + // + // A reachability analysis proceeds even if the destination location is + // ambiguous. However, the result can include endpoints that you don't + // intend to test. + Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; + + // IP Protocol of the test. When not provided, "TCP" is assumed. + string protocol = 5; + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project boundaries. + repeated string related_projects = 6; + + // Output only. The display name of a Connectivity Test. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user-provided metadata. + map labels = 8; + + // Output only. The time the test was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the test's configuration was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reachability details of this test from the latest run. + // The details are updated when creating a new test, updating an + // existing test, or triggering a one-time rerun of an existing test. + ReachabilityDetails reachability_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The probing details of this test from the latest run, present + // for applicable tests only. The details are updated when creating a new + // test, updating an existing test, or triggering a one-time rerun of an + // existing test. + ProbingDetails probing_details = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the test should skip firewall checking. + // If not provided, we assume false. + bool bypass_firewall_checks = 17; +} + +// Source or destination of the Connectivity Test. +message Endpoint { + // The type definition of an endpoint's network. Use one of the + // following choices: + enum NetworkType { + // Default type if unspecified. + NETWORK_TYPE_UNSPECIFIED = 0; + + // A network hosted within Google Cloud. + // To receive more detailed output, specify the URI for the source or + // destination network. + GCP_NETWORK = 1; + + // A network hosted outside of Google Cloud. + // This can be an on-premises network, or a network hosted by another cloud + // provider. + NON_GCP_NETWORK = 2; + } + + // Type of the target of a forwarding rule. + enum ForwardingRuleTarget { + // Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + + // Compute Engine instance for protocol forwarding. + INSTANCE = 1; + + // Load Balancer. The specific type can be found from [load_balancer_type] + // [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2; + + // Classic Cloud VPN Gateway. + VPN_GATEWAY = 3; + + // Forwarding Rule is a Private Service Connect endpoint. + PSC = 4; + } + + // Wrapper for Cloud Function attributes. + message CloudFunctionEndpoint { + // A [Cloud Function](https://cloud.google.com/functions) name. + string uri = 1; + } + + // Wrapper for the App Engine service version attributes. + message AppEngineVersionEndpoint { + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + // name. + string uri = 1; + } + + // Wrapper for Cloud Run revision attributes. + message CloudRunRevisionEndpoint { + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + // URI. The format is: + // projects/{project}/locations/{location}/revisions/{revision} + string uri = 1; + } + + // The IP address of the endpoint, which can be an external or internal IP. + string ip_address = 1; + + // The IP protocol port of the endpoint. + // Only applicable when protocol is TCP or UDP. + int32 port = 2; + + // A Compute Engine instance URI. + string instance = 3; + + // A forwarding rule and its corresponding IP address represent the frontend + // configuration of a Google Cloud load balancer. Forwarding rules are also + // used for protocol forwarding, Private Service Connect and other network + // services to provide forwarding information in the control plane. Format: + // projects/{project}/global/forwardingRules/{id} or + // projects/{project}/regions/{region}/forwardingRules/{id} + string forwarding_rule = 13; + + // Output only. Specifies the type of the target of the forwarding rule. + optional ForwardingRuleTarget forwarding_rule_target = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the load balancer the forwarding rule points to. Empty + // for forwarding rules not related to load balancers. + optional string load_balancer_id = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the load balancer the forwarding rule points to. + optional LoadBalancerType load_balancer_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A cluster URI for [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + string gke_master_cluster = 7; + + // DNS endpoint of [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // Requires gke_master_cluster to be set, can't be used simultaneoulsly with + // ip_address or network. Applicable only to destination endpoint. + string fqdn = 19; + + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. + string cloud_sql_instance = 8; + + // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + // URI. + string redis_instance = 17; + + // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + // URI. + string redis_cluster = 18; + + // A [Cloud Function](https://cloud.google.com/functions). + CloudFunctionEndpoint cloud_function = 10; + + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + AppEngineVersionEndpoint app_engine_version = 11; + + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + CloudRunRevisionEndpoint cloud_run_revision = 12; + + // A Compute Engine network URI. + string network = 4; + + // Type of the network where the endpoint is located. + // Applicable only to source endpoint, as destination network type can be + // inferred from the source. + NetworkType network_type = 5; + + // Project ID where the endpoint is located. + // The Project ID can be derived from the URI if you provide a VM instance or + // network URI. + // The following are two cases where you must provide the project ID: + // 1. Only the IP address is specified, and the IP address is within a Google + // Cloud project. + // 2. When you are using Shared VPC and the IP address that you provide is + // from the service project. In this case, the network that the IP address + // resides in is defined in the host project. + string project_id = 6; +} + +// Results of the configuration analysis from the last run of the test. +message ReachabilityDetails { + // The overall result of the test's configuration analysis. + enum Result { + // No result was specified. + RESULT_UNSPECIFIED = 0; + + // Possible scenarios are: + // + // * The configuration analysis determined that a packet originating from + // the source is expected to reach the destination. + // * The analysis didn't complete because the user lacks permission for + // some of the resources in the trace. However, at the time the user's + // permission became insufficient, the trace had been successful so far. + REACHABLE = 1; + + // A packet originating from the source is expected to be dropped before + // reaching the destination. + UNREACHABLE = 2; + + // The source and destination endpoints do not uniquely identify + // the test location in the network, and the reachability result contains + // multiple traces. For some traces, a packet could be delivered, and for + // others, it would not be. This result is also assigned to + // configuration analysis of return path if on its own it should be + // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. + AMBIGUOUS = 4; + + // The configuration analysis did not complete. Possible reasons are: + // + // * A permissions error occurred--for example, the user might not have + // read permission for all of the resources named in the test. + // * An internal error occurred. + // * The analyzer received an invalid or unsupported argument or was unable + // to identify a known endpoint. + UNDETERMINED = 5; + } + + // The overall result of the test's configuration analysis. + Result result = 1; + + // The time of the configuration analysis. + google.protobuf.Timestamp verify_time = 2; + + // The details of a failure or a cancellation of reachability analysis. + google.rpc.Status error = 3; + + // Result may contain a list of traces if a test has multiple possible + // paths in the network, such as when destination endpoint is a load balancer + // with multiple backends. + repeated Trace traces = 5; +} + +// Latency percentile rank and value. +message LatencyPercentile { + // Percentage of samples this data point applies to. + int32 percent = 1; + + // percent-th percentile of latency observed, in microseconds. + // Fraction of percent/100 of samples have latency lower or + // equal to the value of this field. + int64 latency_micros = 2; +} + +// Describes measured latency distribution. +message LatencyDistribution { + // Representative latency percentiles. + repeated LatencyPercentile latency_percentiles = 1; +} + +// Results of active probing from the last run of the test. +message ProbingDetails { + // Overall probing result of the test. + enum ProbingResult { + // No result was specified. + PROBING_RESULT_UNSPECIFIED = 0; + + // At least 95% of packets reached the destination. + REACHABLE = 1; + + // No packets reached the destination. + UNREACHABLE = 2; + + // Less than 95% of packets reached the destination. + REACHABILITY_INCONSISTENT = 3; + + // Reachability could not be determined. Possible reasons are: + // * The user lacks permission to access some of the network resources + // required to run the test. + // * No valid source endpoint could be derived from the request. + // * An internal error occurred. + UNDETERMINED = 4; + } + + // Abort cause types. + enum ProbingAbortCause { + // No reason was specified. + PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + + // The user lacks permission to access some of the + // network resources required to run the test. + PERMISSION_DENIED = 1; + + // No valid source endpoint could be derived from the request. + NO_SOURCE_LOCATION = 2; + } + + // Representation of a network edge location as per + // https://cloud.google.com/vpc/docs/edge-locations. + message EdgeLocation { + // Name of the metropolitan area. + string metropolitan_area = 1; + } + + // The overall result of active probing. + ProbingResult result = 1; + + // The time that reachability was assessed through active probing. + google.protobuf.Timestamp verify_time = 2; + + // Details about an internal failure or the cancellation of active probing. + google.rpc.Status error = 3; + + // The reason probing was aborted. + ProbingAbortCause abort_cause = 4; + + // Number of probes sent. + int32 sent_probe_count = 5; + + // Number of probes that reached the destination. + int32 successful_probe_count = 6; + + // The source and destination endpoints derived from the test input and used + // for active probing. + EndpointInfo endpoint_info = 7; + + // Latency as measured by active probing in one direction: + // from the source to the destination endpoint. + LatencyDistribution probing_latency = 8; + + // The EdgeLocation from which a packet destined for/originating from the + // internet will egress/ingress the Google network. + // This will only be populated for a connectivity test which has an internet + // destination/source address. + // The absence of this field *must not* be used as an indication that the + // destination/source is part of the Google network. + EdgeLocation destination_egress_location = 9; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto new file mode 100644 index 00000000000..e6ece7d335f --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto @@ -0,0 +1,309 @@ +// 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.networkmanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1/connectivity_test.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "ReachabilityServiceProto"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// The Reachability service in Google Cloud Network Management API + +// The Reachability service in the Google Cloud Network Management API provides +// services that analyze the reachability within a single Google Virtual Private +// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises +// networks, or between VPC networks and internet hosts. A reachability analysis +// is based on Google Cloud network configurations. +// +// You can use the analysis results to verify these configurations and +// to troubleshoot connectivity issues. +service ReachabilityService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Connectivity Tests owned by a project. + rpc ListConnectivityTests(ListConnectivityTestsRequest) + returns (ListConnectivityTestsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/global}/connectivityTests" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific Connectivity Test. + rpc GetConnectivityTest(GetConnectivityTestRequest) + returns (ConnectivityTest) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Connectivity Test. + // After you create a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, containing non-existent resources in the network, or you + // don't have read permissions to the network configurations of listed + // projects), then the reachability result returns a value of `UNKNOWN`. + // + // If the endpoint specifications in `ConnectivityTest` are + // incomplete, the reachability result returns a value of + // AMBIGUOUS. For more information, + // see the Connectivity Test documentation. + rpc CreateConnectivityTest(CreateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/global}/connectivityTests" + body: "resource" + }; + option (google.api.method_signature) = "parent,test_id,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configuration of an existing `ConnectivityTest`. + // After you update a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // The Reachability state in the test resource is updated with the new result. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, they contain non-existent resources in the network, or the + // user does not have read permissions to the network configurations of + // listed projects), then the reachability result returns a value of + // UNKNOWN. + // + // If the endpoint specifications in `ConnectivityTest` are incomplete, the + // reachability result returns a value of `AMBIGUOUS`. See the documentation + // in `ConnectivityTest` for more details. + rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}" + body: "resource" + }; + option (google.api.method_signature) = "update_mask,resource"; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Rerun an existing `ConnectivityTest`. + // After the user triggers the rerun, the reachability analysis is performed + // as part of the long running operation, which completes when the analysis + // completes. + // + // Even though the test configuration remains the same, the reachability + // result may change due to underlying network configuration changes. + // + // If the endpoint specifications in `ConnectivityTest` become invalid (for + // example, specified resources are deleted in the network, or you lost + // read permissions to the network configurations of listed projects), then + // the reachability result returns a value of `UNKNOWN`. + rpc RerunConnectivityTest(RerunConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a specific `ConnectivityTest`. + rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListConnectivityTests` method. +message ListConnectivityTestsRequest { + // Required. The parent resource of the Connectivity Tests: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Number of `ConnectivityTests` to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; + + // Lists the `ConnectivityTests` that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form ` ` where operators: `<`, `>`, + // `<=`, + // `>=`, + // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + // roughly synonymous with equality). can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/proj-1/locations/global/connectivityTests/test-1 + // + // - Filter by labels: + // - Resources that have a key called `foo` + // labels.foo:* + // - Resources that have a key called `foo` whose value is `bar` + // labels.foo = bar + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// Response for the `ListConnectivityTests` method. +message ListConnectivityTestsResponse { + // List of Connectivity Tests. + repeated ConnectivityTest resources = 1; + + // Page token to fetch the next set of Connectivity Tests. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetConnectivityTest` method. +message GetConnectivityTestRequest { + // Required. `ConnectivityTest` resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `CreateConnectivityTest` method. +message CreateConnectivityTestRequest { + // Required. The parent resource of the Connectivity Test to create: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The logical name of the Connectivity Test in your project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project + string test_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A `ConnectivityTest` resource + ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateConnectivityTest` method. +message UpdateConnectivityTestRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteConnectivityTest` method. +message DeleteConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `RerunConnectivityTest` method. +message RerunConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/locations/global/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto new file mode 100644 index 00000000000..64494adefe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto @@ -0,0 +1,1872 @@ +// 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.networkmanagement.v1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.networkmanagement.v1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1"; + +// Trace represents one simulated packet forwarding path. +// +// * Each trace contains multiple ordered steps. +// * Each step is in a particular state with associated configuration. +// * State is categorized as final or non-final states. +// * Each final state has a reason associated. +// * Each trace must end with a final state (the last step). +// ``` +// |---------------------Trace----------------------| +// Step1(State) Step2(State) --- StepN(State(final)) +// ``` +message Trace { + // Derived from the source and destination endpoints definition specified by + // user request, and validated by the data plane model. + // If there are multiple traces starting from different source locations, then + // the endpoint_info may be different between traces. + EndpointInfo endpoint_info = 1; + + // A trace of a test contains multiple steps from the initial state to the + // final state (delivered, dropped, forwarded, or aborted). + // + // The steps are ordered by the processing sequence within the simulated + // network state machine. It is critical to preserve the order of the steps + // and avoid reordering or sorting them. + repeated Step steps = 2; + + // ID of trace. For forward traces, this ID is unique for each trace. For + // return traces, it matches ID of associated forward trace. A single forward + // trace can be associated with none, one or more than one return trace. + int32 forward_trace_id = 4; +} + +// A simulated forwarding path is composed of multiple steps. +// Each step has a well-defined state and an associated configuration. +message Step { + // Type of states that are defined in the network state machine. + // Each step in the packet trace is in a specific state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Initial state: packet originating from a Compute Engine instance. + // An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1; + + // Initial state: packet originating from the internet. + // The endpoint information is populated. + START_FROM_INTERNET = 2; + + // Initial state: packet originating from a Google service. + // The google_service information is populated. + START_FROM_GOOGLE_SERVICE = 27; + + // Initial state: packet originating from a VPC or on-premises network + // with internal source IP. + // If the source is a VPC network visible to the user, a NetworkInfo + // is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3; + + // Initial state: packet originating from a Google Kubernetes Engine cluster + // master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21; + + // Initial state: packet originating from a Cloud SQL instance. + // A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22; + + // Initial state: packet originating from a Redis instance. + // A RedisInstanceInfo is populated with starting instance information. + START_FROM_REDIS_INSTANCE = 32; + + // Initial state: packet originating from a Redis Cluster. + // A RedisClusterInfo is populated with starting Cluster information. + START_FROM_REDIS_CLUSTER = 33; + + // Initial state: packet originating from a Cloud Function. + // A CloudFunctionInfo is populated with starting function information. + START_FROM_CLOUD_FUNCTION = 23; + + // Initial state: packet originating from an App Engine service version. + // An AppEngineVersionInfo is populated with starting version information. + START_FROM_APP_ENGINE_VERSION = 25; + + // Initial state: packet originating from a Cloud Run revision. + // A CloudRunRevisionInfo is populated with starting revision information. + START_FROM_CLOUD_RUN_REVISION = 26; + + // Initial state: packet originating from a Storage Bucket. Used only for + // return traces. + // The storage_bucket information is populated. + START_FROM_STORAGE_BUCKET = 29; + + // Initial state: packet originating from a published service that uses + // Private Service Connect. Used only for return traces. + START_FROM_PSC_PUBLISHED_SERVICE = 30; + + // Initial state: packet originating from a serverless network endpoint + // group backend. Used only for return traces. + // The serverless_neg information is populated. + START_FROM_SERVERLESS_NEG = 31; + + // Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4; + + // Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5; + + // Config checking state: verify route. + APPLY_ROUTE = 6; + + // Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7; + + // Config checking state: verify load balancer backend configuration. + ANALYZE_LOAD_BALANCER_BACKEND = 28; + + // Config checking state: packet sent or received under foreign IP + // address and allowed. + SPOOFING_APPROVED = 8; + + // Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9; + + // Forwarding state: arriving at a Compute Engine internal load balancer. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; + + // Forwarding state: arriving at a Compute Engine external load balancer. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; + + // Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12; + + // Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13; + + // Forwarding state: arriving at a VPC connector. + ARRIVE_AT_VPC_CONNECTOR = 24; + + // Transition state: packet header translated. + NAT = 14; + + // Transition state: original connection is terminated and a new proxied + // connection is initiated. + PROXY_CONNECTION = 15; + + // Final state: packet could be delivered. + DELIVER = 16; + + // Final state: packet could be dropped. + DROP = 17; + + // Final state: packet could be forwarded to a network with an unknown + // configuration. + FORWARD = 18; + + // Final state: analysis is aborted. + ABORT = 19; + + // Special state: viewer of the test result does not have permission to + // see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20; + } + + // A description of the step. Usually this is a summary of the state. + string description = 1; + + // Each step is in one of the pre-defined states. + State state = 2; + + // This is a step that leads to the final state Drop. + bool causes_drop = 3; + + // Project ID that contains the configuration this step is validating. + string project_id = 4; + + // Configuration or metadata associated with each step. + // The configuration is filtered based on viewer's permission. If a viewer + // has no permission to view the configuration in this step, for non-final + // states a special state is populated (VIEWER_PERMISSION_MISSING), and for + // final state the configuration is cleared. + oneof step_info { + // Display information of a Compute Engine instance. + InstanceInfo instance = 5; + + // Display information of a Compute Engine firewall rule. + FirewallInfo firewall = 6; + + // Display information of a Compute Engine route. + RouteInfo route = 7; + + // Display information of the source and destination under analysis. + // The endpoint information in an intermediate state may differ with the + // initial input, as it might be modified by state like NAT, + // or Connection Proxy. + EndpointInfo endpoint = 8; + + // Display information of a Google service + GoogleServiceInfo google_service = 24; + + // Display information of a Compute Engine forwarding rule. + ForwardingRuleInfo forwarding_rule = 9; + + // Display information of a Compute Engine VPN gateway. + VpnGatewayInfo vpn_gateway = 10; + + // Display information of a Compute Engine VPN tunnel. + VpnTunnelInfo vpn_tunnel = 11; + + // Display information of a VPC connector. + VpcConnectorInfo vpc_connector = 21; + + // Display information of the final state "deliver" and reason. + DeliverInfo deliver = 12; + + // Display information of the final state "forward" and reason. + ForwardInfo forward = 13; + + // Display information of the final state "abort" and reason. + AbortInfo abort = 14; + + // Display information of the final state "drop" and reason. + DropInfo drop = 15; + + // Display information of the load balancers. Deprecated in favor of the + // `load_balancer_backend_info` field, not used in new tests. + LoadBalancerInfo load_balancer = 16 [deprecated = true]; + + // Display information of a Google Cloud network. + NetworkInfo network = 17; + + // Display information of a Google Kubernetes Engine cluster master. + GKEMasterInfo gke_master = 18; + + // Display information of a Cloud SQL instance. + CloudSQLInstanceInfo cloud_sql_instance = 19; + + // Display information of a Redis Instance. + RedisInstanceInfo redis_instance = 30; + + // Display information of a Redis Cluster. + RedisClusterInfo redis_cluster = 31; + + // Display information of a Cloud Function. + CloudFunctionInfo cloud_function = 20; + + // Display information of an App Engine service version. + AppEngineVersionInfo app_engine_version = 22; + + // Display information of a Cloud Run revision. + CloudRunRevisionInfo cloud_run_revision = 23; + + // Display information of a NAT. + NatInfo nat = 25; + + // Display information of a ProxyConnection. + ProxyConnectionInfo proxy_connection = 26; + + // Display information of a specific load balancer backend. + LoadBalancerBackendInfo load_balancer_backend_info = 27; + + // Display information of a Storage Bucket. Used only for return traces. + StorageBucketInfo storage_bucket = 28; + + // Display information of a Serverless network endpoint group backend. Used + // only for return traces. + ServerlessNegInfo serverless_neg = 29; + } +} + +// For display only. Metadata associated with a Compute Engine instance. +message InstanceInfo { + // Name of a Compute Engine instance. + string display_name = 1; + + // URI of a Compute Engine instance. + string uri = 2; + + // Name of the network interface of a Compute Engine instance. + string interface = 3; + + // URI of a Compute Engine network. + string network_uri = 4; + + // Internal IP address of the network interface. + string internal_ip = 5; + + // External IP address of the network interface. + string external_ip = 6; + + // Network tags configured on the instance. + repeated string network_tags = 7; + + // Service account authorized for the instance. + string service_account = 8 [deprecated = true]; + + // URI of the PSC network attachment the NIC is attached to (if relevant). + string psc_network_attachment_uri = 9; +} + +// For display only. Metadata associated with a Compute Engine network. +// Next ID: 7 +message NetworkInfo { + // Name of a Compute Engine network. + string display_name = 1; + + // URI of a Compute Engine network. + string uri = 2; + + // URI of the subnet matching the source IP address of the test. + string matched_subnet_uri = 5; + + // The IP range of the subnet matching the source IP address of the test. + string matched_ip_range = 4; + + // The region of the subnet matching the source IP address of the test. + string region = 6; +} + +// For display only. Metadata associated with a VPC firewall rule, an implied +// VPC firewall rule, or a firewall policy rule. +message FirewallInfo { + // The firewall rule's type. + enum FirewallRuleType { + // Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + + // Hierarchical firewall policy rule. For details, see + // [Hierarchical firewall policies + // overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + + // VPC firewall rule. For details, see + // [VPC firewall rules + // overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2; + + // Implied VPC firewall rule. For details, see + // [Implied + // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3; + + // Implicit firewall rules that are managed by serverless VPC access to + // allow ingress access. They are not visible in the Google Cloud console. + // For details, see [VPC connector's implicit + // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + + // Global network firewall policy rule. + // For details, see [Network firewall + // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). + NETWORK_FIREWALL_POLICY_RULE = 5; + + // Regional network firewall policy rule. + // For details, see [Regional network firewall + // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + + // Firewall policy rule containing attributes not yet supported in + // Connectivity tests. Firewall analysis is skipped if such a rule can + // potentially be matched. Please see the [list of unsupported + // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + + // Tracking state for response traffic created when request traffic goes + // through allow firewall rule. + // For details, see [firewall rules + // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + TRACKING_STATE = 101; + } + + // The display name of the firewall rule. This field might be empty for + // firewall policy rules. + string display_name = 1; + + // The URI of the firewall rule. This field is not applicable to implied + // VPC firewall rules. + string uri = 2; + + // Possible values: INGRESS, EGRESS + string direction = 3; + + // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + string action = 4; + + // The priority of the firewall rule. + int32 priority = 5; + + // The URI of the VPC network that the firewall rule is associated with. + // This field is not applicable to hierarchical firewall policy rules. + string network_uri = 6; + + // The target tags defined by the VPC firewall rule. This field is not + // applicable to firewall policy rules. + repeated string target_tags = 7; + + // The target service accounts specified by the firewall rule. + repeated string target_service_accounts = 8; + + // The name of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy = 9; + + // The URI of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy_uri = 11; + + // The firewall rule's type. + FirewallRuleType firewall_rule_type = 10; +} + +// For display only. Metadata associated with a Compute Engine route. +message RouteInfo { + // Type of route: + enum RouteType { + // Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0; + + // Route is a subnet route automatically created by the system. + SUBNET = 1; + + // Static route created by the user, including the default route to the + // internet. + STATIC = 2; + + // Dynamic route exchanged between BGP peers. + DYNAMIC = 3; + + // A subnet route received from peering network. + PEERING_SUBNET = 4; + + // A static route received from peering network. + PEERING_STATIC = 5; + + // A dynamic route received from peering network. + PEERING_DYNAMIC = 6; + + // Policy based route. + POLICY_BASED = 7; + + // Advertised route. Synthetic route which is used to transition from the + // StartFromPrivateNetwork state in Connectivity tests. + ADVERTISED = 101; + } + + // Type of next hop: + enum NextHopType { + // Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0; + + // Next hop is an IP address. + NEXT_HOP_IP = 1; + + // Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2; + + // Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3; + + // Next hop is a peering VPC. + NEXT_HOP_PEERING = 4; + + // Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5; + + // Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6; + + // Next hop is a VPN gateway. This scenario only happens when tracing + // connectivity from an on-premises network to Google Cloud through a VPN. + // The analysis simulates a packet departing from the on-premises network + // through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7; + + // Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8; + + // Next hop is blackhole; that is, the next hop either does not exist or is + // not running. + NEXT_HOP_BLACKHOLE = 9; + + // Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10; + + // Next hop is a + // [router appliance + // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). + NEXT_HOP_ROUTER_APPLIANCE = 11; + + // Next hop is an NCC hub. + NEXT_HOP_NCC_HUB = 12; + } + + // Indicates where routes are applicable. + enum RouteScope { + // Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0; + + // Route is applicable to packets in Network. + NETWORK = 1; + + // Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2; + } + + // Type of route. + RouteType route_type = 8; + + // Type of next hop. + NextHopType next_hop_type = 9; + + // Indicates where route is applicable. + RouteScope route_scope = 14; + + // Name of a route. + string display_name = 1; + + // URI of a route (if applicable). + string uri = 2; + + // Region of the route (if applicable). + string region = 19; + + // Destination IP range of the route. + string dest_ip_range = 3; + + // Next hop of the route. + string next_hop = 4; + + // URI of a Compute Engine network. NETWORK routes only. + string network_uri = 5; + + // Priority of the route. + int32 priority = 6; + + // Instance tags of the route. + repeated string instance_tags = 7; + + // Source IP address range of the route. Policy based routes only. + string src_ip_range = 10; + + // Destination port ranges of the route. Policy based routes only. + repeated string dest_port_ranges = 11; + + // Source port ranges of the route. Policy based routes only. + repeated string src_port_ranges = 12; + + // Protocols of the route. Policy based routes only. + repeated string protocols = 13; + + // URI of a NCC Hub. NCC_HUB routes only. + optional string ncc_hub_uri = 15; + + // URI of a NCC Spoke. NCC_HUB routes only. + optional string ncc_spoke_uri = 16; + + // For advertised dynamic routes, the URI of the Cloud Router that advertised + // the corresponding IP prefix. + optional string advertised_route_source_router_uri = 17; + + // For advertised routes, the URI of their next hop, i.e. the URI of the + // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + // the advertised prefix is advertised through, or URI of the source peered + // network. + optional string advertised_route_next_hop_uri = 18; +} + +// For display only. Details of a Google Service sending packets to a +// VPC network. Although the source IP might be a publicly routable address, +// some Google Services use special routes within Google production +// infrastructure to reach Compute Engine Instances. +// https://cloud.google.com/vpc/docs/routes#special_return_paths +message GoogleServiceInfo { + // Recognized type of a Google Service. + enum GoogleServiceType { + // Unspecified Google Service. + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + + // Identity aware proxy. + // https://cloud.google.com/iap/docs/using-tcp-forwarding + IAP = 1; + + // One of two services sharing IP ranges: + // * Load Balancer proxy + // * Centralized Health Check prober + // https://cloud.google.com/load-balancing/docs/firewall-rules + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + + // Connectivity from Cloud DNS to forwarding targets or alternate name + // servers that use private routing. + // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + // https://cloud.google.com/dns/docs/policies#firewall-rules + CLOUD_DNS = 3; + + // private.googleapis.com and restricted.googleapis.com + GOOGLE_API = 4; + + // Google API via Private Service Connect. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_PSC = 5; + + // Google API via VPC Service Controls. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_VPC_SC = 6; + } + + // Source IP address. + string source_ip = 1; + + // Recognized type of a Google Service. + GoogleServiceType google_service_type = 2; +} + +// For display only. Metadata associated with a Compute Engine forwarding rule. +message ForwardingRuleInfo { + // Name of the forwarding rule. + string display_name = 1; + + // URI of the forwarding rule. + string uri = 2; + + // Protocol defined in the forwarding rule that matches the packet. + string matched_protocol = 3; + + // Port range defined in the forwarding rule that matches the packet. + string matched_port_range = 6; + + // VIP of the forwarding rule. + string vip = 4; + + // Target type of the forwarding rule. + string target = 5; + + // Network URI. + string network_uri = 7; + + // Region of the forwarding rule. Set only for regional forwarding rules. + string region = 8; + + // Name of the load balancer the forwarding rule belongs to. Empty for + // forwarding rules not related to load balancers (like PSC forwarding rules). + string load_balancer_name = 9; + + // URI of the PSC service attachment this forwarding rule targets (if + // applicable). + string psc_service_attachment_uri = 10; + + // PSC Google API target this forwarding rule targets (if applicable). + string psc_google_api_target = 11; +} + +// For display only. Metadata associated with a load balancer. +message LoadBalancerInfo { + // The type definition for a load balancer: + enum LoadBalancerType { + // Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1; + + // Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2; + + // HTTP(S) proxy load balancer. + HTTP_PROXY = 3; + + // TCP proxy load balancer. + TCP_PROXY = 4; + + // SSL proxy load balancer. + SSL_PROXY = 5; + } + + // The type definition for a load balancer backend configuration: + enum BackendType { + // Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0; + + // Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1; + + // Target Pool as the load balancer's backend. + TARGET_POOL = 2; + + // Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3; + } + + // Type of the load balancer. + LoadBalancerType load_balancer_type = 1; + + // URI of the health check for the load balancer. Deprecated and no longer + // populated as different load balancer backends might have different health + // checks. + string health_check_uri = 2 [deprecated = true]; + + // Information for the loadbalancer backends. + repeated LoadBalancerBackend backends = 3; + + // Type of load balancer's backend configuration. + BackendType backend_type = 4; + + // Backend configuration URI. + string backend_uri = 5; +} + +// For display only. Metadata associated with a specific load balancer backend. +message LoadBalancerBackend { + // State of a health check firewall configuration: + enum HealthCheckFirewallState { + // State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + + // There are configured firewall rules to allow health check probes to the + // backend. + CONFIGURED = 1; + + // There are firewall rules configured to allow partial health check ranges + // or block all health check ranges. + // If a health check probe is sent from denied IP ranges, + // the health check to the backend will fail. Then, the backend will be + // marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2; + } + + // Name of a Compute Engine instance or network endpoint. + string display_name = 1; + + // URI of a Compute Engine instance or network endpoint. + string uri = 2; + + // State of the health check firewall configuration. + HealthCheckFirewallState health_check_firewall_state = 3; + + // A list of firewall rule URIs allowing probes from health check IP ranges. + repeated string health_check_allowing_firewall_rules = 4; + + // A list of firewall rule URIs blocking probes from health check IP ranges. + repeated string health_check_blocking_firewall_rules = 5; +} + +// For display only. Metadata associated with a Compute Engine VPN gateway. +message VpnGatewayInfo { + // Name of a VPN gateway. + string display_name = 1; + + // URI of a VPN gateway. + string uri = 2; + + // URI of a Compute Engine network where the VPN gateway is configured. + string network_uri = 3; + + // IP address of the VPN gateway. + string ip_address = 4; + + // A VPN tunnel that is associated with this VPN gateway. + // There may be multiple VPN tunnels configured on a VPN gateway, and only + // the one relevant to the test is displayed. + string vpn_tunnel_uri = 5; + + // Name of a Google Cloud region where this VPN gateway is configured. + string region = 6; +} + +// For display only. Metadata associated with a Compute Engine VPN tunnel. +message VpnTunnelInfo { + // Types of VPN routing policy. For details, refer to [Networks and Tunnel + // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + enum RoutingType { + // Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0; + + // Route based VPN. + ROUTE_BASED = 1; + + // Policy based routing. + POLICY_BASED = 2; + + // Dynamic (BGP) routing. + DYNAMIC = 3; + } + + // Name of a VPN tunnel. + string display_name = 1; + + // URI of a VPN tunnel. + string uri = 2; + + // URI of the VPN gateway at local end of the tunnel. + string source_gateway = 3; + + // URI of a VPN gateway at remote end of the tunnel. + string remote_gateway = 4; + + // Remote VPN gateway's IP address. + string remote_gateway_ip = 5; + + // Local VPN gateway's IP address. + string source_gateway_ip = 6; + + // URI of a Compute Engine network where the VPN tunnel is configured. + string network_uri = 7; + + // Name of a Google Cloud region where this VPN tunnel is configured. + string region = 8; + + // Type of the routing policy. + RoutingType routing_type = 9; +} + +// For display only. The specification of the endpoints for the test. +// EndpointInfo is derived from source and destination Endpoint and validated +// by the backend data plane model. +message EndpointInfo { + // Source IP address. + string source_ip = 1; + + // Destination IP address. + string destination_ip = 2; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 3; + + // Source port. Only valid when protocol is TCP or UDP. + int32 source_port = 4; + + // Destination port. Only valid when protocol is TCP or UDP. + int32 destination_port = 5; + + // URI of the network where this packet originates from. + string source_network_uri = 6; + + // URI of the network where this packet is sent to. + string destination_network_uri = 7; + + // URI of the source telemetry agent this packet originates from. + string source_agent_uri = 8; +} + +// Details of the final state "deliver" and associated resource. +message DeliverInfo { + // Deliver target types: + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Target is a Compute Engine instance. + INSTANCE = 1; + + // Target is the internet. + INTERNET = 2; + + // Target is a Google API. + GOOGLE_API = 3; + + // Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4; + + // Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5; + + // Target is a published service that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + PSC_PUBLISHED_SERVICE = 6; + + // Target is Google APIs that use [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_GOOGLE_API = 7; + + // Target is a VPC-SC that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_VPC_SC = 8; + + // Target is a serverless network endpoint group. + SERVERLESS_NEG = 9; + + // Target is a Cloud Storage bucket. + STORAGE_BUCKET = 10; + + // Target is a private network. Used only for return traces. + PRIVATE_NETWORK = 11; + + // Target is a Cloud Function. Used only for return traces. + CLOUD_FUNCTION = 12; + + // Target is a App Engine service version. Used only for return traces. + APP_ENGINE_VERSION = 13; + + // Target is a Cloud Run revision. Used only for return traces. + CLOUD_RUN_REVISION = 14; + + // Target is a Google-managed service. Used only for return traces. + GOOGLE_MANAGED_SERVICE = 15; + + // Target is a Redis Instance. + REDIS_INSTANCE = 16; + + // Target is a Redis Cluster. + REDIS_CLUSTER = 17; + } + + // Target type where the packet is delivered to. + Target target = 1; + + // URI of the resource that the packet is delivered to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the Cloud Storage Bucket the packet is delivered to (if + // applicable). + string storage_bucket = 4; + + // PSC Google API target the packet is delivered to (if applicable). + string psc_google_api_target = 5; +} + +// Details of the final state "forward" and associated resource. +message ForwardInfo { + // Forward target types. + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Forwarded to a VPC peering network. + PEERING_VPC = 1; + + // Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2; + + // Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3; + + // Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4 [deprecated = true]; + + // Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + + // Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6 [deprecated = true]; + + // Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7; + + // Forwarded to an NCC Hub. + NCC_HUB = 8; + + // Forwarded to a router appliance. + ROUTER_APPLIANCE = 9; + } + + // Target type where this packet is forwarded to. + Target target = 1; + + // URI of the resource that the packet is forwarded to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; +} + +// Details of the final state "abort" and associated resource. +message AbortInfo { + // Abort cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Aborted due to unknown network. Deprecated, not used in the new tests. + UNKNOWN_NETWORK = 1 [deprecated = true]; + + // Aborted because no project information can be derived from the test + // input. Deprecated, not used in the new tests. + UNKNOWN_PROJECT = 3 [deprecated = true]; + + // Aborted because traffic is sent from a public IP to an instance without + // an external IP. Deprecated, not used in the new tests. + NO_EXTERNAL_IP = 7 [deprecated = true]; + + // Aborted because none of the traces matches destination information + // specified in the input test request. Deprecated, not used in the new + // tests. + UNINTENDED_DESTINATION = 8 [deprecated = true]; + + // Aborted because the source endpoint could not be found. Deprecated, not + // used in the new tests. + SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; + + // Aborted because the source network does not match the source endpoint. + // Deprecated, not used in the new tests. + MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; + + // Aborted because the destination endpoint could not be found. Deprecated, + // not used in the new tests. + DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; + + // Aborted because the destination network does not match the destination + // endpoint. Deprecated, not used in the new tests. + MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; + + // Aborted because no endpoint with the packet's destination IP address is + // found. + UNKNOWN_IP = 2; + + // Aborted because no endpoint with the packet's destination IP is found in + // the Google-managed project. + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; + + // Aborted because the source IP address doesn't belong to any of the + // subnets of the source VPC network. + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; + + // Aborted because user lacks permission to access all or part of the + // network configurations required to run the test. + PERMISSION_DENIED = 4; + + // Aborted because user lacks permission to access Cloud NAT configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; + + // Aborted because user lacks permission to access Network endpoint group + // endpoint configs required to run the test. + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; + + // Aborted because user lacks permission to access Cloud Router configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; + + // Aborted because no valid source or destination endpoint is derived from + // the input test request. + NO_SOURCE_LOCATION = 5; + + // Aborted because the source or destination endpoint specified in + // the request is invalid. Some examples: + // - The request might contain malformed resource URI, project ID, or IP + // address. + // - The request might contain inconsistent information (for example, the + // request might include both the instance and the network, but the instance + // might not have a NIC in that network). + INVALID_ARGUMENT = 6; + + // Aborted because the number of steps in the trace exceeds a certain + // limit. It might be caused by a routing loop. + TRACE_TOO_LONG = 9; + + // Aborted due to internal server error. + INTERNAL_ERROR = 10; + + // Aborted because the test scenario is not supported. + UNSUPPORTED = 15; + + // Aborted because the source and destination resources have no common IP + // version. + MISMATCHED_IP_VERSION = 16; + + // Aborted because the connection between the control plane and the node of + // the source cluster is initiated by the node and managed by the + // Konnectivity proxy. + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + + // Aborted because expected resource configuration was missing. + RESOURCE_CONFIG_NOT_FOUND = 18; + + // Aborted because expected VM instance configuration was missing. + VM_INSTANCE_CONFIG_NOT_FOUND = 24; + + // Aborted because expected network configuration was missing. + NETWORK_CONFIG_NOT_FOUND = 25; + + // Aborted because expected firewall configuration was missing. + FIREWALL_CONFIG_NOT_FOUND = 26; + + // Aborted because expected route configuration was missing. + ROUTE_CONFIG_NOT_FOUND = 27; + + // Aborted because a PSC endpoint selection for the Google-managed service + // is ambiguous (several PSC endpoints satisfy test input). + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; + + // Aborted because tests with a PSC-based Cloud SQL instance as a source are + // not supported. + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; + + // Aborted because tests with a Redis Cluster as a source are not supported. + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; + + // Aborted because tests with a Redis Instance as a source are not + // supported. + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; + + // Aborted because tests with a forwarding rule as a source are not + // supported. + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + + // Aborted because one of the endpoints is a non-routable IP address + // (loopback, link-local, etc). + NON_ROUTABLE_IP_ADDRESS = 22; + + // Aborted due to an unknown issue in the Google-managed project. + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + + // Aborted due to an unsupported configuration of the Google-managed + // project. + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + } + + // Causes that the analysis is aborted. + Cause cause = 1; + + // URI of the resource that caused the abort. + string resource_uri = 2; + + // IP address that caused the abort. + string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // List of project IDs the user specified in the request but lacks access to. + // In this case, analysis is aborted with the PERMISSION_DENIED cause. + repeated string projects_missing_permission = 3; +} + +// Details of the final state "drop" and associated resource. +message DropInfo { + // Drop cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Destination external address cannot be resolved to a known target. If + // the address is used in a Google Cloud project, provide the project ID + // as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1; + + // A Compute Engine instance can only send or receive a packet with a + // foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2; + + // Dropped due to a firewall rule, unless allowed due to connection + // tracking. + FIREWALL_RULE = 3; + + // Dropped due to no matching routes. + NO_ROUTE = 4; + + // Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5; + + // Packet is sent to a wrong (unintended) network. Example: you trace a + // packet from VM1:Network1 to VM2:Network2, however, the route configured + // in Network1 sends the packet destined for VM2's IP address to Network3. + ROUTE_WRONG_NETWORK = 6; + + // Route's next hop IP address cannot be resolved to a GCP resource. + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + + // Route's next hop resource is not found. + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + + // Route's next hop instance doesn't have a NIC in the route's network. + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + + // Route's next hop IP address is not a primary IP address of the next hop + // instance. + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + + // Route's next hop forwarding rule doesn't match next hop IP address. + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + + // Route's next hop VPN tunnel is down (does not have valid IKE SAs). + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + + // Route's next hop forwarding rule type is invalid (it's not a forwarding + // rule of the internal passthrough load balancer). + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + + // Packet is sent from the Internet to the private IPv6 address. + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + + // The packet does not match a policy-based VPN tunnel local selector. + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + + // The packet does not match a policy-based VPN tunnel remote selector. + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + + // Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7; + + // Instance with only an internal IP address tries to access Google API and + // services, but private Google access is not enabled in the subnet. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + + // Source endpoint tries to access Google API and services through the VPN + // tunnel to another network, but Private Google Access needs to be enabled + // in the source endpoint network. + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + + // Instance with only an internal IP address tries to access external hosts, + // but Cloud NAT is not enabled in the subnet, unless special configurations + // on a VM allow this connection. + NO_EXTERNAL_ADDRESS = 9; + + // Destination internal address cannot be resolved to a known target. If + // this is a shared VPC scenario, verify if the service project ID is + // provided as test input. Otherwise, verify if the IP address is being + // used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10; + + // Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11; + + // Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12; + + // Firewalls block the health check probes to the backends and cause + // the backends to be unavailable for traffic from the load balancer. + // For more details, see [Health check firewall + // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + + // Packet is sent from or to a Compute Engine instance that is not in a + // running state. + INSTANCE_NOT_RUNNING = 14; + + // Packet sent from or to a GKE cluster that is not in running state. + GKE_CLUSTER_NOT_RUNNING = 27; + + // Packet sent from or to a Cloud SQL instance that is not in running state. + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + + // Packet sent from or to a Redis Instance that is not in running state. + REDIS_INSTANCE_NOT_RUNNING = 68; + + // Packet sent from or to a Redis Cluster that is not in running state. + REDIS_CLUSTER_NOT_RUNNING = 69; + + // The type of traffic is blocked and the user cannot configure a firewall + // rule to enable it. See [Always blocked + // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + // more details. + TRAFFIC_TYPE_BLOCKED = 15; + + // Access to Google Kubernetes Engine cluster master's endpoint is not + // authorized. See [Access to the cluster + // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + // for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + + // Access to the Cloud SQL instance endpoint is not authorized. + // See [Authorizing with authorized + // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + // more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + + // Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18; + + // Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + + // Packet was dropped because there is no peering between the originating + // network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + + // Packet was dropped because the Google-managed service uses Private + // Service Connect (PSC), but the PSC endpoint is not found in the project. + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + + // Packet was dropped because the GKE cluster uses Private Service Connect + // (PSC), but the PSC endpoint is not found in the project. + GKE_PSC_ENDPOINT_MISSING = 36; + + // Packet was dropped because the Cloud SQL instance has neither a private + // nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + + // Packet was dropped because a GKE cluster private endpoint is + // unreachable from a region different from the cluster's region. + GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + + // Packet sent from a public GKE cluster control plane to a private + // IP address. + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + + // Packet was dropped because there is no route from a GKE cluster + // control plane to a destination network. + GKE_CONTROL_PLANE_NO_ROUTE = 32; + + // Packet sent from a Cloud SQL instance to an external IP address is not + // allowed. The Cloud SQL instance is not configured to send packets to + // external IP addresses. + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + + // Packet sent from a Cloud SQL instance with only a public IP address to a + // private IP address. + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + + // Packet was dropped because there is no route from a Cloud SQL + // instance to a destination network. + CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + + // Packet was dropped because the Cloud SQL instance requires all + // connections to use Cloud SQL connectors and to target the Cloud SQL proxy + // port (3307). + CLOUD_SQL_CONNECTOR_REQUIRED = 63; + + // Packet could be dropped because the Cloud Function is not in an active + // status. + CLOUD_FUNCTION_NOT_ACTIVE = 22; + + // Packet could be dropped because no VPC connector is set. + VPC_CONNECTOR_NOT_SET = 23; + + // Packet could be dropped because the VPC connector is not in a running + // state. + VPC_CONNECTOR_NOT_RUNNING = 24; + + // Packet could be dropped because the traffic from the serverless service + // to the VPC connector is not allowed. + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; + + // Packet could be dropped because the health check traffic to the VPC + // connector is not allowed. + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; + + // Packet could be dropped because it was sent from a different region + // to a regional forwarding without global access. + FORWARDING_RULE_REGION_MISMATCH = 25; + + // The Private Service Connect endpoint is in a project that is not approved + // to connect to the service. + PSC_CONNECTION_NOT_ACCEPTED = 26; + + // The packet is sent to the Private Service Connect endpoint over the + // peering, but [it's not + // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule does not have + // global access enabled. + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule has multiple ports + // specified. + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group) targeting a Cloud SQL service attachment, but this + // configuration is not supported. + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + + // No NAT subnets are defined for the PSC service attachment. + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + + // PSC endpoint is accessed via NCC, but PSC transitivity configuration is + // not yet propagated. + PSC_TRANSITIVITY_NOT_PROPAGATED = 64; + + // The packet sent from the hybrid NEG proxy matches a non-dynamic route, + // but such a configuration is not supported. + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + + // The packet sent from the hybrid NEG proxy matches a dynamic route with a + // next hop in a different region, but such a configuration is not + // supported. + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + + // Packet sent from a Cloud Run revision that is not ready. + CLOUD_RUN_REVISION_NOT_READY = 29; + + // Packet was dropped inside Private Service Connect service producer. + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + + // Packet sent to a load balancer, which requires a proxy-only subnet and + // the subnet is not found. + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + + // Packet sent to Cloud Nat without active NAT IPs. + CLOUD_NAT_NO_ADDRESSES = 40; + + // Packet is stuck in a routing loop. + ROUTING_LOOP = 59; + + // Packet is dropped inside a Google-managed service due to being delivered + // in return trace to an endpoint that doesn't match the endpoint the packet + // was sent from in forward trace. Used only for return traces. + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; + + // Packet is dropped due to a load balancer backend instance not having a + // network interface in the network expected by the load balancer. + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; + + // Packet is dropped due to a backend service named port not being defined + // on the instance group level. + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; + + // Packet is dropped due to a destination IP range being part of a Private + // NAT IP range. + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; + + // Generic drop cause for a packet being dropped inside a Redis Instance + // service project. + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Instance. Port 6379 should be used to connect to a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PORT = 71; + + // Packet is dropped due to connecting from PUPI address to a PSA based + // Redis Instance. + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; + + // Packet is dropped due to no route to the destination network. + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; + + // Redis Instance does not have an external IP address. + REDIS_INSTANCE_NO_EXTERNAL_IP = 74; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Instance. Only TCP connections are accepted by a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; + + // Generic drop cause for a packet being dropped inside a Redis Cluster + // service project. + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to + // a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PORT = 76; + + // Redis Cluster does not have an external IP address. + REDIS_CLUSTER_NO_EXTERNAL_IP = 77; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix advertised + // via BGP by the Cloud Router. + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix included to + // the local traffic selector of the VPN tunnel. + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; + + // Packet from the unknown peered network is dropped due to no known route + // from the source network to the destination IP address. + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + + // Sending packets processed by the Private NAT Gateways to the Private + // Service Connect endpoints is not supported. + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; + } + + // Cause that the packet is dropped. + Cause cause = 1; + + // URI of the resource that caused the drop. + string resource_uri = 2; + + // Source IP address of the dropped packet (if relevant). + string source_ip = 3; + + // Destination IP address of the dropped packet (if relevant). + string destination_ip = 4; + + // Region of the dropped packet (if relevant). + string region = 5; +} + +// For display only. Metadata associated with a Google Kubernetes Engine (GKE) +// cluster master. +message GKEMasterInfo { + // URI of a GKE cluster. + string cluster_uri = 2; + + // URI of a GKE cluster network. + string cluster_network_uri = 4; + + // Internal IP address of a GKE cluster control plane. + string internal_ip = 5; + + // External IP address of a GKE cluster control plane. + string external_ip = 6; + + // DNS endpoint of a GKE cluster control plane. + string dns_endpoint = 7; +} + +// For display only. Metadata associated with a Cloud SQL instance. +message CloudSQLInstanceInfo { + // Name of a Cloud SQL instance. + string display_name = 1; + + // URI of a Cloud SQL instance. + string uri = 2; + + // URI of a Cloud SQL instance network or empty string if the instance does + // not have one. + string network_uri = 4; + + // Internal IP address of a Cloud SQL instance. + string internal_ip = 5; + + // External IP address of a Cloud SQL instance. + string external_ip = 6; + + // Region in which the Cloud SQL instance is running. + string region = 7; +} + +// For display only. Metadata associated with a Cloud Redis Instance. +message RedisInstanceInfo { + // Name of a Cloud Redis Instance. + string display_name = 1; + + // URI of a Cloud Redis Instance. + string uri = 2; + + // URI of a Cloud Redis Instance network. + string network_uri = 3; + + // Primary endpoint IP address of a Cloud Redis Instance. + string primary_endpoint_ip = 4; + + // Read endpoint IP address of a Cloud Redis Instance (if applicable). + string read_endpoint_ip = 5; + + // Region in which the Cloud Redis Instance is defined. + string region = 6; +} + +// For display only. Metadata associated with a Redis Cluster. +message RedisClusterInfo { + // Name of a Redis Cluster. + string display_name = 1; + + // URI of a Redis Cluster in format + // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + string uri = 2; + + // URI of a Redis Cluster network in format + // "projects/{project_id}/global/networks/{network_id}". + string network_uri = 3; + + // Discovery endpoint IP address of a Redis Cluster. + string discovery_endpoint_ip_address = 4 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Secondary endpoint IP address of a Redis Cluster. + string secondary_endpoint_ip_address = 5 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the region in which the Redis Cluster is defined. For example, + // "us-central1". + string location = 6; +} + +// For display only. Metadata associated with a Cloud Function. +message CloudFunctionInfo { + // Name of a Cloud Function. + string display_name = 1; + + // URI of a Cloud Function. + string uri = 2; + + // Location in which the Cloud Function is deployed. + string location = 3; + + // Latest successfully deployed version id of the Cloud Function. + int64 version_id = 4; +} + +// For display only. Metadata associated with a Cloud Run revision. +message CloudRunRevisionInfo { + // Name of a Cloud Run revision. + string display_name = 1; + + // URI of a Cloud Run revision. + string uri = 2; + + // Location in which this revision is deployed. + string location = 4; + + // URI of Cloud Run service this revision belongs to. + string service_uri = 5; +} + +// For display only. Metadata associated with an App Engine version. +message AppEngineVersionInfo { + // Name of an App Engine version. + string display_name = 1; + + // URI of an App Engine version. + string uri = 2; + + // Runtime of the App Engine version. + string runtime = 3; + + // App Engine execution environment for a version. + string environment = 4; +} + +// For display only. Metadata associated with a VPC connector. +message VpcConnectorInfo { + // Name of a VPC connector. + string display_name = 1; + + // URI of a VPC connector. + string uri = 2; + + // Location in which the VPC connector is deployed. + string location = 3; +} + +// For display only. Metadata associated with NAT. +message NatInfo { + // Types of NAT. + enum Type { + // Type is unspecified. + TYPE_UNSPECIFIED = 0; + + // From Compute Engine instance's internal address to external address. + INTERNAL_TO_EXTERNAL = 1; + + // From Compute Engine instance's external address to internal address. + EXTERNAL_TO_INTERNAL = 2; + + // Cloud NAT Gateway. + CLOUD_NAT = 3; + + // Private service connect NAT. + PRIVATE_SERVICE_CONNECT = 4; + } + + // Type of NAT. + Type type = 1; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 2; + + // URI of the network where NAT translation takes place. + string network_uri = 3; + + // Source IP address before NAT translation. + string old_source_ip = 4; + + // Source IP address after NAT translation. + string new_source_ip = 5; + + // Destination IP address before NAT translation. + string old_destination_ip = 6; + + // Destination IP address after NAT translation. + string new_destination_ip = 7; + + // Source port before NAT translation. Only valid when protocol is TCP or UDP. + int32 old_source_port = 8; + + // Source port after NAT translation. Only valid when protocol is TCP or UDP. + int32 new_source_port = 9; + + // Destination port before NAT translation. Only valid when protocol is TCP or + // UDP. + int32 old_destination_port = 10; + + // Destination port after NAT translation. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 11; + + // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + string router_uri = 12; + + // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + string nat_gateway_name = 13; +} + +// For display only. Metadata associated with ProxyConnection. +message ProxyConnectionInfo { + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 1; + + // Source IP address of an original connection. + string old_source_ip = 2; + + // Source IP address of a new connection. + string new_source_ip = 3; + + // Destination IP address of an original connection + string old_destination_ip = 4; + + // Destination IP address of a new connection. + string new_destination_ip = 5; + + // Source port of an original connection. Only valid when protocol is TCP or + // UDP. + int32 old_source_port = 6; + + // Source port of a new connection. Only valid when protocol is TCP or UDP. + int32 new_source_port = 7; + + // Destination port of an original connection. Only valid when protocol is TCP + // or UDP. + int32 old_destination_port = 8; + + // Destination port of a new connection. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 9; + + // Uri of proxy subnet. + string subnet_uri = 10; + + // URI of the network where connection is proxied. + string network_uri = 11; +} + +// For display only. Metadata associated with the load balancer backend. +message LoadBalancerBackendInfo { + // Health check firewalls configuration state enum. + enum HealthCheckFirewallsConfigState { + // Configuration state unspecified. It usually means that the backend has + // no health check attached, or there was an unexpected configuration error + // preventing Connectivity tests from verifying health check configuration. + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; + + // Firewall rules (policies) allowing health check traffic from all required + // IP ranges to the backend are configured. + FIREWALLS_CONFIGURED = 1; + + // Firewall rules (policies) allow health check traffic only from a part of + // required IP ranges. + FIREWALLS_PARTIALLY_CONFIGURED = 2; + + // Firewall rules (policies) deny health check traffic from all required + // IP ranges to the backend. + FIREWALLS_NOT_CONFIGURED = 3; + + // The network contains firewall rules of unsupported types, so Connectivity + // tests were not able to verify health check configuration status. Please + // refer to the documentation for the list of unsupported configurations: + // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs + FIREWALLS_UNSUPPORTED = 4; + } + + // Display name of the backend. For example, it might be an instance name for + // the instance group backends, or an IP address and port for zonal network + // endpoint group backends. + string name = 1; + + // URI of the backend instance (if applicable). Populated for instance group + // backends, and zonal NEG backends. + string instance_uri = 2; + + // URI of the backend service this backend belongs to (if applicable). + string backend_service_uri = 3; + + // URI of the instance group this backend belongs to (if applicable). + string instance_group_uri = 4; + + // URI of the network endpoint group this backend belongs to (if applicable). + string network_endpoint_group_uri = 5; + + // URI of the backend bucket this backend targets (if applicable). + string backend_bucket_uri = 8; + + // URI of the PSC service attachment this PSC NEG backend targets (if + // applicable). + string psc_service_attachment_uri = 9; + + // PSC Google API target this PSC NEG backend targets (if applicable). + string psc_google_api_target = 10; + + // URI of the health check attached to this backend (if applicable). + string health_check_uri = 6; + + // Output only. Health check firewalls configuration state for the backend. + // This is a result of the static firewall analysis (verifying that health + // check traffic from required IP ranges to the backend is allowed or not). + // The backend might still be unhealthy even if these firewalls are + // configured. Please refer to the documentation for more information: + // https://cloud.google.com/load-balancing/docs/firewall-rules + HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Type of a load balancer. For more information, see [Summary of Google Cloud +// load +// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). +enum LoadBalancerType { + // Forwarding rule points to a different target than a load balancer or a + // load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1; + + // Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2; + + // Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3; + + // Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4; + + // External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5; + + // External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6; + + // Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + + // External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8; + + // Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9; + + // Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10; +} + +// For display only. Metadata associated with Storage Bucket. +message StorageBucketInfo { + // Cloud Storage Bucket name. + string bucket = 1; +} + +// For display only. Metadata associated with the serverless network endpoint +// group backend. +message ServerlessNegInfo { + // URI of the serverless network endpoint group. + string neg_uri = 1; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts new file mode 100644 index 00000000000..79cfe7142dd --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts @@ -0,0 +1,14653 @@ +// 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 networkmanagement. */ + namespace networkmanagement { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a ConnectivityTest. */ + interface IConnectivityTest { + + /** ConnectivityTest name */ + name?: (string|null); + + /** ConnectivityTest description */ + description?: (string|null); + + /** ConnectivityTest source */ + source?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest destination */ + destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest protocol */ + protocol?: (string|null); + + /** ConnectivityTest relatedProjects */ + relatedProjects?: (string[]|null); + + /** ConnectivityTest displayName */ + displayName?: (string|null); + + /** ConnectivityTest labels */ + labels?: ({ [k: string]: string }|null); + + /** ConnectivityTest createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails */ + reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails */ + probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks */ + bypassFirewallChecks?: (boolean|null); + } + + /** Represents a ConnectivityTest. */ + class ConnectivityTest implements IConnectivityTest { + + /** + * Constructs a new ConnectivityTest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IConnectivityTest); + + /** ConnectivityTest name. */ + public name: string; + + /** ConnectivityTest description. */ + public description: string; + + /** ConnectivityTest source. */ + public source?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest destination. */ + public destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); + + /** ConnectivityTest protocol. */ + public protocol: string; + + /** ConnectivityTest relatedProjects. */ + public relatedProjects: string[]; + + /** ConnectivityTest displayName. */ + public displayName: string; + + /** ConnectivityTest labels. */ + public labels: { [k: string]: string }; + + /** ConnectivityTest createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails. */ + public reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails. */ + public probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks. */ + public bypassFirewallChecks: boolean; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectivityTest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IConnectivityTest): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Verifies a ConnectivityTest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectivityTest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ConnectivityTest; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @param message ConnectivityTest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectivityTest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectivityTest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Endpoint. */ + interface IEndpoint { + + /** Endpoint ipAddress */ + ipAddress?: (string|null); + + /** Endpoint port */ + port?: (number|null); + + /** Endpoint instance */ + instance?: (string|null); + + /** Endpoint forwardingRule */ + forwardingRule?: (string|null); + + /** Endpoint forwardingRuleTarget */ + forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId */ + loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster */ + gkeMasterCluster?: (string|null); + + /** Endpoint fqdn */ + fqdn?: (string|null); + + /** Endpoint cloudSqlInstance */ + cloudSqlInstance?: (string|null); + + /** Endpoint redisInstance */ + redisInstance?: (string|null); + + /** Endpoint redisCluster */ + redisCluster?: (string|null); + + /** Endpoint cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network */ + network?: (string|null); + + /** Endpoint networkType */ + networkType?: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType|null); + + /** Endpoint projectId */ + projectId?: (string|null); + } + + /** Represents an Endpoint. */ + class Endpoint implements IEndpoint { + + /** + * Constructs a new Endpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IEndpoint); + + /** Endpoint ipAddress. */ + public ipAddress: string; + + /** Endpoint port. */ + public port: number; + + /** Endpoint instance. */ + public instance: string; + + /** Endpoint forwardingRule. */ + public forwardingRule: string; + + /** Endpoint forwardingRuleTarget. */ + public forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId. */ + public loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType. */ + public loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster. */ + public gkeMasterCluster: string; + + /** Endpoint fqdn. */ + public fqdn: string; + + /** Endpoint cloudSqlInstance. */ + public cloudSqlInstance: string; + + /** Endpoint redisInstance. */ + public redisInstance: string; + + /** Endpoint redisCluster. */ + public redisCluster: string; + + /** Endpoint cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network. */ + public network: string; + + /** Endpoint networkType. */ + public networkType: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType); + + /** Endpoint projectId. */ + public projectId: string; + + /** Endpoint _forwardingRuleTarget. */ + public _forwardingRuleTarget?: "forwardingRuleTarget"; + + /** Endpoint _loadBalancerId. */ + public _loadBalancerId?: "loadBalancerId"; + + /** Endpoint _loadBalancerType. */ + public _loadBalancerType?: "loadBalancerType"; + + /** + * Creates a new Endpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns Endpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IEndpoint): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Verifies an Endpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Endpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @param message Endpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Endpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Endpoint { + + /** NetworkType enum. */ + enum NetworkType { + NETWORK_TYPE_UNSPECIFIED = 0, + GCP_NETWORK = 1, + NON_GCP_NETWORK = 2 + } + + /** ForwardingRuleTarget enum. */ + enum ForwardingRuleTarget { + FORWARDING_RULE_TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + LOAD_BALANCER = 2, + VPN_GATEWAY = 3, + PSC = 4 + } + + /** Properties of a CloudFunctionEndpoint. */ + interface ICloudFunctionEndpoint { + + /** CloudFunctionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudFunctionEndpoint. */ + class CloudFunctionEndpoint implements ICloudFunctionEndpoint { + + /** + * Constructs a new CloudFunctionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint); + + /** CloudFunctionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Verifies a CloudFunctionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @param message CloudFunctionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionEndpoint. */ + interface IAppEngineVersionEndpoint { + + /** AppEngineVersionEndpoint uri */ + uri?: (string|null); + } + + /** Represents an AppEngineVersionEndpoint. */ + class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { + + /** + * Constructs a new AppEngineVersionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint); + + /** AppEngineVersionEndpoint uri. */ + public uri: string; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @param message AppEngineVersionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionEndpoint. */ + interface ICloudRunRevisionEndpoint { + + /** CloudRunRevisionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudRunRevisionEndpoint. */ + class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint); + + /** CloudRunRevisionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @param message CloudRunRevisionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReachabilityDetails. */ + interface IReachabilityDetails { + + /** ReachabilityDetails result */ + result?: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null); + + /** ReachabilityDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error */ + error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces */ + traces?: (google.cloud.networkmanagement.v1.ITrace[]|null); + } + + /** Represents a ReachabilityDetails. */ + class ReachabilityDetails implements IReachabilityDetails { + + /** + * Constructs a new ReachabilityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails); + + /** ReachabilityDetails result. */ + public result: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result); + + /** ReachabilityDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces. */ + public traces: google.cloud.networkmanagement.v1.ITrace[]; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ReachabilityDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Verifies a ReachabilityDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReachabilityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ReachabilityDetails; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @param message ReachabilityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReachabilityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReachabilityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReachabilityDetails { + + /** Result enum. */ + enum Result { + RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + AMBIGUOUS = 4, + UNDETERMINED = 5 + } + } + + /** Properties of a LatencyPercentile. */ + interface ILatencyPercentile { + + /** LatencyPercentile percent */ + percent?: (number|null); + + /** LatencyPercentile latencyMicros */ + latencyMicros?: (number|Long|string|null); + } + + /** Represents a LatencyPercentile. */ + class LatencyPercentile implements ILatencyPercentile { + + /** + * Constructs a new LatencyPercentile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile); + + /** LatencyPercentile percent. */ + public percent: number; + + /** LatencyPercentile latencyMicros. */ + public latencyMicros: (number|Long|string); + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyPercentile instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Verifies a LatencyPercentile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyPercentile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyPercentile; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @param message LatencyPercentile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyPercentile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyPercentile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LatencyDistribution. */ + interface ILatencyDistribution { + + /** LatencyDistribution latencyPercentiles */ + latencyPercentiles?: (google.cloud.networkmanagement.v1.ILatencyPercentile[]|null); + } + + /** Represents a LatencyDistribution. */ + class LatencyDistribution implements ILatencyDistribution { + + /** + * Constructs a new LatencyDistribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution); + + /** LatencyDistribution latencyPercentiles. */ + public latencyPercentiles: google.cloud.networkmanagement.v1.ILatencyPercentile[]; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyDistribution instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Verifies a LatencyDistribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyDistribution + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyDistribution; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @param message LatencyDistribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyDistribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyDistribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProbingDetails. */ + interface IProbingDetails { + + /** ProbingDetails result */ + result?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null); + + /** ProbingDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error */ + error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause */ + abortCause?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null); + + /** ProbingDetails sentProbeCount */ + sentProbeCount?: (number|null); + + /** ProbingDetails successfulProbeCount */ + successfulProbeCount?: (number|null); + + /** ProbingDetails endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** ProbingDetails probingLatency */ + probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation */ + destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); + } + + /** Represents a ProbingDetails. */ + class ProbingDetails implements IProbingDetails { + + /** + * Constructs a new ProbingDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IProbingDetails); + + /** ProbingDetails result. */ + public result: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult); + + /** ProbingDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause. */ + public abortCause: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause); + + /** ProbingDetails sentProbeCount. */ + public sentProbeCount: number; + + /** ProbingDetails successfulProbeCount. */ + public successfulProbeCount: number; + + /** ProbingDetails endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** ProbingDetails probingLatency. */ + public probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation. */ + public destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ProbingDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IProbingDetails): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Verifies a ProbingDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProbingDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @param message ProbingDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProbingDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProbingDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProbingDetails { + + /** ProbingResult enum. */ + enum ProbingResult { + PROBING_RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + REACHABILITY_INCONSISTENT = 3, + UNDETERMINED = 4 + } + + /** ProbingAbortCause enum. */ + enum ProbingAbortCause { + PROBING_ABORT_CAUSE_UNSPECIFIED = 0, + PERMISSION_DENIED = 1, + NO_SOURCE_LOCATION = 2 + } + + /** Properties of an EdgeLocation. */ + interface IEdgeLocation { + + /** EdgeLocation metropolitanArea */ + metropolitanArea?: (string|null); + } + + /** Represents an EdgeLocation. */ + class EdgeLocation implements IEdgeLocation { + + /** + * Constructs a new EdgeLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation); + + /** EdgeLocation metropolitanArea. */ + public metropolitanArea: string; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns EdgeLocation instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Verifies an EdgeLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EdgeLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @param message EdgeLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EdgeLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EdgeLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Trace. */ + interface ITrace { + + /** Trace endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Trace steps */ + steps?: (google.cloud.networkmanagement.v1.IStep[]|null); + + /** Trace forwardTraceId */ + forwardTraceId?: (number|null); + } + + /** Represents a Trace. */ + class Trace implements ITrace { + + /** + * Constructs a new Trace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ITrace); + + /** Trace endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Trace steps. */ + public steps: google.cloud.networkmanagement.v1.IStep[]; + + /** Trace forwardTraceId. */ + public forwardTraceId: number; + + /** + * Creates a new Trace instance using the specified properties. + * @param [properties] Properties to set + * @returns Trace instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ITrace): google.cloud.networkmanagement.v1.Trace; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Trace; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Trace; + + /** + * Verifies a Trace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Trace; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @param message Trace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Step. */ + interface IStep { + + /** Step description */ + description?: (string|null); + + /** Step state */ + state?: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State|null); + + /** Step causesDrop */ + causesDrop?: (boolean|null); + + /** Step projectId */ + projectId?: (string|null); + + /** Step instance */ + instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); + + /** Step firewall */ + firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); + + /** Step route */ + route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); + + /** Step endpoint */ + endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Step googleService */ + googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); + + /** Step forwardingRule */ + forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); + + /** Step vpnGateway */ + vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); + + /** Step vpnTunnel */ + vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); + + /** Step vpcConnector */ + vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); + + /** Step deliver */ + deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); + + /** Step forward */ + forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); + + /** Step abort */ + abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); + + /** Step drop */ + drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); + + /** Step loadBalancer */ + loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); + + /** Step network */ + network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); + + /** Step gkeMaster */ + gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance */ + cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance */ + redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); + + /** Step redisCluster */ + redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); + + /** Step cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); + + /** Step appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); + + /** Step nat */ + nat?: (google.cloud.networkmanagement.v1.INatInfo|null); + + /** Step proxyConnection */ + proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo */ + loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket */ + storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); + + /** Step serverlessNeg */ + serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); + } + + /** Represents a Step. */ + class Step implements IStep { + + /** + * Constructs a new Step. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IStep); + + /** Step description. */ + public description: string; + + /** Step state. */ + public state: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State); + + /** Step causesDrop. */ + public causesDrop: boolean; + + /** Step projectId. */ + public projectId: string; + + /** Step instance. */ + public instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); + + /** Step firewall. */ + public firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); + + /** Step route. */ + public route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); + + /** Step endpoint. */ + public endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); + + /** Step googleService. */ + public googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); + + /** Step forwardingRule. */ + public forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); + + /** Step vpnGateway. */ + public vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); + + /** Step vpnTunnel. */ + public vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); + + /** Step vpcConnector. */ + public vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); + + /** Step deliver. */ + public deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); + + /** Step forward. */ + public forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); + + /** Step abort. */ + public abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); + + /** Step drop. */ + public drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); + + /** Step loadBalancer. */ + public loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); + + /** Step network. */ + public network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); + + /** Step gkeMaster. */ + public gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance. */ + public cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance. */ + public redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); + + /** Step redisCluster. */ + public redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); + + /** Step cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); + + /** Step appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); + + /** Step nat. */ + public nat?: (google.cloud.networkmanagement.v1.INatInfo|null); + + /** Step proxyConnection. */ + public proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo. */ + public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket. */ + public storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); + + /** Step serverlessNeg. */ + public serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); + + /** Step stepInfo. */ + public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); + + /** + * Creates a new Step instance using the specified properties. + * @param [properties] Properties to set + * @returns Step instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IStep): google.cloud.networkmanagement.v1.Step; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Step message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Step; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Step; + + /** + * Verifies a Step message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Step + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Step; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @param message Step + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Step to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Step + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Step { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + START_FROM_INSTANCE = 1, + START_FROM_INTERNET = 2, + START_FROM_GOOGLE_SERVICE = 27, + START_FROM_PRIVATE_NETWORK = 3, + START_FROM_GKE_MASTER = 21, + START_FROM_CLOUD_SQL_INSTANCE = 22, + START_FROM_REDIS_INSTANCE = 32, + START_FROM_REDIS_CLUSTER = 33, + START_FROM_CLOUD_FUNCTION = 23, + START_FROM_APP_ENGINE_VERSION = 25, + START_FROM_CLOUD_RUN_REVISION = 26, + START_FROM_STORAGE_BUCKET = 29, + START_FROM_PSC_PUBLISHED_SERVICE = 30, + START_FROM_SERVERLESS_NEG = 31, + APPLY_INGRESS_FIREWALL_RULE = 4, + APPLY_EGRESS_FIREWALL_RULE = 5, + APPLY_ROUTE = 6, + APPLY_FORWARDING_RULE = 7, + ANALYZE_LOAD_BALANCER_BACKEND = 28, + SPOOFING_APPROVED = 8, + ARRIVE_AT_INSTANCE = 9, + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, + ARRIVE_AT_VPN_GATEWAY = 12, + ARRIVE_AT_VPN_TUNNEL = 13, + ARRIVE_AT_VPC_CONNECTOR = 24, + NAT = 14, + PROXY_CONNECTION = 15, + DELIVER = 16, + DROP = 17, + FORWARD = 18, + ABORT = 19, + VIEWER_PERMISSION_MISSING = 20 + } + } + + /** Properties of an InstanceInfo. */ + interface IInstanceInfo { + + /** InstanceInfo displayName */ + displayName?: (string|null); + + /** InstanceInfo uri */ + uri?: (string|null); + + /** InstanceInfo interface */ + "interface"?: (string|null); + + /** InstanceInfo networkUri */ + networkUri?: (string|null); + + /** InstanceInfo internalIp */ + internalIp?: (string|null); + + /** InstanceInfo externalIp */ + externalIp?: (string|null); + + /** InstanceInfo networkTags */ + networkTags?: (string[]|null); + + /** InstanceInfo serviceAccount */ + serviceAccount?: (string|null); + + /** InstanceInfo pscNetworkAttachmentUri */ + pscNetworkAttachmentUri?: (string|null); + } + + /** Represents an InstanceInfo. */ + class InstanceInfo implements IInstanceInfo { + + /** + * Constructs a new InstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IInstanceInfo); + + /** InstanceInfo displayName. */ + public displayName: string; + + /** InstanceInfo uri. */ + public uri: string; + + /** InstanceInfo interface. */ + public interface: string; + + /** InstanceInfo networkUri. */ + public networkUri: string; + + /** InstanceInfo internalIp. */ + public internalIp: string; + + /** InstanceInfo externalIp. */ + public externalIp: string; + + /** InstanceInfo networkTags. */ + public networkTags: string[]; + + /** InstanceInfo serviceAccount. */ + public serviceAccount: string; + + /** InstanceInfo pscNetworkAttachmentUri. */ + public pscNetworkAttachmentUri: string; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IInstanceInfo): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Verifies an InstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.InstanceInfo; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @param message InstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInfo. */ + interface INetworkInfo { + + /** NetworkInfo displayName */ + displayName?: (string|null); + + /** NetworkInfo uri */ + uri?: (string|null); + + /** NetworkInfo matchedSubnetUri */ + matchedSubnetUri?: (string|null); + + /** NetworkInfo matchedIpRange */ + matchedIpRange?: (string|null); + + /** NetworkInfo region */ + region?: (string|null); + } + + /** Represents a NetworkInfo. */ + class NetworkInfo implements INetworkInfo { + + /** + * Constructs a new NetworkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.INetworkInfo); + + /** NetworkInfo displayName. */ + public displayName: string; + + /** NetworkInfo uri. */ + public uri: string; + + /** NetworkInfo matchedSubnetUri. */ + public matchedSubnetUri: string; + + /** NetworkInfo matchedIpRange. */ + public matchedIpRange: string; + + /** NetworkInfo region. */ + public region: string; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.INetworkInfo): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Verifies a NetworkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NetworkInfo; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @param message NetworkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FirewallInfo. */ + interface IFirewallInfo { + + /** FirewallInfo displayName */ + displayName?: (string|null); + + /** FirewallInfo uri */ + uri?: (string|null); + + /** FirewallInfo direction */ + direction?: (string|null); + + /** FirewallInfo action */ + action?: (string|null); + + /** FirewallInfo priority */ + priority?: (number|null); + + /** FirewallInfo networkUri */ + networkUri?: (string|null); + + /** FirewallInfo targetTags */ + targetTags?: (string[]|null); + + /** FirewallInfo targetServiceAccounts */ + targetServiceAccounts?: (string[]|null); + + /** FirewallInfo policy */ + policy?: (string|null); + + /** FirewallInfo policyUri */ + policyUri?: (string|null); + + /** FirewallInfo firewallRuleType */ + firewallRuleType?: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null); + } + + /** Represents a FirewallInfo. */ + class FirewallInfo implements IFirewallInfo { + + /** + * Constructs a new FirewallInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IFirewallInfo); + + /** FirewallInfo displayName. */ + public displayName: string; + + /** FirewallInfo uri. */ + public uri: string; + + /** FirewallInfo direction. */ + public direction: string; + + /** FirewallInfo action. */ + public action: string; + + /** FirewallInfo priority. */ + public priority: number; + + /** FirewallInfo networkUri. */ + public networkUri: string; + + /** FirewallInfo targetTags. */ + public targetTags: string[]; + + /** FirewallInfo targetServiceAccounts. */ + public targetServiceAccounts: string[]; + + /** FirewallInfo policy. */ + public policy: string; + + /** FirewallInfo policyUri. */ + public policyUri: string; + + /** FirewallInfo firewallRuleType. */ + public firewallRuleType: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType); + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FirewallInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IFirewallInfo): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Verifies a FirewallInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirewallInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.FirewallInfo; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @param message FirewallInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirewallInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirewallInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FirewallInfo { + + /** FirewallRuleType enum. */ + enum FirewallRuleType { + FIREWALL_RULE_TYPE_UNSPECIFIED = 0, + HIERARCHICAL_FIREWALL_POLICY_RULE = 1, + VPC_FIREWALL_RULE = 2, + IMPLIED_VPC_FIREWALL_RULE = 3, + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, + NETWORK_FIREWALL_POLICY_RULE = 5, + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, + UNSUPPORTED_FIREWALL_POLICY_RULE = 100, + TRACKING_STATE = 101 + } + } + + /** Properties of a RouteInfo. */ + interface IRouteInfo { + + /** RouteInfo routeType */ + routeType?: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType|null); + + /** RouteInfo nextHopType */ + nextHopType?: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null); + + /** RouteInfo routeScope */ + routeScope?: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null); + + /** RouteInfo displayName */ + displayName?: (string|null); + + /** RouteInfo uri */ + uri?: (string|null); + + /** RouteInfo region */ + region?: (string|null); + + /** RouteInfo destIpRange */ + destIpRange?: (string|null); + + /** RouteInfo nextHop */ + nextHop?: (string|null); + + /** RouteInfo networkUri */ + networkUri?: (string|null); + + /** RouteInfo priority */ + priority?: (number|null); + + /** RouteInfo instanceTags */ + instanceTags?: (string[]|null); + + /** RouteInfo srcIpRange */ + srcIpRange?: (string|null); + + /** RouteInfo destPortRanges */ + destPortRanges?: (string[]|null); + + /** RouteInfo srcPortRanges */ + srcPortRanges?: (string[]|null); + + /** RouteInfo protocols */ + protocols?: (string[]|null); + + /** RouteInfo nccHubUri */ + nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri */ + nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri */ + advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri */ + advertisedRouteNextHopUri?: (string|null); + } + + /** Represents a RouteInfo. */ + class RouteInfo implements IRouteInfo { + + /** + * Constructs a new RouteInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRouteInfo); + + /** RouteInfo routeType. */ + public routeType: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType); + + /** RouteInfo nextHopType. */ + public nextHopType: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType); + + /** RouteInfo routeScope. */ + public routeScope: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope); + + /** RouteInfo displayName. */ + public displayName: string; + + /** RouteInfo uri. */ + public uri: string; + + /** RouteInfo region. */ + public region: string; + + /** RouteInfo destIpRange. */ + public destIpRange: string; + + /** RouteInfo nextHop. */ + public nextHop: string; + + /** RouteInfo networkUri. */ + public networkUri: string; + + /** RouteInfo priority. */ + public priority: number; + + /** RouteInfo instanceTags. */ + public instanceTags: string[]; + + /** RouteInfo srcIpRange. */ + public srcIpRange: string; + + /** RouteInfo destPortRanges. */ + public destPortRanges: string[]; + + /** RouteInfo srcPortRanges. */ + public srcPortRanges: string[]; + + /** RouteInfo protocols. */ + public protocols: string[]; + + /** RouteInfo nccHubUri. */ + public nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri. */ + public nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri. */ + public advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri. */ + public advertisedRouteNextHopUri?: (string|null); + + /** RouteInfo _nccHubUri. */ + public _nccHubUri?: "nccHubUri"; + + /** RouteInfo _nccSpokeUri. */ + public _nccSpokeUri?: "nccSpokeUri"; + + /** RouteInfo _advertisedRouteSourceRouterUri. */ + public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; + + /** RouteInfo _advertisedRouteNextHopUri. */ + public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; + + /** + * Creates a new RouteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RouteInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRouteInfo): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Verifies a RouteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RouteInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RouteInfo; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @param message RouteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RouteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RouteInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RouteInfo { + + /** RouteType enum. */ + enum RouteType { + ROUTE_TYPE_UNSPECIFIED = 0, + SUBNET = 1, + STATIC = 2, + DYNAMIC = 3, + PEERING_SUBNET = 4, + PEERING_STATIC = 5, + PEERING_DYNAMIC = 6, + POLICY_BASED = 7, + ADVERTISED = 101 + } + + /** NextHopType enum. */ + enum NextHopType { + NEXT_HOP_TYPE_UNSPECIFIED = 0, + NEXT_HOP_IP = 1, + NEXT_HOP_INSTANCE = 2, + NEXT_HOP_NETWORK = 3, + NEXT_HOP_PEERING = 4, + NEXT_HOP_INTERCONNECT = 5, + NEXT_HOP_VPN_TUNNEL = 6, + NEXT_HOP_VPN_GATEWAY = 7, + NEXT_HOP_INTERNET_GATEWAY = 8, + NEXT_HOP_BLACKHOLE = 9, + NEXT_HOP_ILB = 10, + NEXT_HOP_ROUTER_APPLIANCE = 11, + NEXT_HOP_NCC_HUB = 12 + } + + /** RouteScope enum. */ + enum RouteScope { + ROUTE_SCOPE_UNSPECIFIED = 0, + NETWORK = 1, + NCC_HUB = 2 + } + } + + /** Properties of a GoogleServiceInfo. */ + interface IGoogleServiceInfo { + + /** GoogleServiceInfo sourceIp */ + sourceIp?: (string|null); + + /** GoogleServiceInfo googleServiceType */ + googleServiceType?: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null); + } + + /** Represents a GoogleServiceInfo. */ + class GoogleServiceInfo implements IGoogleServiceInfo { + + /** + * Constructs a new GoogleServiceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo); + + /** GoogleServiceInfo sourceIp. */ + public sourceIp: string; + + /** GoogleServiceInfo googleServiceType. */ + public googleServiceType: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType); + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleServiceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Verifies a GoogleServiceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleServiceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GoogleServiceInfo; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @param message GoogleServiceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleServiceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GoogleServiceInfo { + + /** GoogleServiceType enum. */ + enum GoogleServiceType { + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, + IAP = 1, + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, + CLOUD_DNS = 3, + GOOGLE_API = 4, + GOOGLE_API_PSC = 5, + GOOGLE_API_VPC_SC = 6 + } + } + + /** Properties of a ForwardingRuleInfo. */ + interface IForwardingRuleInfo { + + /** ForwardingRuleInfo displayName */ + displayName?: (string|null); + + /** ForwardingRuleInfo uri */ + uri?: (string|null); + + /** ForwardingRuleInfo matchedProtocol */ + matchedProtocol?: (string|null); + + /** ForwardingRuleInfo matchedPortRange */ + matchedPortRange?: (string|null); + + /** ForwardingRuleInfo vip */ + vip?: (string|null); + + /** ForwardingRuleInfo target */ + target?: (string|null); + + /** ForwardingRuleInfo networkUri */ + networkUri?: (string|null); + + /** ForwardingRuleInfo region */ + region?: (string|null); + + /** ForwardingRuleInfo loadBalancerName */ + loadBalancerName?: (string|null); + + /** ForwardingRuleInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** ForwardingRuleInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a ForwardingRuleInfo. */ + class ForwardingRuleInfo implements IForwardingRuleInfo { + + /** + * Constructs a new ForwardingRuleInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo); + + /** ForwardingRuleInfo displayName. */ + public displayName: string; + + /** ForwardingRuleInfo uri. */ + public uri: string; + + /** ForwardingRuleInfo matchedProtocol. */ + public matchedProtocol: string; + + /** ForwardingRuleInfo matchedPortRange. */ + public matchedPortRange: string; + + /** ForwardingRuleInfo vip. */ + public vip: string; + + /** ForwardingRuleInfo target. */ + public target: string; + + /** ForwardingRuleInfo networkUri. */ + public networkUri: string; + + /** ForwardingRuleInfo region. */ + public region: string; + + /** ForwardingRuleInfo loadBalancerName. */ + public loadBalancerName: string; + + /** ForwardingRuleInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** ForwardingRuleInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardingRuleInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Verifies a ForwardingRuleInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardingRuleInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardingRuleInfo; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @param message ForwardingRuleInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerInfo. */ + interface ILoadBalancerInfo { + + /** LoadBalancerInfo loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null); + + /** LoadBalancerInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerInfo backends */ + backends?: (google.cloud.networkmanagement.v1.ILoadBalancerBackend[]|null); + + /** LoadBalancerInfo backendType */ + backendType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null); + + /** LoadBalancerInfo backendUri */ + backendUri?: (string|null); + } + + /** Represents a LoadBalancerInfo. */ + class LoadBalancerInfo implements ILoadBalancerInfo { + + /** + * Constructs a new LoadBalancerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo); + + /** LoadBalancerInfo loadBalancerType. */ + public loadBalancerType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType); + + /** LoadBalancerInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerInfo backends. */ + public backends: google.cloud.networkmanagement.v1.ILoadBalancerBackend[]; + + /** LoadBalancerInfo backendType. */ + public backendType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType); + + /** LoadBalancerInfo backendUri. */ + public backendUri: string; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Verifies a LoadBalancerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerInfo; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @param message LoadBalancerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerInfo { + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + INTERNAL_TCP_UDP = 1, + NETWORK_TCP_UDP = 2, + HTTP_PROXY = 3, + TCP_PROXY = 4, + SSL_PROXY = 5 + } + + /** BackendType enum. */ + enum BackendType { + BACKEND_TYPE_UNSPECIFIED = 0, + BACKEND_SERVICE = 1, + TARGET_POOL = 2, + TARGET_INSTANCE = 3 + } + } + + /** Properties of a LoadBalancerBackend. */ + interface ILoadBalancerBackend { + + /** LoadBalancerBackend displayName */ + displayName?: (string|null); + + /** LoadBalancerBackend uri */ + uri?: (string|null); + + /** LoadBalancerBackend healthCheckFirewallState */ + healthCheckFirewallState?: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules */ + healthCheckAllowingFirewallRules?: (string[]|null); + + /** LoadBalancerBackend healthCheckBlockingFirewallRules */ + healthCheckBlockingFirewallRules?: (string[]|null); + } + + /** Represents a LoadBalancerBackend. */ + class LoadBalancerBackend implements ILoadBalancerBackend { + + /** + * Constructs a new LoadBalancerBackend. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend); + + /** LoadBalancerBackend displayName. */ + public displayName: string; + + /** LoadBalancerBackend uri. */ + public uri: string; + + /** LoadBalancerBackend healthCheckFirewallState. */ + public healthCheckFirewallState: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ + public healthCheckAllowingFirewallRules: string[]; + + /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ + public healthCheckBlockingFirewallRules: string[]; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackend instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Verifies a LoadBalancerBackend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackend + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackend; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @param message LoadBalancerBackend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackend + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackend { + + /** HealthCheckFirewallState enum. */ + enum HealthCheckFirewallState { + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, + CONFIGURED = 1, + MISCONFIGURED = 2 + } + } + + /** Properties of a VpnGatewayInfo. */ + interface IVpnGatewayInfo { + + /** VpnGatewayInfo displayName */ + displayName?: (string|null); + + /** VpnGatewayInfo uri */ + uri?: (string|null); + + /** VpnGatewayInfo networkUri */ + networkUri?: (string|null); + + /** VpnGatewayInfo ipAddress */ + ipAddress?: (string|null); + + /** VpnGatewayInfo vpnTunnelUri */ + vpnTunnelUri?: (string|null); + + /** VpnGatewayInfo region */ + region?: (string|null); + } + + /** Represents a VpnGatewayInfo. */ + class VpnGatewayInfo implements IVpnGatewayInfo { + + /** + * Constructs a new VpnGatewayInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo); + + /** VpnGatewayInfo displayName. */ + public displayName: string; + + /** VpnGatewayInfo uri. */ + public uri: string; + + /** VpnGatewayInfo networkUri. */ + public networkUri: string; + + /** VpnGatewayInfo ipAddress. */ + public ipAddress: string; + + /** VpnGatewayInfo vpnTunnelUri. */ + public vpnTunnelUri: string; + + /** VpnGatewayInfo region. */ + public region: string; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnGatewayInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Verifies a VpnGatewayInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnGatewayInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnGatewayInfo; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @param message VpnGatewayInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnGatewayInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpnTunnelInfo. */ + interface IVpnTunnelInfo { + + /** VpnTunnelInfo displayName */ + displayName?: (string|null); + + /** VpnTunnelInfo uri */ + uri?: (string|null); + + /** VpnTunnelInfo sourceGateway */ + sourceGateway?: (string|null); + + /** VpnTunnelInfo remoteGateway */ + remoteGateway?: (string|null); + + /** VpnTunnelInfo remoteGatewayIp */ + remoteGatewayIp?: (string|null); + + /** VpnTunnelInfo sourceGatewayIp */ + sourceGatewayIp?: (string|null); + + /** VpnTunnelInfo networkUri */ + networkUri?: (string|null); + + /** VpnTunnelInfo region */ + region?: (string|null); + + /** VpnTunnelInfo routingType */ + routingType?: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null); + } + + /** Represents a VpnTunnelInfo. */ + class VpnTunnelInfo implements IVpnTunnelInfo { + + /** + * Constructs a new VpnTunnelInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo); + + /** VpnTunnelInfo displayName. */ + public displayName: string; + + /** VpnTunnelInfo uri. */ + public uri: string; + + /** VpnTunnelInfo sourceGateway. */ + public sourceGateway: string; + + /** VpnTunnelInfo remoteGateway. */ + public remoteGateway: string; + + /** VpnTunnelInfo remoteGatewayIp. */ + public remoteGatewayIp: string; + + /** VpnTunnelInfo sourceGatewayIp. */ + public sourceGatewayIp: string; + + /** VpnTunnelInfo networkUri. */ + public networkUri: string; + + /** VpnTunnelInfo region. */ + public region: string; + + /** VpnTunnelInfo routingType. */ + public routingType: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType); + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnTunnelInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Verifies a VpnTunnelInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnTunnelInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnTunnelInfo; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @param message VpnTunnelInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnTunnelInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VpnTunnelInfo { + + /** RoutingType enum. */ + enum RoutingType { + ROUTING_TYPE_UNSPECIFIED = 0, + ROUTE_BASED = 1, + POLICY_BASED = 2, + DYNAMIC = 3 + } + } + + /** Properties of an EndpointInfo. */ + interface IEndpointInfo { + + /** EndpointInfo sourceIp */ + sourceIp?: (string|null); + + /** EndpointInfo destinationIp */ + destinationIp?: (string|null); + + /** EndpointInfo protocol */ + protocol?: (string|null); + + /** EndpointInfo sourcePort */ + sourcePort?: (number|null); + + /** EndpointInfo destinationPort */ + destinationPort?: (number|null); + + /** EndpointInfo sourceNetworkUri */ + sourceNetworkUri?: (string|null); + + /** EndpointInfo destinationNetworkUri */ + destinationNetworkUri?: (string|null); + + /** EndpointInfo sourceAgentUri */ + sourceAgentUri?: (string|null); + } + + /** Represents an EndpointInfo. */ + class EndpointInfo implements IEndpointInfo { + + /** + * Constructs a new EndpointInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IEndpointInfo); + + /** EndpointInfo sourceIp. */ + public sourceIp: string; + + /** EndpointInfo destinationIp. */ + public destinationIp: string; + + /** EndpointInfo protocol. */ + public protocol: string; + + /** EndpointInfo sourcePort. */ + public sourcePort: number; + + /** EndpointInfo destinationPort. */ + public destinationPort: number; + + /** EndpointInfo sourceNetworkUri. */ + public sourceNetworkUri: string; + + /** EndpointInfo destinationNetworkUri. */ + public destinationNetworkUri: string; + + /** EndpointInfo sourceAgentUri. */ + public sourceAgentUri: string; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EndpointInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IEndpointInfo): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Verifies an EndpointInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndpointInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.EndpointInfo; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @param message EndpointInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndpointInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndpointInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeliverInfo. */ + interface IDeliverInfo { + + /** DeliverInfo target */ + target?: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target|null); + + /** DeliverInfo resourceUri */ + resourceUri?: (string|null); + + /** DeliverInfo ipAddress */ + ipAddress?: (string|null); + + /** DeliverInfo storageBucket */ + storageBucket?: (string|null); + + /** DeliverInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a DeliverInfo. */ + class DeliverInfo implements IDeliverInfo { + + /** + * Constructs a new DeliverInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IDeliverInfo); + + /** DeliverInfo target. */ + public target: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target); + + /** DeliverInfo resourceUri. */ + public resourceUri: string; + + /** DeliverInfo ipAddress. */ + public ipAddress: string; + + /** DeliverInfo storageBucket. */ + public storageBucket: string; + + /** DeliverInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DeliverInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IDeliverInfo): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Verifies a DeliverInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeliverInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeliverInfo; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @param message DeliverInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeliverInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeliverInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeliverInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + INTERNET = 2, + GOOGLE_API = 3, + GKE_MASTER = 4, + CLOUD_SQL_INSTANCE = 5, + PSC_PUBLISHED_SERVICE = 6, + PSC_GOOGLE_API = 7, + PSC_VPC_SC = 8, + SERVERLESS_NEG = 9, + STORAGE_BUCKET = 10, + PRIVATE_NETWORK = 11, + CLOUD_FUNCTION = 12, + APP_ENGINE_VERSION = 13, + CLOUD_RUN_REVISION = 14, + GOOGLE_MANAGED_SERVICE = 15, + REDIS_INSTANCE = 16, + REDIS_CLUSTER = 17 + } + } + + /** Properties of a ForwardInfo. */ + interface IForwardInfo { + + /** ForwardInfo target */ + target?: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target|null); + + /** ForwardInfo resourceUri */ + resourceUri?: (string|null); + + /** ForwardInfo ipAddress */ + ipAddress?: (string|null); + } + + /** Represents a ForwardInfo. */ + class ForwardInfo implements IForwardInfo { + + /** + * Constructs a new ForwardInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IForwardInfo); + + /** ForwardInfo target. */ + public target: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target); + + /** ForwardInfo resourceUri. */ + public resourceUri: string; + + /** ForwardInfo ipAddress. */ + public ipAddress: string; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IForwardInfo): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Verifies a ForwardInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardInfo; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @param message ForwardInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ForwardInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + PEERING_VPC = 1, + VPN_GATEWAY = 2, + INTERCONNECT = 3, + GKE_MASTER = 4, + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, + CLOUD_SQL_INSTANCE = 6, + ANOTHER_PROJECT = 7, + NCC_HUB = 8, + ROUTER_APPLIANCE = 9 + } + } + + /** Properties of an AbortInfo. */ + interface IAbortInfo { + + /** AbortInfo cause */ + cause?: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause|null); + + /** AbortInfo resourceUri */ + resourceUri?: (string|null); + + /** AbortInfo ipAddress */ + ipAddress?: (string|null); + + /** AbortInfo projectsMissingPermission */ + projectsMissingPermission?: (string[]|null); + } + + /** Represents an AbortInfo. */ + class AbortInfo implements IAbortInfo { + + /** + * Constructs a new AbortInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IAbortInfo); + + /** AbortInfo cause. */ + public cause: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause); + + /** AbortInfo resourceUri. */ + public resourceUri: string; + + /** AbortInfo ipAddress. */ + public ipAddress: string; + + /** AbortInfo projectsMissingPermission. */ + public projectsMissingPermission: string[]; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AbortInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IAbortInfo): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Verifies an AbortInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbortInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AbortInfo; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @param message AbortInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbortInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbortInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AbortInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_NETWORK = 1, + UNKNOWN_PROJECT = 3, + NO_EXTERNAL_IP = 7, + UNINTENDED_DESTINATION = 8, + SOURCE_ENDPOINT_NOT_FOUND = 11, + MISMATCHED_SOURCE_NETWORK = 12, + DESTINATION_ENDPOINT_NOT_FOUND = 13, + MISMATCHED_DESTINATION_NETWORK = 14, + UNKNOWN_IP = 2, + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, + PERMISSION_DENIED = 4, + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, + NO_SOURCE_LOCATION = 5, + INVALID_ARGUMENT = 6, + TRACE_TOO_LONG = 9, + INTERNAL_ERROR = 10, + UNSUPPORTED = 15, + MISMATCHED_IP_VERSION = 16, + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, + RESOURCE_CONFIG_NOT_FOUND = 18, + VM_INSTANCE_CONFIG_NOT_FOUND = 24, + NETWORK_CONFIG_NOT_FOUND = 25, + FIREWALL_CONFIG_NOT_FOUND = 26, + ROUTE_CONFIG_NOT_FOUND = 27, + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, + NON_ROUTABLE_IP_ADDRESS = 22, + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 + } + } + + /** Properties of a DropInfo. */ + interface IDropInfo { + + /** DropInfo cause */ + cause?: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause|null); + + /** DropInfo resourceUri */ + resourceUri?: (string|null); + + /** DropInfo sourceIp */ + sourceIp?: (string|null); + + /** DropInfo destinationIp */ + destinationIp?: (string|null); + + /** DropInfo region */ + region?: (string|null); + } + + /** Represents a DropInfo. */ + class DropInfo implements IDropInfo { + + /** + * Constructs a new DropInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IDropInfo); + + /** DropInfo cause. */ + public cause: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause); + + /** DropInfo resourceUri. */ + public resourceUri: string; + + /** DropInfo sourceIp. */ + public sourceIp: string; + + /** DropInfo destinationIp. */ + public destinationIp: string; + + /** DropInfo region. */ + public region: string; + + /** + * Creates a new DropInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DropInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IDropInfo): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Verifies a DropInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DropInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DropInfo; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @param message DropInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DropInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DropInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DropInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_EXTERNAL_ADDRESS = 1, + FOREIGN_IP_DISALLOWED = 2, + FIREWALL_RULE = 3, + NO_ROUTE = 4, + ROUTE_BLACKHOLE = 5, + ROUTE_WRONG_NETWORK = 6, + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, + PRIVATE_TRAFFIC_TO_INTERNET = 7, + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, + NO_EXTERNAL_ADDRESS = 9, + UNKNOWN_INTERNAL_ADDRESS = 10, + FORWARDING_RULE_MISMATCH = 11, + FORWARDING_RULE_NO_INSTANCES = 12, + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, + INSTANCE_NOT_RUNNING = 14, + GKE_CLUSTER_NOT_RUNNING = 27, + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, + REDIS_INSTANCE_NOT_RUNNING = 68, + REDIS_CLUSTER_NOT_RUNNING = 69, + TRAFFIC_TYPE_BLOCKED = 15, + GKE_MASTER_UNAUTHORIZED_ACCESS = 16, + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, + DROPPED_INSIDE_GKE_SERVICE = 18, + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, + GKE_PSC_ENDPOINT_MISSING = 36, + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, + GKE_CONTROL_PLANE_REGION_MISMATCH = 30, + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, + GKE_CONTROL_PLANE_NO_ROUTE = 32, + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, + CLOUD_SQL_INSTANCE_NO_ROUTE = 35, + CLOUD_SQL_CONNECTOR_REQUIRED = 63, + CLOUD_FUNCTION_NOT_ACTIVE = 22, + VPC_CONNECTOR_NOT_SET = 23, + VPC_CONNECTOR_NOT_RUNNING = 24, + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, + FORWARDING_RULE_REGION_MISMATCH = 25, + PSC_CONNECTION_NOT_ACCEPTED = 26, + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, + PSC_TRANSITIVITY_NOT_PROPAGATED = 64, + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, + CLOUD_RUN_REVISION_NOT_READY = 29, + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, + CLOUD_NAT_NO_ADDRESSES = 40, + ROUTING_LOOP = 59, + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, + REDIS_INSTANCE_UNSUPPORTED_PORT = 71, + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, + REDIS_INSTANCE_NO_EXTERNAL_IP = 74, + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, + REDIS_CLUSTER_UNSUPPORTED_PORT = 76, + REDIS_CLUSTER_NO_EXTERNAL_IP = 77, + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 + } + } + + /** Properties of a GKEMasterInfo. */ + interface IGKEMasterInfo { + + /** GKEMasterInfo clusterUri */ + clusterUri?: (string|null); + + /** GKEMasterInfo clusterNetworkUri */ + clusterNetworkUri?: (string|null); + + /** GKEMasterInfo internalIp */ + internalIp?: (string|null); + + /** GKEMasterInfo externalIp */ + externalIp?: (string|null); + + /** GKEMasterInfo dnsEndpoint */ + dnsEndpoint?: (string|null); + } + + /** Represents a GKEMasterInfo. */ + class GKEMasterInfo implements IGKEMasterInfo { + + /** + * Constructs a new GKEMasterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo); + + /** GKEMasterInfo clusterUri. */ + public clusterUri: string; + + /** GKEMasterInfo clusterNetworkUri. */ + public clusterNetworkUri: string; + + /** GKEMasterInfo internalIp. */ + public internalIp: string; + + /** GKEMasterInfo externalIp. */ + public externalIp: string; + + /** GKEMasterInfo dnsEndpoint. */ + public dnsEndpoint: string; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GKEMasterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Verifies a GKEMasterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GKEMasterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GKEMasterInfo; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @param message GKEMasterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GKEMasterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GKEMasterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSQLInstanceInfo. */ + interface ICloudSQLInstanceInfo { + + /** CloudSQLInstanceInfo displayName */ + displayName?: (string|null); + + /** CloudSQLInstanceInfo uri */ + uri?: (string|null); + + /** CloudSQLInstanceInfo networkUri */ + networkUri?: (string|null); + + /** CloudSQLInstanceInfo internalIp */ + internalIp?: (string|null); + + /** CloudSQLInstanceInfo externalIp */ + externalIp?: (string|null); + + /** CloudSQLInstanceInfo region */ + region?: (string|null); + } + + /** Represents a CloudSQLInstanceInfo. */ + class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { + + /** + * Constructs a new CloudSQLInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo); + + /** CloudSQLInstanceInfo displayName. */ + public displayName: string; + + /** CloudSQLInstanceInfo uri. */ + public uri: string; + + /** CloudSQLInstanceInfo networkUri. */ + public networkUri: string; + + /** CloudSQLInstanceInfo internalIp. */ + public internalIp: string; + + /** CloudSQLInstanceInfo externalIp. */ + public externalIp: string; + + /** CloudSQLInstanceInfo region. */ + public region: string; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSQLInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSQLInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @param message CloudSQLInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisInstanceInfo. */ + interface IRedisInstanceInfo { + + /** RedisInstanceInfo displayName */ + displayName?: (string|null); + + /** RedisInstanceInfo uri */ + uri?: (string|null); + + /** RedisInstanceInfo networkUri */ + networkUri?: (string|null); + + /** RedisInstanceInfo primaryEndpointIp */ + primaryEndpointIp?: (string|null); + + /** RedisInstanceInfo readEndpointIp */ + readEndpointIp?: (string|null); + + /** RedisInstanceInfo region */ + region?: (string|null); + } + + /** Represents a RedisInstanceInfo. */ + class RedisInstanceInfo implements IRedisInstanceInfo { + + /** + * Constructs a new RedisInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo); + + /** RedisInstanceInfo displayName. */ + public displayName: string; + + /** RedisInstanceInfo uri. */ + public uri: string; + + /** RedisInstanceInfo networkUri. */ + public networkUri: string; + + /** RedisInstanceInfo primaryEndpointIp. */ + public primaryEndpointIp: string; + + /** RedisInstanceInfo readEndpointIp. */ + public readEndpointIp: string; + + /** RedisInstanceInfo region. */ + public region: string; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Verifies a RedisInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisInstanceInfo; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @param message RedisInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisClusterInfo. */ + interface IRedisClusterInfo { + + /** RedisClusterInfo displayName */ + displayName?: (string|null); + + /** RedisClusterInfo uri */ + uri?: (string|null); + + /** RedisClusterInfo networkUri */ + networkUri?: (string|null); + + /** RedisClusterInfo discoveryEndpointIpAddress */ + discoveryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo secondaryEndpointIpAddress */ + secondaryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo location */ + location?: (string|null); + } + + /** Represents a RedisClusterInfo. */ + class RedisClusterInfo implements IRedisClusterInfo { + + /** + * Constructs a new RedisClusterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo); + + /** RedisClusterInfo displayName. */ + public displayName: string; + + /** RedisClusterInfo uri. */ + public uri: string; + + /** RedisClusterInfo networkUri. */ + public networkUri: string; + + /** RedisClusterInfo discoveryEndpointIpAddress. */ + public discoveryEndpointIpAddress: string; + + /** RedisClusterInfo secondaryEndpointIpAddress. */ + public secondaryEndpointIpAddress: string; + + /** RedisClusterInfo location. */ + public location: string; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisClusterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Verifies a RedisClusterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisClusterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisClusterInfo; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @param message RedisClusterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisClusterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisClusterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudFunctionInfo. */ + interface ICloudFunctionInfo { + + /** CloudFunctionInfo displayName */ + displayName?: (string|null); + + /** CloudFunctionInfo uri */ + uri?: (string|null); + + /** CloudFunctionInfo location */ + location?: (string|null); + + /** CloudFunctionInfo versionId */ + versionId?: (number|Long|string|null); + } + + /** Represents a CloudFunctionInfo. */ + class CloudFunctionInfo implements ICloudFunctionInfo { + + /** + * Constructs a new CloudFunctionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo); + + /** CloudFunctionInfo displayName. */ + public displayName: string; + + /** CloudFunctionInfo uri. */ + public uri: string; + + /** CloudFunctionInfo location. */ + public location: string; + + /** CloudFunctionInfo versionId. */ + public versionId: (number|Long|string); + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Verifies a CloudFunctionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudFunctionInfo; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @param message CloudFunctionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionInfo. */ + interface ICloudRunRevisionInfo { + + /** CloudRunRevisionInfo displayName */ + displayName?: (string|null); + + /** CloudRunRevisionInfo uri */ + uri?: (string|null); + + /** CloudRunRevisionInfo location */ + location?: (string|null); + + /** CloudRunRevisionInfo serviceUri */ + serviceUri?: (string|null); + } + + /** Represents a CloudRunRevisionInfo. */ + class CloudRunRevisionInfo implements ICloudRunRevisionInfo { + + /** + * Constructs a new CloudRunRevisionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo); + + /** CloudRunRevisionInfo displayName. */ + public displayName: string; + + /** CloudRunRevisionInfo uri. */ + public uri: string; + + /** CloudRunRevisionInfo location. */ + public location: string; + + /** CloudRunRevisionInfo serviceUri. */ + public serviceUri: string; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Verifies a CloudRunRevisionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @param message CloudRunRevisionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionInfo. */ + interface IAppEngineVersionInfo { + + /** AppEngineVersionInfo displayName */ + displayName?: (string|null); + + /** AppEngineVersionInfo uri */ + uri?: (string|null); + + /** AppEngineVersionInfo runtime */ + runtime?: (string|null); + + /** AppEngineVersionInfo environment */ + environment?: (string|null); + } + + /** Represents an AppEngineVersionInfo. */ + class AppEngineVersionInfo implements IAppEngineVersionInfo { + + /** + * Constructs a new AppEngineVersionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo); + + /** AppEngineVersionInfo displayName. */ + public displayName: string; + + /** AppEngineVersionInfo uri. */ + public uri: string; + + /** AppEngineVersionInfo runtime. */ + public runtime: string; + + /** AppEngineVersionInfo environment. */ + public environment: string; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Verifies an AppEngineVersionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AppEngineVersionInfo; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @param message AppEngineVersionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcConnectorInfo. */ + interface IVpcConnectorInfo { + + /** VpcConnectorInfo displayName */ + displayName?: (string|null); + + /** VpcConnectorInfo uri */ + uri?: (string|null); + + /** VpcConnectorInfo location */ + location?: (string|null); + } + + /** Represents a VpcConnectorInfo. */ + class VpcConnectorInfo implements IVpcConnectorInfo { + + /** + * Constructs a new VpcConnectorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo); + + /** VpcConnectorInfo displayName. */ + public displayName: string; + + /** VpcConnectorInfo uri. */ + public uri: string; + + /** VpcConnectorInfo location. */ + public location: string; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcConnectorInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Verifies a VpcConnectorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcConnectorInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpcConnectorInfo; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @param message VpcConnectorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcConnectorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NatInfo. */ + interface INatInfo { + + /** NatInfo type */ + type?: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type|null); + + /** NatInfo protocol */ + protocol?: (string|null); + + /** NatInfo networkUri */ + networkUri?: (string|null); + + /** NatInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** NatInfo newSourceIp */ + newSourceIp?: (string|null); + + /** NatInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** NatInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** NatInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** NatInfo newSourcePort */ + newSourcePort?: (number|null); + + /** NatInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** NatInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** NatInfo routerUri */ + routerUri?: (string|null); + + /** NatInfo natGatewayName */ + natGatewayName?: (string|null); + } + + /** Represents a NatInfo. */ + class NatInfo implements INatInfo { + + /** + * Constructs a new NatInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.INatInfo); + + /** NatInfo type. */ + public type: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type); + + /** NatInfo protocol. */ + public protocol: string; + + /** NatInfo networkUri. */ + public networkUri: string; + + /** NatInfo oldSourceIp. */ + public oldSourceIp: string; + + /** NatInfo newSourceIp. */ + public newSourceIp: string; + + /** NatInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** NatInfo newDestinationIp. */ + public newDestinationIp: string; + + /** NatInfo oldSourcePort. */ + public oldSourcePort: number; + + /** NatInfo newSourcePort. */ + public newSourcePort: number; + + /** NatInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** NatInfo newDestinationPort. */ + public newDestinationPort: number; + + /** NatInfo routerUri. */ + public routerUri: string; + + /** NatInfo natGatewayName. */ + public natGatewayName: string; + + /** + * Creates a new NatInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NatInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.INatInfo): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Verifies a NatInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NatInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NatInfo; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @param message NatInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NatInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NatInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NatInfo { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INTERNAL_TO_EXTERNAL = 1, + EXTERNAL_TO_INTERNAL = 2, + CLOUD_NAT = 3, + PRIVATE_SERVICE_CONNECT = 4 + } + } + + /** Properties of a ProxyConnectionInfo. */ + interface IProxyConnectionInfo { + + /** ProxyConnectionInfo protocol */ + protocol?: (string|null); + + /** ProxyConnectionInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** ProxyConnectionInfo newSourceIp */ + newSourceIp?: (string|null); + + /** ProxyConnectionInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** ProxyConnectionInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** ProxyConnectionInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** ProxyConnectionInfo newSourcePort */ + newSourcePort?: (number|null); + + /** ProxyConnectionInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** ProxyConnectionInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** ProxyConnectionInfo subnetUri */ + subnetUri?: (string|null); + + /** ProxyConnectionInfo networkUri */ + networkUri?: (string|null); + } + + /** Represents a ProxyConnectionInfo. */ + class ProxyConnectionInfo implements IProxyConnectionInfo { + + /** + * Constructs a new ProxyConnectionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo); + + /** ProxyConnectionInfo protocol. */ + public protocol: string; + + /** ProxyConnectionInfo oldSourceIp. */ + public oldSourceIp: string; + + /** ProxyConnectionInfo newSourceIp. */ + public newSourceIp: string; + + /** ProxyConnectionInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** ProxyConnectionInfo newDestinationIp. */ + public newDestinationIp: string; + + /** ProxyConnectionInfo oldSourcePort. */ + public oldSourcePort: number; + + /** ProxyConnectionInfo newSourcePort. */ + public newSourcePort: number; + + /** ProxyConnectionInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** ProxyConnectionInfo newDestinationPort. */ + public newDestinationPort: number; + + /** ProxyConnectionInfo subnetUri. */ + public subnetUri: string; + + /** ProxyConnectionInfo networkUri. */ + public networkUri: string; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProxyConnectionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Verifies a ProxyConnectionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProxyConnectionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProxyConnectionInfo; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @param message ProxyConnectionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerBackendInfo. */ + interface ILoadBalancerBackendInfo { + + /** LoadBalancerBackendInfo name */ + name?: (string|null); + + /** LoadBalancerBackendInfo instanceUri */ + instanceUri?: (string|null); + + /** LoadBalancerBackendInfo backendServiceUri */ + backendServiceUri?: (string|null); + + /** LoadBalancerBackendInfo instanceGroupUri */ + instanceGroupUri?: (string|null); + + /** LoadBalancerBackendInfo networkEndpointGroupUri */ + networkEndpointGroupUri?: (string|null); + + /** LoadBalancerBackendInfo backendBucketUri */ + backendBucketUri?: (string|null); + + /** LoadBalancerBackendInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** LoadBalancerBackendInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + + /** LoadBalancerBackendInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ + healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); + } + + /** Represents a LoadBalancerBackendInfo. */ + class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { + + /** + * Constructs a new LoadBalancerBackendInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo); + + /** LoadBalancerBackendInfo name. */ + public name: string; + + /** LoadBalancerBackendInfo instanceUri. */ + public instanceUri: string; + + /** LoadBalancerBackendInfo backendServiceUri. */ + public backendServiceUri: string; + + /** LoadBalancerBackendInfo instanceGroupUri. */ + public instanceGroupUri: string; + + /** LoadBalancerBackendInfo networkEndpointGroupUri. */ + public networkEndpointGroupUri: string; + + /** LoadBalancerBackendInfo backendBucketUri. */ + public backendBucketUri: string; + + /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** LoadBalancerBackendInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** LoadBalancerBackendInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ + public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackendInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackendInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @param message LoadBalancerBackendInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackendInfo { + + /** HealthCheckFirewallsConfigState enum. */ + enum HealthCheckFirewallsConfigState { + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, + FIREWALLS_CONFIGURED = 1, + FIREWALLS_PARTIALLY_CONFIGURED = 2, + FIREWALLS_NOT_CONFIGURED = 3, + FIREWALLS_UNSUPPORTED = 4 + } + } + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + HTTPS_ADVANCED_LOAD_BALANCER = 1, + HTTPS_LOAD_BALANCER = 2, + REGIONAL_HTTPS_LOAD_BALANCER = 3, + INTERNAL_HTTPS_LOAD_BALANCER = 4, + SSL_PROXY_LOAD_BALANCER = 5, + TCP_PROXY_LOAD_BALANCER = 6, + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, + NETWORK_LOAD_BALANCER = 8, + LEGACY_NETWORK_LOAD_BALANCER = 9, + TCP_UDP_INTERNAL_LOAD_BALANCER = 10 + } + + /** Properties of a StorageBucketInfo. */ + interface IStorageBucketInfo { + + /** StorageBucketInfo bucket */ + bucket?: (string|null); + } + + /** Represents a StorageBucketInfo. */ + class StorageBucketInfo implements IStorageBucketInfo { + + /** + * Constructs a new StorageBucketInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo); + + /** StorageBucketInfo bucket. */ + public bucket: string; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageBucketInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Verifies a StorageBucketInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageBucketInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.StorageBucketInfo; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @param message StorageBucketInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageBucketInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageBucketInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerlessNegInfo. */ + interface IServerlessNegInfo { + + /** ServerlessNegInfo negUri */ + negUri?: (string|null); + } + + /** Represents a ServerlessNegInfo. */ + class ServerlessNegInfo implements IServerlessNegInfo { + + /** + * Constructs a new ServerlessNegInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo); + + /** ServerlessNegInfo negUri. */ + public negUri: string; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerlessNegInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Verifies a ServerlessNegInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerlessNegInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ServerlessNegInfo; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @param message ServerlessNegInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerlessNegInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ReachabilityService */ + class ReachabilityService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback): void; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @returns Promise + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): Promise; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConnectivityTest + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback): void; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @returns Promise + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): Promise; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback): void; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @returns Promise + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): Promise; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback): void; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @returns Promise + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): Promise; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback): void; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @returns Promise + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): Promise; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback): void; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @returns Promise + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): Promise; + } + + namespace ReachabilityService { + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. + * @param error Error, if any + * @param [response] ListConnectivityTestsResponse + */ + type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. + * @param error Error, if any + * @param [response] ConnectivityTest + */ + type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ConnectivityTest) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListConnectivityTestsRequest. */ + interface IListConnectivityTestsRequest { + + /** ListConnectivityTestsRequest parent */ + parent?: (string|null); + + /** ListConnectivityTestsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectivityTestsRequest pageToken */ + pageToken?: (string|null); + + /** ListConnectivityTestsRequest filter */ + filter?: (string|null); + + /** ListConnectivityTestsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListConnectivityTestsRequest. */ + class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { + + /** + * Constructs a new ListConnectivityTestsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest); + + /** ListConnectivityTestsRequest parent. */ + public parent: string; + + /** ListConnectivityTestsRequest pageSize. */ + public pageSize: number; + + /** ListConnectivityTestsRequest pageToken. */ + public pageToken: string; + + /** ListConnectivityTestsRequest filter. */ + public filter: string; + + /** ListConnectivityTestsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; + + /** + * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @param message ListConnectivityTestsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectivityTestsResponse. */ + interface IListConnectivityTestsResponse { + + /** ListConnectivityTestsResponse resources */ + resources?: (google.cloud.networkmanagement.v1.IConnectivityTest[]|null); + + /** ListConnectivityTestsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListConnectivityTestsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListConnectivityTestsResponse. */ + class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { + + /** + * Constructs a new ListConnectivityTestsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse); + + /** ListConnectivityTestsResponse resources. */ + public resources: google.cloud.networkmanagement.v1.IConnectivityTest[]; + + /** ListConnectivityTestsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListConnectivityTestsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsResponse instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; + + /** + * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @param message ListConnectivityTestsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectivityTestRequest. */ + interface IGetConnectivityTestRequest { + + /** GetConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectivityTestRequest. */ + class GetConnectivityTestRequest implements IGetConnectivityTestRequest { + + /** + * Constructs a new GetConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest); + + /** GetConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Verifies a GetConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @param message GetConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectivityTestRequest. */ + interface ICreateConnectivityTestRequest { + + /** CreateConnectivityTestRequest parent */ + parent?: (string|null); + + /** CreateConnectivityTestRequest testId */ + testId?: (string|null); + + /** CreateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + } + + /** Represents a CreateConnectivityTestRequest. */ + class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { + + /** + * Constructs a new CreateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest); + + /** CreateConnectivityTestRequest parent. */ + public parent: string; + + /** CreateConnectivityTestRequest testId. */ + public testId: string; + + /** CreateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message CreateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectivityTestRequest. */ + interface IUpdateConnectivityTestRequest { + + /** UpdateConnectivityTestRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + } + + /** Represents an UpdateConnectivityTestRequest. */ + class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest); + + /** UpdateConnectivityTestRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message UpdateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectivityTestRequest. */ + interface IDeleteConnectivityTestRequest { + + /** DeleteConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConnectivityTestRequest. */ + class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest); + + /** DeleteConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @param message DeleteConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RerunConnectivityTestRequest. */ + interface IRerunConnectivityTestRequest { + + /** RerunConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a RerunConnectivityTestRequest. */ + class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { + + /** + * Constructs a new RerunConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest); + + /** RerunConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RerunConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RerunConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @param message RerunConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RerunConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @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 statusDetail */ + statusDetail?: (string|null); + + /** OperationMetadata cancelRequested */ + cancelRequested?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.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 statusDetail. */ + public statusDetail: string; + + /** OperationMetadata cancelRequested. */ + public cancelRequested: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.networkmanagement.v1.IOperationMetadata): google.cloud.networkmanagement.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a 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 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 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of 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-networkmanagement/v1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js new file mode 100644 index 00000000000..e7b5bf407e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js @@ -0,0 +1,40473 @@ +// 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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.networkmanagement = (function() { + + /** + * Namespace networkmanagement. + * @memberof google.cloud + * @namespace + */ + var networkmanagement = {}; + + networkmanagement.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.networkmanagement + * @namespace + */ + var v1 = {}; + + v1.ConnectivityTest = (function() { + + /** + * Properties of a ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IConnectivityTest + * @property {string|null} [name] ConnectivityTest name + * @property {string|null} [description] ConnectivityTest description + * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [source] ConnectivityTest source + * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [destination] ConnectivityTest destination + * @property {string|null} [protocol] ConnectivityTest protocol + * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects + * @property {string|null} [displayName] ConnectivityTest displayName + * @property {Object.|null} [labels] ConnectivityTest labels + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime + * @property {google.cloud.networkmanagement.v1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails + * @property {google.cloud.networkmanagement.v1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails + * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks + */ + + /** + * Constructs a new ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ConnectivityTest. + * @implements IConnectivityTest + * @constructor + * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set + */ + function ConnectivityTest(properties) { + this.relatedProjects = []; + 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]]; + } + + /** + * ConnectivityTest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.name = ""; + + /** + * ConnectivityTest description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.description = ""; + + /** + * ConnectivityTest source. + * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} source + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.source = null; + + /** + * ConnectivityTest destination. + * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} destination + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.destination = null; + + /** + * ConnectivityTest protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.protocol = ""; + + /** + * ConnectivityTest relatedProjects. + * @member {Array.} relatedProjects + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.relatedProjects = $util.emptyArray; + + /** + * ConnectivityTest displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.displayName = ""; + + /** + * ConnectivityTest labels. + * @member {Object.} labels + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.labels = $util.emptyObject; + + /** + * ConnectivityTest createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.createTime = null; + + /** + * ConnectivityTest updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.updateTime = null; + + /** + * ConnectivityTest reachabilityDetails. + * @member {google.cloud.networkmanagement.v1.IReachabilityDetails|null|undefined} reachabilityDetails + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.reachabilityDetails = null; + + /** + * ConnectivityTest probingDetails. + * @member {google.cloud.networkmanagement.v1.IProbingDetails|null|undefined} probingDetails + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.probingDetails = null; + + /** + * ConnectivityTest bypassFirewallChecks. + * @member {boolean} bypassFirewallChecks + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.bypassFirewallChecks = false; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest instance + */ + ConnectivityTest.create = function create(properties) { + return new ConnectivityTest(properties); + }; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encode = function encode(message, writer) { + if (!writer) + 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.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); + if (message.relatedProjects != null && message.relatedProjects.length) + for (var i = 0; i < message.relatedProjects.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) + $root.google.cloud.networkmanagement.v1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) + $root.google.cloud.networkmanagement.v1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); + return writer; + }; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 5: { + message.protocol = reader.string(); + break; + } + case 6: { + if (!(message.relatedProjects && message.relatedProjects.length)) + message.relatedProjects = []; + message.relatedProjects.push(reader.string()); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 8: { + 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 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.decode(reader, reader.uint32()); + break; + } + case 17: { + message.bypassFirewallChecks = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectivityTest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectivityTest.verify = function verify(message) { + if (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.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.source); + if (error) + return "source." + error; + } + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.destination); + if (error) + return "destination." + error; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { + if (!Array.isArray(message.relatedProjects)) + return "relatedProjects: array expected"; + for (var i = 0; i < message.relatedProjects.length; ++i) + if (!$util.isString(message.relatedProjects[i])) + return "relatedProjects: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { + var error = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.verify(message.reachabilityDetails); + if (error) + return "reachabilityDetails." + error; + } + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { + var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.verify(message.probingDetails); + if (error) + return "probingDetails." + error; + } + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + if (typeof message.bypassFirewallChecks !== "boolean") + return "bypassFirewallChecks: boolean expected"; + return null; + }; + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest + */ + ConnectivityTest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ConnectivityTest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.source: object expected"); + message.source = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.source); + } + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.destination: object expected"); + message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.destination); + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.relatedProjects) { + if (!Array.isArray(object.relatedProjects)) + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.relatedProjects: array expected"); + message.relatedProjects = []; + for (var i = 0; i < object.relatedProjects.length; ++i) + message.relatedProjects[i] = String(object.relatedProjects[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.reachabilityDetails != null) { + if (typeof object.reachabilityDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.reachabilityDetails: object expected"); + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.fromObject(object.reachabilityDetails); + } + if (object.probingDetails != null) { + if (typeof object.probingDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.probingDetails: object expected"); + message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.fromObject(object.probingDetails); + } + if (object.bypassFirewallChecks != null) + message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); + return message; + }; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} message ConnectivityTest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectivityTest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedProjects = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.source = null; + object.destination = null; + object.protocol = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.reachabilityDetails = null; + object.probingDetails = null; + object.bypassFirewallChecks = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.source, options); + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.destination, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.relatedProjects && message.relatedProjects.length) { + object.relatedProjects = []; + for (var j = 0; j < message.relatedProjects.length; ++j) + object.relatedProjects[j] = message.relatedProjects[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) + object.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.toObject(message.reachabilityDetails, options); + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) + object.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.toObject(message.probingDetails, options); + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + object.bypassFirewallChecks = message.bypassFirewallChecks; + return object; + }; + + /** + * Converts this ConnectivityTest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @instance + * @returns {Object.} JSON object + */ + ConnectivityTest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectivityTest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ConnectivityTest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ConnectivityTest"; + }; + + return ConnectivityTest; + })(); + + v1.Endpoint = (function() { + + /** + * Properties of an Endpoint. + * @memberof google.cloud.networkmanagement.v1 + * @interface IEndpoint + * @property {string|null} [ipAddress] Endpoint ipAddress + * @property {number|null} [port] Endpoint port + * @property {string|null} [instance] Endpoint instance + * @property {string|null} [forwardingRule] Endpoint forwardingRule + * @property {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget + * @property {string|null} [loadBalancerId] Endpoint loadBalancerId + * @property {google.cloud.networkmanagement.v1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType + * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster + * @property {string|null} [fqdn] Endpoint fqdn + * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance + * @property {string|null} [redisInstance] Endpoint redisInstance + * @property {string|null} [redisCluster] Endpoint redisCluster + * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction + * @property {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion + * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision + * @property {string|null} [network] Endpoint network + * @property {google.cloud.networkmanagement.v1.Endpoint.NetworkType|null} [networkType] Endpoint networkType + * @property {string|null} [projectId] Endpoint projectId + */ + + /** + * Constructs a new Endpoint. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an Endpoint. + * @implements IEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set + */ + function Endpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Endpoint ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.ipAddress = ""; + + /** + * Endpoint port. + * @member {number} port + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.port = 0; + + /** + * Endpoint instance. + * @member {string} instance + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.instance = ""; + + /** + * Endpoint forwardingRule. + * @member {string} forwardingRule + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRule = ""; + + /** + * Endpoint forwardingRuleTarget. + * @member {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRuleTarget = null; + + /** + * Endpoint loadBalancerId. + * @member {string|null|undefined} loadBalancerId + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerId = null; + + /** + * Endpoint loadBalancerType. + * @member {google.cloud.networkmanagement.v1.LoadBalancerType|null|undefined} loadBalancerType + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerType = null; + + /** + * Endpoint gkeMasterCluster. + * @member {string} gkeMasterCluster + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.gkeMasterCluster = ""; + + /** + * Endpoint fqdn. + * @member {string} fqdn + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.fqdn = ""; + + /** + * Endpoint cloudSqlInstance. + * @member {string} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.cloudSqlInstance = ""; + + /** + * Endpoint redisInstance. + * @member {string} redisInstance + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.redisInstance = ""; + + /** + * Endpoint redisCluster. + * @member {string} redisCluster + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.redisCluster = ""; + + /** + * Endpoint cloudFunction. + * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.cloudFunction = null; + + /** + * Endpoint appEngineVersion. + * @member {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.appEngineVersion = null; + + /** + * Endpoint cloudRunRevision. + * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.cloudRunRevision = null; + + /** + * Endpoint network. + * @member {string} network + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.network = ""; + + /** + * Endpoint networkType. + * @member {google.cloud.networkmanagement.v1.Endpoint.NetworkType} networkType + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.networkType = 0; + + /** + * Endpoint projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.projectId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Endpoint _forwardingRuleTarget. + * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { + get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerId. + * @member {"loadBalancerId"|undefined} _loadBalancerId + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerType. + * @member {"loadBalancerType"|undefined} _loadBalancerType + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Endpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint instance + */ + Endpoint.create = function create(properties) { + return new Endpoint(properties); + }; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); + if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); + if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); + if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); + if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); + return writer; + }; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipAddress = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.instance = reader.string(); + break; + } + case 13: { + message.forwardingRule = reader.string(); + break; + } + case 14: { + message.forwardingRuleTarget = reader.int32(); + break; + } + case 15: { + message.loadBalancerId = reader.string(); + break; + } + case 16: { + message.loadBalancerType = reader.int32(); + break; + } + case 7: { + message.gkeMasterCluster = reader.string(); + break; + } + case 19: { + message.fqdn = reader.string(); + break; + } + case 8: { + message.cloudSqlInstance = reader.string(); + break; + } + case 17: { + message.redisInstance = reader.string(); + break; + } + case 18: { + message.redisCluster = reader.string(); + break; + } + case 10: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); + break; + } + case 11: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.network = reader.string(); + break; + } + case 5: { + message.networkType = reader.int32(); + break; + } + case 6: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + if (!$util.isString(message.forwardingRule)) + return "forwardingRule: string expected"; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + properties._forwardingRuleTarget = 1; + switch (message.forwardingRuleTarget) { + default: + return "forwardingRuleTarget: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + properties._loadBalancerId = 1; + if (!$util.isString(message.loadBalancerId)) + return "loadBalancerId: string expected"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + properties._loadBalancerType = 1; + switch (message.loadBalancerType) { + default: + return "loadBalancerType: 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: + break; + } + } + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + if (!$util.isString(message.gkeMasterCluster)) + return "gkeMasterCluster: string expected"; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + if (!$util.isString(message.fqdn)) + return "fqdn: string expected"; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + if (!$util.isString(message.cloudSqlInstance)) + return "cloudSqlInstance: string expected"; + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + if (!$util.isString(message.redisInstance)) + return "redisInstance: string expected"; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + if (!$util.isString(message.redisCluster)) + return "redisCluster: string expected"; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.networkType != null && message.hasOwnProperty("networkType")) + switch (message.networkType) { + default: + return "networkType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint + */ + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint(); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.port != null) + message.port = object.port | 0; + if (object.instance != null) + message.instance = String(object.instance); + if (object.forwardingRule != null) + message.forwardingRule = String(object.forwardingRule); + switch (object.forwardingRuleTarget) { + default: + if (typeof object.forwardingRuleTarget === "number") { + message.forwardingRuleTarget = object.forwardingRuleTarget; + break; + } + break; + case "FORWARDING_RULE_TARGET_UNSPECIFIED": + case 0: + message.forwardingRuleTarget = 0; + break; + case "INSTANCE": + case 1: + message.forwardingRuleTarget = 1; + break; + case "LOAD_BALANCER": + case 2: + message.forwardingRuleTarget = 2; + break; + case "VPN_GATEWAY": + case 3: + message.forwardingRuleTarget = 3; + break; + case "PSC": + case 4: + message.forwardingRuleTarget = 4; + break; + } + if (object.loadBalancerId != null) + message.loadBalancerId = String(object.loadBalancerId); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "HTTPS_ADVANCED_LOAD_BALANCER": + case 1: + message.loadBalancerType = 1; + break; + case "HTTPS_LOAD_BALANCER": + case 2: + message.loadBalancerType = 2; + break; + case "REGIONAL_HTTPS_LOAD_BALANCER": + case 3: + message.loadBalancerType = 3; + break; + case "INTERNAL_HTTPS_LOAD_BALANCER": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY_LOAD_BALANCER": + case 5: + message.loadBalancerType = 5; + break; + case "TCP_PROXY_LOAD_BALANCER": + case 6: + message.loadBalancerType = 6; + break; + case "INTERNAL_TCP_PROXY_LOAD_BALANCER": + case 7: + message.loadBalancerType = 7; + break; + case "NETWORK_LOAD_BALANCER": + case 8: + message.loadBalancerType = 8; + break; + case "LEGACY_NETWORK_LOAD_BALANCER": + case 9: + message.loadBalancerType = 9; + break; + case "TCP_UDP_INTERNAL_LOAD_BALANCER": + case 10: + message.loadBalancerType = 10; + break; + } + if (object.gkeMasterCluster != null) + message.gkeMasterCluster = String(object.gkeMasterCluster); + if (object.fqdn != null) + message.fqdn = String(object.fqdn); + if (object.cloudSqlInstance != null) + message.cloudSqlInstance = String(object.cloudSqlInstance); + if (object.redisInstance != null) + message.redisInstance = String(object.redisInstance); + if (object.redisCluster != null) + message.redisCluster = String(object.redisCluster); + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); + } + if (object.network != null) + message.network = String(object.network); + switch (object.networkType) { + default: + if (typeof object.networkType === "number") { + message.networkType = object.networkType; + break; + } + break; + case "NETWORK_TYPE_UNSPECIFIED": + case 0: + message.networkType = 0; + break; + case "GCP_NETWORK": + case 1: + message.networkType = 1; + break; + case "NON_GCP_NETWORK": + case 2: + message.networkType = 2; + break; + } + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint} message Endpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ipAddress = ""; + object.port = 0; + object.instance = ""; + object.network = ""; + object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; + object.projectId = ""; + object.gkeMasterCluster = ""; + object.cloudSqlInstance = ""; + object.cloudFunction = null; + object.appEngineVersion = null; + object.cloudRunRevision = null; + object.forwardingRule = ""; + object.redisInstance = ""; + object.redisCluster = ""; + object.fqdn = ""; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.networkType != null && message.hasOwnProperty("networkType")) + object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] : message.networkType; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + object.gkeMasterCluster = message.gkeMasterCluster; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + object.cloudSqlInstance = message.cloudSqlInstance; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) + object.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) + object.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + object.forwardingRule = message.forwardingRule; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; + if (options.oneofs) + object._forwardingRuleTarget = "forwardingRuleTarget"; + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + object.loadBalancerId = message.loadBalancerId; + if (options.oneofs) + object._loadBalancerId = "loadBalancerId"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (options.oneofs) + object._loadBalancerType = "loadBalancerType"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + object.redisInstance = message.redisInstance; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + object.redisCluster = message.redisCluster; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + object.fqdn = message.fqdn; + return object; + }; + + /** + * Converts this Endpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + * @returns {Object.} JSON object + */ + Endpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Endpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint"; + }; + + /** + * NetworkType enum. + * @name google.cloud.networkmanagement.v1.Endpoint.NetworkType + * @enum {number} + * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value + * @property {number} GCP_NETWORK=1 GCP_NETWORK value + * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value + */ + Endpoint.NetworkType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCP_NETWORK"] = 1; + values[valuesById[2] = "NON_GCP_NETWORK"] = 2; + return values; + })(); + + /** + * ForwardingRuleTarget enum. + * @name google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget + * @enum {number} + * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value + * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value + * @property {number} PSC=4 PSC value + */ + Endpoint.ForwardingRuleTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "LOAD_BALANCER"] = 2; + values[valuesById[3] = "VPN_GATEWAY"] = 3; + values[valuesById[4] = "PSC"] = 4; + return values; + })(); + + Endpoint.CloudFunctionEndpoint = (function() { + + /** + * Properties of a CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @interface ICloudFunctionEndpoint + * @property {string|null} [uri] CloudFunctionEndpoint uri + */ + + /** + * Constructs a new CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @classdesc Represents a CloudFunctionEndpoint. + * @implements ICloudFunctionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + */ + function CloudFunctionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @instance + */ + CloudFunctionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance + */ + CloudFunctionEndpoint.create = function create(properties) { + return new CloudFunctionEndpoint(properties); + }; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + */ + CloudFunctionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint"; + }; + + return CloudFunctionEndpoint; + })(); + + Endpoint.AppEngineVersionEndpoint = (function() { + + /** + * Properties of an AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @interface IAppEngineVersionEndpoint + * @property {string|null} [uri] AppEngineVersionEndpoint uri + */ + + /** + * Constructs a new AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @classdesc Represents an AppEngineVersionEndpoint. + * @implements IAppEngineVersionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + */ + function AppEngineVersionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @instance + */ + AppEngineVersionEndpoint.prototype.uri = ""; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance + */ + AppEngineVersionEndpoint.create = function create(properties) { + return new AppEngineVersionEndpoint(properties); + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + */ + AppEngineVersionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint"; + }; + + return AppEngineVersionEndpoint; + })(); + + Endpoint.CloudRunRevisionEndpoint = (function() { + + /** + * Properties of a CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @interface ICloudRunRevisionEndpoint + * @property {string|null} [uri] CloudRunRevisionEndpoint uri + */ + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @classdesc Represents a CloudRunRevisionEndpoint. + * @implements ICloudRunRevisionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + */ + function CloudRunRevisionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @instance + */ + CloudRunRevisionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance + */ + CloudRunRevisionEndpoint.create = function create(properties) { + return new CloudRunRevisionEndpoint(properties); + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + */ + CloudRunRevisionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint"; + }; + + return CloudRunRevisionEndpoint; + })(); + + return Endpoint; + })(); + + v1.ReachabilityDetails = (function() { + + /** + * Properties of a ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1 + * @interface IReachabilityDetails + * @property {google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error + * @property {Array.|null} [traces] ReachabilityDetails traces + */ + + /** + * Constructs a new ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ReachabilityDetails. + * @implements IReachabilityDetails + * @constructor + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set + */ + function ReachabilityDetails(properties) { + this.traces = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReachabilityDetails result. + * @member {google.cloud.networkmanagement.v1.ReachabilityDetails.Result} result + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.result = 0; + + /** + * ReachabilityDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.verifyTime = null; + + /** + * ReachabilityDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.error = null; + + /** + * ReachabilityDetails traces. + * @member {Array.} traces + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.traces = $util.emptyArray; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails instance + */ + ReachabilityDetails.create = function create(properties) { + return new ReachabilityDetails(properties); + }; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.traces != null && message.traces.length) + for (var i = 0; i < message.traces.length; ++i) + $root.google.cloud.networkmanagement.v1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.traces && message.traces.length)) + message.traces = []; + message.traces.push($root.google.cloud.networkmanagement.v1.Trace.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReachabilityDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReachabilityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.traces != null && message.hasOwnProperty("traces")) { + if (!Array.isArray(message.traces)) + return "traces: array expected"; + for (var i = 0; i < message.traces.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.Trace.verify(message.traces[i]); + if (error) + return "traces." + error; + } + } + return null; + }; + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails + */ + ReachabilityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ReachabilityDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "AMBIGUOUS": + case 4: + message.result = 4; + break; + case "UNDETERMINED": + case 5: + message.result = 5; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.traces) { + if (!Array.isArray(object.traces)) + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: array expected"); + message.traces = []; + for (var i = 0; i < object.traces.length; ++i) { + if (typeof object.traces[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: object expected"); + message.traces[i] = $root.google.cloud.networkmanagement.v1.Trace.fromObject(object.traces[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1.ReachabilityDetails} message ReachabilityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReachabilityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.traces = []; + if (options.defaults) { + object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.traces && message.traces.length) { + object.traces = []; + for (var j = 0; j < message.traces.length; ++j) + object.traces[j] = $root.google.cloud.networkmanagement.v1.Trace.toObject(message.traces[j], options); + } + return object; + }; + + /** + * Converts this ReachabilityDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @instance + * @returns {Object.} JSON object + */ + ReachabilityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReachabilityDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ReachabilityDetails"; + }; + + /** + * Result enum. + * @name google.cloud.networkmanagement.v1.ReachabilityDetails.Result + * @enum {number} + * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} AMBIGUOUS=4 AMBIGUOUS value + * @property {number} UNDETERMINED=5 UNDETERMINED value + */ + ReachabilityDetails.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[4] = "AMBIGUOUS"] = 4; + values[valuesById[5] = "UNDETERMINED"] = 5; + return values; + })(); + + return ReachabilityDetails; + })(); + + v1.LatencyPercentile = (function() { + + /** + * Properties of a LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILatencyPercentile + * @property {number|null} [percent] LatencyPercentile percent + * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros + */ + + /** + * Constructs a new LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LatencyPercentile. + * @implements ILatencyPercentile + * @constructor + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set + */ + function LatencyPercentile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyPercentile percent. + * @member {number} percent + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.percent = 0; + + /** + * LatencyPercentile latencyMicros. + * @member {number|Long} latencyMicros + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile instance + */ + LatencyPercentile.create = function create(properties) { + return new LatencyPercentile(properties); + }; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); + if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); + return writer; + }; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.percent = reader.int32(); + break; + } + case 2: { + message.latencyMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyPercentile message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyPercentile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.percent != null && message.hasOwnProperty("percent")) + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) + return "latencyMicros: integer|Long expected"; + return null; + }; + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile + */ + LatencyPercentile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyPercentile) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); + if (object.percent != null) + message.percent = object.percent | 0; + if (object.latencyMicros != null) + if ($util.Long) + (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; + else if (typeof object.latencyMicros === "string") + message.latencyMicros = parseInt(object.latencyMicros, 10); + else if (typeof object.latencyMicros === "number") + message.latencyMicros = object.latencyMicros; + else if (typeof object.latencyMicros === "object") + message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1.LatencyPercentile} message LatencyPercentile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyPercentile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.percent = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.latencyMicros = options.longs === String ? "0" : 0; + } + if (message.percent != null && message.hasOwnProperty("percent")) + object.percent = message.percent; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (typeof message.latencyMicros === "number") + object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; + else + object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; + return object; + }; + + /** + * Converts this LatencyPercentile to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @instance + * @returns {Object.} JSON object + */ + LatencyPercentile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyPercentile + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LatencyPercentile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyPercentile"; + }; + + return LatencyPercentile; + })(); + + v1.LatencyDistribution = (function() { + + /** + * Properties of a LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILatencyDistribution + * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles + */ + + /** + * Constructs a new LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LatencyDistribution. + * @implements ILatencyDistribution + * @constructor + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set + */ + function LatencyDistribution(properties) { + this.latencyPercentiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyDistribution latencyPercentiles. + * @member {Array.} latencyPercentiles + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @instance + */ + LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution instance + */ + LatencyDistribution.create = function create(properties) { + return new LatencyDistribution(properties); + }; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latencyPercentiles != null && message.latencyPercentiles.length) + for (var i = 0; i < message.latencyPercentiles.length; ++i) + $root.google.cloud.networkmanagement.v1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.latencyPercentiles && message.latencyPercentiles.length)) + message.latencyPercentiles = []; + message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1.LatencyPercentile.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyDistribution message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyDistribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { + if (!Array.isArray(message.latencyPercentiles)) + return "latencyPercentiles: array expected"; + for (var i = 0; i < message.latencyPercentiles.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.LatencyPercentile.verify(message.latencyPercentiles[i]); + if (error) + return "latencyPercentiles." + error; + } + } + return null; + }; + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution + */ + LatencyDistribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyDistribution) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); + if (object.latencyPercentiles) { + if (!Array.isArray(object.latencyPercentiles)) + throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: array expected"); + message.latencyPercentiles = []; + for (var i = 0; i < object.latencyPercentiles.length; ++i) { + if (typeof object.latencyPercentiles[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: object expected"); + message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1.LatencyDistribution} message LatencyDistribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyDistribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.latencyPercentiles = []; + if (message.latencyPercentiles && message.latencyPercentiles.length) { + object.latencyPercentiles = []; + for (var j = 0; j < message.latencyPercentiles.length; ++j) + object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); + } + return object; + }; + + /** + * Converts this LatencyDistribution to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @instance + * @returns {Object.} JSON object + */ + LatencyDistribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyDistribution + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LatencyDistribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyDistribution"; + }; + + return LatencyDistribution; + })(); + + v1.ProbingDetails = (function() { + + /** + * Properties of a ProbingDetails. + * @memberof google.cloud.networkmanagement.v1 + * @interface IProbingDetails + * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ProbingDetails error + * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause + * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount + * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount + * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo + * @property {google.cloud.networkmanagement.v1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency + * @property {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation + */ + + /** + * Constructs a new ProbingDetails. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ProbingDetails. + * @implements IProbingDetails + * @constructor + * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set + */ + function ProbingDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProbingDetails result. + * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult} result + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.result = 0; + + /** + * ProbingDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.verifyTime = null; + + /** + * ProbingDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.error = null; + + /** + * ProbingDetails abortCause. + * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause} abortCause + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.abortCause = 0; + + /** + * ProbingDetails sentProbeCount. + * @member {number} sentProbeCount + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.sentProbeCount = 0; + + /** + * ProbingDetails successfulProbeCount. + * @member {number} successfulProbeCount + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.successfulProbeCount = 0; + + /** + * ProbingDetails endpointInfo. + * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.endpointInfo = null; + + /** + * ProbingDetails probingLatency. + * @member {google.cloud.networkmanagement.v1.ILatencyDistribution|null|undefined} probingLatency + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.probingLatency = null; + + /** + * ProbingDetails destinationEgressLocation. + * @member {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.destinationEgressLocation = null; + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails instance + */ + ProbingDetails.create = function create(properties) { + return new ProbingDetails(properties); + }; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); + if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); + if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) + $root.google.cloud.networkmanagement.v1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) + $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.abortCause = reader.int32(); + break; + } + case 5: { + message.sentProbeCount = reader.int32(); + break; + } + case 6: { + message.successfulProbeCount = reader.int32(); + break; + } + case 7: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.decode(reader, reader.uint32()); + break; + } + case 9: { + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProbingDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProbingDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + switch (message.abortCause) { + default: + return "abortCause: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + if (!$util.isInteger(message.sentProbeCount)) + return "sentProbeCount: integer expected"; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + if (!$util.isInteger(message.successfulProbeCount)) + return "successfulProbeCount: integer expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { + var error = $root.google.cloud.networkmanagement.v1.LatencyDistribution.verify(message.probingLatency); + if (error) + return "probingLatency." + error; + } + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { + var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); + if (error) + return "destinationEgressLocation." + error; + } + return null; + }; + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails + */ + ProbingDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "PROBING_RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "REACHABILITY_INCONSISTENT": + case 3: + message.result = 3; + break; + case "UNDETERMINED": + case 4: + message.result = 4; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + switch (object.abortCause) { + default: + if (typeof object.abortCause === "number") { + message.abortCause = object.abortCause; + break; + } + break; + case "PROBING_ABORT_CAUSE_UNSPECIFIED": + case 0: + message.abortCause = 0; + break; + case "PERMISSION_DENIED": + case 1: + message.abortCause = 1; + break; + case "NO_SOURCE_LOCATION": + case 2: + message.abortCause = 2; + break; + } + if (object.sentProbeCount != null) + message.sentProbeCount = object.sentProbeCount | 0; + if (object.successfulProbeCount != null) + message.successfulProbeCount = object.successfulProbeCount | 0; + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.probingLatency != null) { + if (typeof object.probingLatency !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.probingLatency: object expected"); + message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.fromObject(object.probingLatency); + } + if (object.destinationEgressLocation != null) { + if (typeof object.destinationEgressLocation !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.destinationEgressLocation: object expected"); + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); + } + return message; + }; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails} message ProbingDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProbingDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; + object.sentProbeCount = 0; + object.successfulProbeCount = 0; + object.endpointInfo = null; + object.probingLatency = null; + object.destinationEgressLocation = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + object.sentProbeCount = message.sentProbeCount; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + object.successfulProbeCount = message.successfulProbeCount; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) + object.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.toObject(message.probingLatency, options); + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) + object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); + return object; + }; + + /** + * Converts this ProbingDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @instance + * @returns {Object.} JSON object + */ + ProbingDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProbingDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails"; + }; + + /** + * ProbingResult enum. + * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult + * @enum {number} + * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value + * @property {number} UNDETERMINED=4 UNDETERMINED value + */ + ProbingDetails.ProbingResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; + values[valuesById[4] = "UNDETERMINED"] = 4; + return values; + })(); + + /** + * ProbingAbortCause enum. + * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause + * @enum {number} + * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value + * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value + * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value + */ + ProbingDetails.ProbingAbortCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PERMISSION_DENIED"] = 1; + values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; + return values; + })(); + + ProbingDetails.EdgeLocation = (function() { + + /** + * Properties of an EdgeLocation. + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @interface IEdgeLocation + * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea + */ + + /** + * Constructs a new EdgeLocation. + * @memberof google.cloud.networkmanagement.v1.ProbingDetails + * @classdesc Represents an EdgeLocation. + * @implements IEdgeLocation + * @constructor + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + */ + function EdgeLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EdgeLocation metropolitanArea. + * @member {string} metropolitanArea + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @instance + */ + EdgeLocation.prototype.metropolitanArea = ""; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation instance + */ + EdgeLocation.create = function create(properties) { + return new EdgeLocation(properties); + }; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); + return writer; + }; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metropolitanArea = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EdgeLocation message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EdgeLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + if (!$util.isString(message.metropolitanArea)) + return "metropolitanArea: string expected"; + return null; + }; + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation + */ + EdgeLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); + if (object.metropolitanArea != null) + message.metropolitanArea = String(object.metropolitanArea); + return message; + }; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} message EdgeLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EdgeLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metropolitanArea = ""; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + object.metropolitanArea = message.metropolitanArea; + return object; + }; + + /** + * Converts this EdgeLocation to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @instance + * @returns {Object.} JSON object + */ + EdgeLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EdgeLocation + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation"; + }; + + return EdgeLocation; + })(); + + return ProbingDetails; + })(); + + v1.Trace = (function() { + + /** + * Properties of a Trace. + * @memberof google.cloud.networkmanagement.v1 + * @interface ITrace + * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo + * @property {Array.|null} [steps] Trace steps + * @property {number|null} [forwardTraceId] Trace forwardTraceId + */ + + /** + * Constructs a new Trace. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a Trace. + * @implements ITrace + * @constructor + * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set + */ + function Trace(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trace endpointInfo. + * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + */ + Trace.prototype.endpointInfo = null; + + /** + * Trace steps. + * @member {Array.} steps + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + */ + Trace.prototype.steps = $util.emptyArray; + + /** + * Trace forwardTraceId. + * @member {number} forwardTraceId + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + */ + Trace.prototype.forwardTraceId = 0; + + /** + * Creates a new Trace instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Trace} Trace instance + */ + Trace.create = function create(properties) { + return new Trace(properties); + }; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.cloud.networkmanagement.v1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); + return writer; + }; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Trace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.cloud.networkmanagement.v1.Step.decode(reader, reader.uint32())); + break; + } + case 4: { + message.forwardTraceId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trace message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + if (!$util.isInteger(message.forwardTraceId)) + return "forwardTraceId: integer expected"; + return null; + }; + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Trace} Trace + */ + Trace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Trace) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Trace(); + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Trace.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: object expected"); + message.steps[i] = $root.google.cloud.networkmanagement.v1.Step.fromObject(object.steps[i]); + } + } + if (object.forwardTraceId != null) + message.forwardTraceId = object.forwardTraceId | 0; + return message; + }; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {google.cloud.networkmanagement.v1.Trace} message Trace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) { + object.endpointInfo = null; + object.forwardTraceId = 0; + } + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.cloud.networkmanagement.v1.Step.toObject(message.steps[j], options); + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + object.forwardTraceId = message.forwardTraceId; + return object; + }; + + /** + * Converts this Trace to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Trace + * @instance + * @returns {Object.} JSON object + */ + Trace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trace + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Trace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Trace"; + }; + + return Trace; + })(); + + v1.Step = (function() { + + /** + * Properties of a Step. + * @memberof google.cloud.networkmanagement.v1 + * @interface IStep + * @property {string|null} [description] Step description + * @property {google.cloud.networkmanagement.v1.Step.State|null} [state] Step state + * @property {boolean|null} [causesDrop] Step causesDrop + * @property {string|null} [projectId] Step projectId + * @property {google.cloud.networkmanagement.v1.IInstanceInfo|null} [instance] Step instance + * @property {google.cloud.networkmanagement.v1.IFirewallInfo|null} [firewall] Step firewall + * @property {google.cloud.networkmanagement.v1.IRouteInfo|null} [route] Step route + * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpoint] Step endpoint + * @property {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null} [googleService] Step googleService + * @property {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule + * @property {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway + * @property {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel + * @property {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector + * @property {google.cloud.networkmanagement.v1.IDeliverInfo|null} [deliver] Step deliver + * @property {google.cloud.networkmanagement.v1.IForwardInfo|null} [forward] Step forward + * @property {google.cloud.networkmanagement.v1.IAbortInfo|null} [abort] Step abort + * @property {google.cloud.networkmanagement.v1.IDropInfo|null} [drop] Step drop + * @property {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer + * @property {google.cloud.networkmanagement.v1.INetworkInfo|null} [network] Step network + * @property {google.cloud.networkmanagement.v1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster + * @property {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance + * @property {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance + * @property {google.cloud.networkmanagement.v1.IRedisClusterInfo|null} [redisCluster] Step redisCluster + * @property {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction + * @property {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion + * @property {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision + * @property {google.cloud.networkmanagement.v1.INatInfo|null} [nat] Step nat + * @property {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection + * @property {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo + * @property {google.cloud.networkmanagement.v1.IStorageBucketInfo|null} [storageBucket] Step storageBucket + * @property {google.cloud.networkmanagement.v1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg + */ + + /** + * Constructs a new Step. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set + */ + function Step(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Step description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.description = ""; + + /** + * Step state. + * @member {google.cloud.networkmanagement.v1.Step.State} state + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.state = 0; + + /** + * Step causesDrop. + * @member {boolean} causesDrop + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.causesDrop = false; + + /** + * Step projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.projectId = ""; + + /** + * Step instance. + * @member {google.cloud.networkmanagement.v1.IInstanceInfo|null|undefined} instance + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.instance = null; + + /** + * Step firewall. + * @member {google.cloud.networkmanagement.v1.IFirewallInfo|null|undefined} firewall + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.firewall = null; + + /** + * Step route. + * @member {google.cloud.networkmanagement.v1.IRouteInfo|null|undefined} route + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.route = null; + + /** + * Step endpoint. + * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpoint + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.endpoint = null; + + /** + * Step googleService. + * @member {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null|undefined} googleService + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.googleService = null; + + /** + * Step forwardingRule. + * @member {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null|undefined} forwardingRule + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.forwardingRule = null; + + /** + * Step vpnGateway. + * @member {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null|undefined} vpnGateway + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.vpnGateway = null; + + /** + * Step vpnTunnel. + * @member {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null|undefined} vpnTunnel + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.vpnTunnel = null; + + /** + * Step vpcConnector. + * @member {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null|undefined} vpcConnector + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.vpcConnector = null; + + /** + * Step deliver. + * @member {google.cloud.networkmanagement.v1.IDeliverInfo|null|undefined} deliver + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.deliver = null; + + /** + * Step forward. + * @member {google.cloud.networkmanagement.v1.IForwardInfo|null|undefined} forward + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.forward = null; + + /** + * Step abort. + * @member {google.cloud.networkmanagement.v1.IAbortInfo|null|undefined} abort + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.abort = null; + + /** + * Step drop. + * @member {google.cloud.networkmanagement.v1.IDropInfo|null|undefined} drop + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.drop = null; + + /** + * Step loadBalancer. + * @member {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null|undefined} loadBalancer + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.loadBalancer = null; + + /** + * Step network. + * @member {google.cloud.networkmanagement.v1.INetworkInfo|null|undefined} network + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.network = null; + + /** + * Step gkeMaster. + * @member {google.cloud.networkmanagement.v1.IGKEMasterInfo|null|undefined} gkeMaster + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.gkeMaster = null; + + /** + * Step cloudSqlInstance. + * @member {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.cloudSqlInstance = null; + + /** + * Step redisInstance. + * @member {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null|undefined} redisInstance + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.redisInstance = null; + + /** + * Step redisCluster. + * @member {google.cloud.networkmanagement.v1.IRedisClusterInfo|null|undefined} redisCluster + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.redisCluster = null; + + /** + * Step cloudFunction. + * @member {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.cloudFunction = null; + + /** + * Step appEngineVersion. + * @member {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.appEngineVersion = null; + + /** + * Step cloudRunRevision. + * @member {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.cloudRunRevision = null; + + /** + * Step nat. + * @member {google.cloud.networkmanagement.v1.INatInfo|null|undefined} nat + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.nat = null; + + /** + * Step proxyConnection. + * @member {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null|undefined} proxyConnection + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.proxyConnection = null; + + /** + * Step loadBalancerBackendInfo. + * @member {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.loadBalancerBackendInfo = null; + + /** + * Step storageBucket. + * @member {google.cloud.networkmanagement.v1.IStorageBucketInfo|null|undefined} storageBucket + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.storageBucket = null; + + /** + * Step serverlessNeg. + * @member {google.cloud.networkmanagement.v1.IServerlessNegInfo|null|undefined} serverlessNeg + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Step.prototype.serverlessNeg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Step stepInfo. + * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + */ + Object.defineProperty(Step.prototype, "stepInfo", { + get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.networkmanagement.v1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) + $root.google.cloud.networkmanagement.v1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.route != null && Object.hasOwnProperty.call(message, "route")) + $root.google.cloud.networkmanagement.v1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) + $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) + $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) + $root.google.cloud.networkmanagement.v1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) + $root.google.cloud.networkmanagement.v1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) + $root.google.cloud.networkmanagement.v1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) + $root.google.cloud.networkmanagement.v1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) + $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + $root.google.cloud.networkmanagement.v1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) + $root.google.cloud.networkmanagement.v1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) + $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) + $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) + $root.google.cloud.networkmanagement.v1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) + $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) + $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + $root.google.cloud.networkmanagement.v1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) + $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + $root.google.cloud.networkmanagement.v1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.causesDrop = reader.bool(); + break; + } + case 4: { + message.projectId = reader.string(); + break; + } + case 5: { + message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 24: { + message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.decode(reader, reader.uint32()); + break; + } + case 9: { + message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.decode(reader, reader.uint32()); + break; + } + case 10: { + message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.decode(reader, reader.uint32()); + break; + } + case 11: { + message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.decode(reader, reader.uint32()); + break; + } + case 21: { + message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.decode(reader, reader.uint32()); + break; + } + case 16: { + message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.decode(reader, reader.uint32()); + break; + } + case 17: { + message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.decode(reader, reader.uint32()); + break; + } + case 18: { + message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.decode(reader, reader.uint32()); + break; + } + case 19: { + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 30: { + message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 31: { + message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.decode(reader, reader.uint32()); + break; + } + case 20: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.decode(reader, reader.uint32()); + break; + } + case 22: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.decode(reader, reader.uint32()); + break; + } + case 27: { + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); + break; + } + case 28: { + message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.decode(reader, reader.uint32()); + break; + } + case 29: { + message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 27: + case 3: + case 21: + case 22: + case 32: + case 33: + case 23: + case 25: + case 26: + case 29: + case 30: + case 31: + case 4: + case 5: + case 6: + case 7: + case 28: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 24: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + break; + } + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + if (typeof message.causesDrop !== "boolean") + return "causesDrop: boolean expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.InstanceInfo.verify(message.instance); + if (error) + return "instance." + error; + } + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.FirewallInfo.verify(message.firewall); + if (error) + return "firewall." + error; + } + } + if (message.route != null && message.hasOwnProperty("route")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.RouteInfo.verify(message.route); + if (error) + return "route." + error; + } + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpoint); + if (error) + return "endpoint." + error; + } + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.verify(message.googleService); + if (error) + return "googleService." + error; + } + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify(message.forwardingRule); + if (error) + return "forwardingRule." + error; + } + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.verify(message.vpnGateway); + if (error) + return "vpnGateway." + error; + } + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.verify(message.vpnTunnel); + if (error) + return "vpnTunnel." + error; + } + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.verify(message.vpcConnector); + if (error) + return "vpcConnector." + error; + } + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.DeliverInfo.verify(message.deliver); + if (error) + return "deliver." + error; + } + } + if (message.forward != null && message.hasOwnProperty("forward")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ForwardInfo.verify(message.forward); + if (error) + return "forward." + error; + } + } + if (message.abort != null && message.hasOwnProperty("abort")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.AbortInfo.verify(message.abort); + if (error) + return "abort." + error; + } + } + if (message.drop != null && message.hasOwnProperty("drop")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.DropInfo.verify(message.drop); + if (error) + return "drop." + error; + } + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.verify(message.loadBalancer); + if (error) + return "loadBalancer." + error; + } + } + if (message.network != null && message.hasOwnProperty("network")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.NetworkInfo.verify(message.network); + if (error) + return "network." + error; + } + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.verify(message.gkeMaster); + if (error) + return "gkeMaster." + error; + } + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); + if (error) + return "cloudSqlInstance." + error; + } + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.verify(message.redisInstance); + if (error) + return "redisInstance." + error; + } + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.verify(message.redisCluster); + if (error) + return "redisCluster." + error; + } + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + } + if (message.nat != null && message.hasOwnProperty("nat")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.NatInfo.verify(message.nat); + if (error) + return "nat." + error; + } + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify(message.proxyConnection); + if (error) + return "proxyConnection." + error; + } + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); + if (error) + return "loadBalancerBackendInfo." + error; + } + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.verify(message.storageBucket); + if (error) + return "storageBucket." + error; + } + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.verify(message.serverlessNeg); + if (error) + return "serverlessNeg." + error; + } + } + return null; + }; + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.Step) + return object; + var message = new $root.google.cloud.networkmanagement.v1.Step(); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "START_FROM_INSTANCE": + case 1: + message.state = 1; + break; + case "START_FROM_INTERNET": + case 2: + message.state = 2; + break; + case "START_FROM_GOOGLE_SERVICE": + case 27: + message.state = 27; + break; + case "START_FROM_PRIVATE_NETWORK": + case 3: + message.state = 3; + break; + case "START_FROM_GKE_MASTER": + case 21: + message.state = 21; + break; + case "START_FROM_CLOUD_SQL_INSTANCE": + case 22: + message.state = 22; + break; + case "START_FROM_REDIS_INSTANCE": + case 32: + message.state = 32; + break; + case "START_FROM_REDIS_CLUSTER": + case 33: + message.state = 33; + break; + case "START_FROM_CLOUD_FUNCTION": + case 23: + message.state = 23; + break; + case "START_FROM_APP_ENGINE_VERSION": + case 25: + message.state = 25; + break; + case "START_FROM_CLOUD_RUN_REVISION": + case 26: + message.state = 26; + break; + case "START_FROM_STORAGE_BUCKET": + case 29: + message.state = 29; + break; + case "START_FROM_PSC_PUBLISHED_SERVICE": + case 30: + message.state = 30; + break; + case "START_FROM_SERVERLESS_NEG": + case 31: + message.state = 31; + break; + case "APPLY_INGRESS_FIREWALL_RULE": + case 4: + message.state = 4; + break; + case "APPLY_EGRESS_FIREWALL_RULE": + case 5: + message.state = 5; + break; + case "APPLY_ROUTE": + case 6: + message.state = 6; + break; + case "APPLY_FORWARDING_RULE": + case 7: + message.state = 7; + break; + case "ANALYZE_LOAD_BALANCER_BACKEND": + case 28: + message.state = 28; + break; + case "SPOOFING_APPROVED": + case 8: + message.state = 8; + break; + case "ARRIVE_AT_INSTANCE": + case 9: + message.state = 9; + break; + case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": + case 10: + message.state = 10; + break; + case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": + case 11: + message.state = 11; + break; + case "ARRIVE_AT_VPN_GATEWAY": + case 12: + message.state = 12; + break; + case "ARRIVE_AT_VPN_TUNNEL": + case 13: + message.state = 13; + break; + case "ARRIVE_AT_VPC_CONNECTOR": + case 24: + message.state = 24; + break; + case "NAT": + case 14: + message.state = 14; + break; + case "PROXY_CONNECTION": + case 15: + message.state = 15; + break; + case "DELIVER": + case 16: + message.state = 16; + break; + case "DROP": + case 17: + message.state = 17; + break; + case "FORWARD": + case 18: + message.state = 18; + break; + case "ABORT": + case 19: + message.state = 19; + break; + case "VIEWER_PERMISSION_MISSING": + case 20: + message.state = 20; + break; + } + if (object.causesDrop != null) + message.causesDrop = Boolean(object.causesDrop); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.instance: object expected"); + message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.fromObject(object.instance); + } + if (object.firewall != null) { + if (typeof object.firewall !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.firewall: object expected"); + message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.fromObject(object.firewall); + } + if (object.route != null) { + if (typeof object.route !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.route: object expected"); + message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.fromObject(object.route); + } + if (object.endpoint != null) { + if (typeof object.endpoint !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.endpoint: object expected"); + message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpoint); + } + if (object.googleService != null) { + if (typeof object.googleService !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.googleService: object expected"); + message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.fromObject(object.googleService); + } + if (object.forwardingRule != null) { + if (typeof object.forwardingRule !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.forwardingRule: object expected"); + message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.fromObject(object.forwardingRule); + } + if (object.vpnGateway != null) { + if (typeof object.vpnGateway !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnGateway: object expected"); + message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.fromObject(object.vpnGateway); + } + if (object.vpnTunnel != null) { + if (typeof object.vpnTunnel !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnTunnel: object expected"); + message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.fromObject(object.vpnTunnel); + } + if (object.vpcConnector != null) { + if (typeof object.vpcConnector !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.vpcConnector: object expected"); + message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.fromObject(object.vpcConnector); + } + if (object.deliver != null) { + if (typeof object.deliver !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.deliver: object expected"); + message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.fromObject(object.deliver); + } + if (object.forward != null) { + if (typeof object.forward !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.forward: object expected"); + message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.fromObject(object.forward); + } + if (object.abort != null) { + if (typeof object.abort !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.abort: object expected"); + message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.fromObject(object.abort); + } + if (object.drop != null) { + if (typeof object.drop !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.drop: object expected"); + message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.fromObject(object.drop); + } + if (object.loadBalancer != null) { + if (typeof object.loadBalancer !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancer: object expected"); + message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.fromObject(object.loadBalancer); + } + if (object.network != null) { + if (typeof object.network !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.network: object expected"); + message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.fromObject(object.network); + } + if (object.gkeMaster != null) { + if (typeof object.gkeMaster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.gkeMaster: object expected"); + message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.fromObject(object.gkeMaster); + } + if (object.cloudSqlInstance != null) { + if (typeof object.cloudSqlInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudSqlInstance: object expected"); + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); + } + if (object.redisInstance != null) { + if (typeof object.redisInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.redisInstance: object expected"); + message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.fromObject(object.redisInstance); + } + if (object.redisCluster != null) { + if (typeof object.redisCluster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.redisCluster: object expected"); + message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.fromObject(object.redisCluster); + } + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); + } + if (object.nat != null) { + if (typeof object.nat !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.nat: object expected"); + message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.fromObject(object.nat); + } + if (object.proxyConnection != null) { + if (typeof object.proxyConnection !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.proxyConnection: object expected"); + message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.fromObject(object.proxyConnection); + } + if (object.loadBalancerBackendInfo != null) { + if (typeof object.loadBalancerBackendInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancerBackendInfo: object expected"); + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); + } + if (object.storageBucket != null) { + if (typeof object.storageBucket !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.storageBucket: object expected"); + message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.fromObject(object.storageBucket); + } + if (object.serverlessNeg != null) { + if (typeof object.serverlessNeg !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.Step.serverlessNeg: object expected"); + message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.fromObject(object.serverlessNeg); + } + return message; + }; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {google.cloud.networkmanagement.v1.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.causesDrop = false; + object.projectId = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1.Step.State[message.state] : message.state; + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + object.causesDrop = message.causesDrop; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instance != null && message.hasOwnProperty("instance")) { + object.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.toObject(message.instance, options); + if (options.oneofs) + object.stepInfo = "instance"; + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + object.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.toObject(message.firewall, options); + if (options.oneofs) + object.stepInfo = "firewall"; + } + if (message.route != null && message.hasOwnProperty("route")) { + object.route = $root.google.cloud.networkmanagement.v1.RouteInfo.toObject(message.route, options); + if (options.oneofs) + object.stepInfo = "route"; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + object.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpoint, options); + if (options.oneofs) + object.stepInfo = "endpoint"; + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + object.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.toObject(message.forwardingRule, options); + if (options.oneofs) + object.stepInfo = "forwardingRule"; + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + object.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.toObject(message.vpnGateway, options); + if (options.oneofs) + object.stepInfo = "vpnGateway"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + object.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.toObject(message.vpnTunnel, options); + if (options.oneofs) + object.stepInfo = "vpnTunnel"; + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + object.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.toObject(message.deliver, options); + if (options.oneofs) + object.stepInfo = "deliver"; + } + if (message.forward != null && message.hasOwnProperty("forward")) { + object.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.toObject(message.forward, options); + if (options.oneofs) + object.stepInfo = "forward"; + } + if (message.abort != null && message.hasOwnProperty("abort")) { + object.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.toObject(message.abort, options); + if (options.oneofs) + object.stepInfo = "abort"; + } + if (message.drop != null && message.hasOwnProperty("drop")) { + object.drop = $root.google.cloud.networkmanagement.v1.DropInfo.toObject(message.drop, options); + if (options.oneofs) + object.stepInfo = "drop"; + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + object.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.toObject(message.loadBalancer, options); + if (options.oneofs) + object.stepInfo = "loadBalancer"; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.toObject(message.network, options); + if (options.oneofs) + object.stepInfo = "network"; + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + object.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.toObject(message.gkeMaster, options); + if (options.oneofs) + object.stepInfo = "gkeMaster"; + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); + if (options.oneofs) + object.stepInfo = "cloudSqlInstance"; + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + object.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.toObject(message.cloudFunction, options); + if (options.oneofs) + object.stepInfo = "cloudFunction"; + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + object.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.toObject(message.vpcConnector, options); + if (options.oneofs) + object.stepInfo = "vpcConnector"; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + object.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); + if (options.oneofs) + object.stepInfo = "appEngineVersion"; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); + if (options.oneofs) + object.stepInfo = "cloudRunRevision"; + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + object.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.toObject(message.googleService, options); + if (options.oneofs) + object.stepInfo = "googleService"; + } + if (message.nat != null && message.hasOwnProperty("nat")) { + object.nat = $root.google.cloud.networkmanagement.v1.NatInfo.toObject(message.nat, options); + if (options.oneofs) + object.stepInfo = "nat"; + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + object.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.toObject(message.proxyConnection, options); + if (options.oneofs) + object.stepInfo = "proxyConnection"; + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); + if (options.oneofs) + object.stepInfo = "loadBalancerBackendInfo"; + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + object.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.toObject(message.storageBucket, options); + if (options.oneofs) + object.stepInfo = "storageBucket"; + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + object.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.toObject(message.serverlessNeg, options); + if (options.oneofs) + object.stepInfo = "serverlessNeg"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + object.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.toObject(message.redisInstance, options); + if (options.oneofs) + object.stepInfo = "redisInstance"; + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + object.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.toObject(message.redisCluster, options); + if (options.oneofs) + object.stepInfo = "redisCluster"; + } + return object; + }; + + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Step + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.Step + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Step"; + }; + + /** + * State enum. + * @name google.cloud.networkmanagement.v1.Step.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value + * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value + * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value + * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value + * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value + * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value + * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value + * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value + * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value + * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value + * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value + * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value + * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value + * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value + * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value + * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value + * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value + * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value + * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value + * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value + * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value + * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value + * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value + * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value + * @property {number} NAT=14 NAT value + * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value + * @property {number} DELIVER=16 DELIVER value + * @property {number} DROP=17 DROP value + * @property {number} FORWARD=18 FORWARD value + * @property {number} ABORT=19 ABORT value + * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value + */ + Step.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START_FROM_INSTANCE"] = 1; + values[valuesById[2] = "START_FROM_INTERNET"] = 2; + values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; + values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; + values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; + values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; + values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; + values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; + values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; + values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; + values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; + values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; + values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; + values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; + values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; + values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; + values[valuesById[6] = "APPLY_ROUTE"] = 6; + values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; + values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; + values[valuesById[8] = "SPOOFING_APPROVED"] = 8; + values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; + values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; + values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; + values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; + values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; + values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; + values[valuesById[14] = "NAT"] = 14; + values[valuesById[15] = "PROXY_CONNECTION"] = 15; + values[valuesById[16] = "DELIVER"] = 16; + values[valuesById[17] = "DROP"] = 17; + values[valuesById[18] = "FORWARD"] = 18; + values[valuesById[19] = "ABORT"] = 19; + values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; + return values; + })(); + + return Step; + })(); + + v1.InstanceInfo = (function() { + + /** + * Properties of an InstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IInstanceInfo + * @property {string|null} [displayName] InstanceInfo displayName + * @property {string|null} [uri] InstanceInfo uri + * @property {string|null} ["interface"] InstanceInfo interface + * @property {string|null} [networkUri] InstanceInfo networkUri + * @property {string|null} [internalIp] InstanceInfo internalIp + * @property {string|null} [externalIp] InstanceInfo externalIp + * @property {Array.|null} [networkTags] InstanceInfo networkTags + * @property {string|null} [serviceAccount] InstanceInfo serviceAccount + * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri + */ + + /** + * Constructs a new InstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an InstanceInfo. + * @implements IInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set + */ + function InstanceInfo(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.displayName = ""; + + /** + * InstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.uri = ""; + + /** + * InstanceInfo interface. + * @member {string} interface + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype["interface"] = ""; + + /** + * InstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkUri = ""; + + /** + * InstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.internalIp = ""; + + /** + * InstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.externalIp = ""; + + /** + * InstanceInfo networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkTags = $util.emptyArray; + + /** + * InstanceInfo serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.serviceAccount = ""; + + /** + * InstanceInfo pscNetworkAttachmentUri. + * @member {string} pscNetworkAttachmentUri + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.pscNetworkAttachmentUri = ""; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo instance + */ + InstanceInfo.create = function create(properties) { + return new InstanceInfo(properties); + }; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); + if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); + return writer; + }; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message["interface"] = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + case 8: { + message.serviceAccount = reader.string(); + break; + } + case 9: { + message.pscNetworkAttachmentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message["interface"] != null && message.hasOwnProperty("interface")) + if (!$util.isString(message["interface"])) + return "interface: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + if (!$util.isString(message.pscNetworkAttachmentUri)) + return "pscNetworkAttachmentUri: string expected"; + return null; + }; + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo + */ + InstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.InstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object["interface"] != null) + message["interface"] = String(object["interface"]); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.networkmanagement.v1.InstanceInfo.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.pscNetworkAttachmentUri != null) + message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); + return message; + }; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.InstanceInfo} message InstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object["interface"] = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.serviceAccount = ""; + object.pscNetworkAttachmentUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message["interface"] != null && message.hasOwnProperty("interface")) + object["interface"] = message["interface"]; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; + return object; + }; + + /** + * Converts this InstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @instance + * @returns {Object.} JSON object + */ + InstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.InstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.InstanceInfo"; + }; + + return InstanceInfo; + })(); + + v1.NetworkInfo = (function() { + + /** + * Properties of a NetworkInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface INetworkInfo + * @property {string|null} [displayName] NetworkInfo displayName + * @property {string|null} [uri] NetworkInfo uri + * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri + * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange + * @property {string|null} [region] NetworkInfo region + */ + + /** + * Constructs a new NetworkInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a NetworkInfo. + * @implements INetworkInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set + */ + function NetworkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.displayName = ""; + + /** + * NetworkInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.uri = ""; + + /** + * NetworkInfo matchedSubnetUri. + * @member {string} matchedSubnetUri + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedSubnetUri = ""; + + /** + * NetworkInfo matchedIpRange. + * @member {string} matchedIpRange + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedIpRange = ""; + + /** + * NetworkInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.region = ""; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo instance + */ + NetworkInfo.create = function create(properties) { + return new NetworkInfo(properties); + }; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); + if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 5: { + message.matchedSubnetUri = reader.string(); + break; + } + case 4: { + message.matchedIpRange = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + if (!$util.isString(message.matchedSubnetUri)) + return "matchedSubnetUri: string expected"; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + if (!$util.isString(message.matchedIpRange)) + return "matchedIpRange: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo + */ + NetworkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.NetworkInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedSubnetUri != null) + message.matchedSubnetUri = String(object.matchedSubnetUri); + if (object.matchedIpRange != null) + message.matchedIpRange = String(object.matchedIpRange); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1.NetworkInfo} message NetworkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedIpRange = ""; + object.matchedSubnetUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + object.matchedIpRange = message.matchedIpRange; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + object.matchedSubnetUri = message.matchedSubnetUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this NetworkInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @instance + * @returns {Object.} JSON object + */ + NetworkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.NetworkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NetworkInfo"; + }; + + return NetworkInfo; + })(); + + v1.FirewallInfo = (function() { + + /** + * Properties of a FirewallInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IFirewallInfo + * @property {string|null} [displayName] FirewallInfo displayName + * @property {string|null} [uri] FirewallInfo uri + * @property {string|null} [direction] FirewallInfo direction + * @property {string|null} [action] FirewallInfo action + * @property {number|null} [priority] FirewallInfo priority + * @property {string|null} [networkUri] FirewallInfo networkUri + * @property {Array.|null} [targetTags] FirewallInfo targetTags + * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts + * @property {string|null} [policy] FirewallInfo policy + * @property {string|null} [policyUri] FirewallInfo policyUri + * @property {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType + */ + + /** + * Constructs a new FirewallInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a FirewallInfo. + * @implements IFirewallInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set + */ + function FirewallInfo(properties) { + this.targetTags = []; + this.targetServiceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirewallInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.displayName = ""; + + /** + * FirewallInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.uri = ""; + + /** + * FirewallInfo direction. + * @member {string} direction + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.direction = ""; + + /** + * FirewallInfo action. + * @member {string} action + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.action = ""; + + /** + * FirewallInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.priority = 0; + + /** + * FirewallInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.networkUri = ""; + + /** + * FirewallInfo targetTags. + * @member {Array.} targetTags + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetTags = $util.emptyArray; + + /** + * FirewallInfo targetServiceAccounts. + * @member {Array.} targetServiceAccounts + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; + + /** + * FirewallInfo policy. + * @member {string} policy + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policy = ""; + + /** + * FirewallInfo policyUri. + * @member {string} policyUri + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policyUri = ""; + + /** + * FirewallInfo firewallRuleType. + * @member {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType} firewallRuleType + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.firewallRuleType = 0; + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo instance + */ + FirewallInfo.create = function create(properties) { + return new FirewallInfo(properties); + }; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); + if (message.targetTags != null && message.targetTags.length) + for (var i = 0; i < message.targetTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); + if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); + if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); + if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); + return writer; + }; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.direction = reader.string(); + break; + } + case 4: { + message.action = reader.string(); + break; + } + case 5: { + message.priority = reader.int32(); + break; + } + case 6: { + message.networkUri = reader.string(); + break; + } + case 7: { + if (!(message.targetTags && message.targetTags.length)) + message.targetTags = []; + message.targetTags.push(reader.string()); + break; + } + case 8: { + if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) + message.targetServiceAccounts = []; + message.targetServiceAccounts.push(reader.string()); + break; + } + case 9: { + message.policy = reader.string(); + break; + } + case 11: { + message.policyUri = reader.string(); + break; + } + case 10: { + message.firewallRuleType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirewallInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirewallInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + if (!$util.isString(message.direction)) + return "direction: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.targetTags != null && message.hasOwnProperty("targetTags")) { + if (!Array.isArray(message.targetTags)) + return "targetTags: array expected"; + for (var i = 0; i < message.targetTags.length; ++i) + if (!$util.isString(message.targetTags[i])) + return "targetTags: string[] expected"; + } + if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { + if (!Array.isArray(message.targetServiceAccounts)) + return "targetServiceAccounts: array expected"; + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + if (!$util.isString(message.targetServiceAccounts[i])) + return "targetServiceAccounts: string[] expected"; + } + if (message.policy != null && message.hasOwnProperty("policy")) + if (!$util.isString(message.policy)) + return "policy: string expected"; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + if (!$util.isString(message.policyUri)) + return "policyUri: string expected"; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + switch (message.firewallRuleType) { + default: + return "firewallRuleType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 100: + case 101: + break; + } + return null; + }; + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo + */ + FirewallInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.FirewallInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.direction != null) + message.direction = String(object.direction); + if (object.action != null) + message.action = String(object.action); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.targetTags) { + if (!Array.isArray(object.targetTags)) + throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetTags: array expected"); + message.targetTags = []; + for (var i = 0; i < object.targetTags.length; ++i) + message.targetTags[i] = String(object.targetTags[i]); + } + if (object.targetServiceAccounts) { + if (!Array.isArray(object.targetServiceAccounts)) + throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetServiceAccounts: array expected"); + message.targetServiceAccounts = []; + for (var i = 0; i < object.targetServiceAccounts.length; ++i) + message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); + } + if (object.policy != null) + message.policy = String(object.policy); + if (object.policyUri != null) + message.policyUri = String(object.policyUri); + switch (object.firewallRuleType) { + default: + if (typeof object.firewallRuleType === "number") { + message.firewallRuleType = object.firewallRuleType; + break; + } + break; + case "FIREWALL_RULE_TYPE_UNSPECIFIED": + case 0: + message.firewallRuleType = 0; + break; + case "HIERARCHICAL_FIREWALL_POLICY_RULE": + case 1: + message.firewallRuleType = 1; + break; + case "VPC_FIREWALL_RULE": + case 2: + message.firewallRuleType = 2; + break; + case "IMPLIED_VPC_FIREWALL_RULE": + case 3: + message.firewallRuleType = 3; + break; + case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": + case 4: + message.firewallRuleType = 4; + break; + case "NETWORK_FIREWALL_POLICY_RULE": + case 5: + message.firewallRuleType = 5; + break; + case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": + case 6: + message.firewallRuleType = 6; + break; + case "UNSUPPORTED_FIREWALL_POLICY_RULE": + case 100: + message.firewallRuleType = 100; + break; + case "TRACKING_STATE": + case 101: + message.firewallRuleType = 101; + break; + } + return message; + }; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1.FirewallInfo} message FirewallInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirewallInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetTags = []; + object.targetServiceAccounts = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.direction = ""; + object.action = ""; + object.priority = 0; + object.networkUri = ""; + object.policy = ""; + object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; + object.policyUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = message.direction; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.targetTags && message.targetTags.length) { + object.targetTags = []; + for (var j = 0; j < message.targetTags.length; ++j) + object.targetTags[j] = message.targetTags[j]; + } + if (message.targetServiceAccounts && message.targetServiceAccounts.length) { + object.targetServiceAccounts = []; + for (var j = 0; j < message.targetServiceAccounts.length; ++j) + object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; + } + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = message.policy; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + object.policyUri = message.policyUri; + return object; + }; + + /** + * Converts this FirewallInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @instance + * @returns {Object.} JSON object + */ + FirewallInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirewallInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.FirewallInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.FirewallInfo"; + }; + + /** + * FirewallRuleType enum. + * @name google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType + * @enum {number} + * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value + * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value + * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value + * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value + * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value + * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value + * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value + * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value + * @property {number} TRACKING_STATE=101 TRACKING_STATE value + */ + FirewallInfo.FirewallRuleType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; + values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; + values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; + values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; + values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; + values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; + values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; + values[valuesById[101] = "TRACKING_STATE"] = 101; + return values; + })(); + + return FirewallInfo; + })(); + + v1.RouteInfo = (function() { + + /** + * Properties of a RouteInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRouteInfo + * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType + * @property {google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType + * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope + * @property {string|null} [displayName] RouteInfo displayName + * @property {string|null} [uri] RouteInfo uri + * @property {string|null} [region] RouteInfo region + * @property {string|null} [destIpRange] RouteInfo destIpRange + * @property {string|null} [nextHop] RouteInfo nextHop + * @property {string|null} [networkUri] RouteInfo networkUri + * @property {number|null} [priority] RouteInfo priority + * @property {Array.|null} [instanceTags] RouteInfo instanceTags + * @property {string|null} [srcIpRange] RouteInfo srcIpRange + * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges + * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges + * @property {Array.|null} [protocols] RouteInfo protocols + * @property {string|null} [nccHubUri] RouteInfo nccHubUri + * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri + * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri + * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri + */ + + /** + * Constructs a new RouteInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RouteInfo. + * @implements IRouteInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set + */ + function RouteInfo(properties) { + this.instanceTags = []; + this.destPortRanges = []; + this.srcPortRanges = []; + this.protocols = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RouteInfo routeType. + * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteType} routeType + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeType = 0; + + /** + * RouteInfo nextHopType. + * @member {google.cloud.networkmanagement.v1.RouteInfo.NextHopType} nextHopType + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHopType = 0; + + /** + * RouteInfo routeScope. + * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteScope} routeScope + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeScope = 0; + + /** + * RouteInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.displayName = ""; + + /** + * RouteInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.uri = ""; + + /** + * RouteInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.region = ""; + + /** + * RouteInfo destIpRange. + * @member {string} destIpRange + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.destIpRange = ""; + + /** + * RouteInfo nextHop. + * @member {string} nextHop + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHop = ""; + + /** + * RouteInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.networkUri = ""; + + /** + * RouteInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.priority = 0; + + /** + * RouteInfo instanceTags. + * @member {Array.} instanceTags + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.instanceTags = $util.emptyArray; + + /** + * RouteInfo srcIpRange. + * @member {string} srcIpRange + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcIpRange = ""; + + /** + * RouteInfo destPortRanges. + * @member {Array.} destPortRanges + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.destPortRanges = $util.emptyArray; + + /** + * RouteInfo srcPortRanges. + * @member {Array.} srcPortRanges + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcPortRanges = $util.emptyArray; + + /** + * RouteInfo protocols. + * @member {Array.} protocols + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.protocols = $util.emptyArray; + + /** + * RouteInfo nccHubUri. + * @member {string|null|undefined} nccHubUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccHubUri = null; + + /** + * RouteInfo nccSpokeUri. + * @member {string|null|undefined} nccSpokeUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccSpokeUri = null; + + /** + * RouteInfo advertisedRouteSourceRouterUri. + * @member {string|null|undefined} advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteSourceRouterUri = null; + + /** + * RouteInfo advertisedRouteNextHopUri. + * @member {string|null|undefined} advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteNextHopUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RouteInfo _nccHubUri. + * @member {"nccHubUri"|undefined} _nccHubUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { + get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _nccSpokeUri. + * @member {"nccSpokeUri"|undefined} _nccSpokeUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { + get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteSourceRouterUri. + * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteNextHopUri. + * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RouteInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo instance + */ + RouteInfo.create = function create(properties) { + return new RouteInfo(properties); + }; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); + if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); + if (message.instanceTags != null && message.instanceTags.length) + for (var i = 0; i < message.instanceTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); + if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); + if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); + if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); + if (message.destPortRanges != null && message.destPortRanges.length) + for (var i = 0; i < message.destPortRanges.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); + if (message.srcPortRanges != null && message.srcPortRanges.length) + for (var i = 0; i < message.srcPortRanges.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); + if (message.protocols != null && message.protocols.length) + for (var i = 0; i < message.protocols.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); + if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); + if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); + if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); + if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); + if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); + return writer; + }; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: { + message.routeType = reader.int32(); + break; + } + case 9: { + message.nextHopType = reader.int32(); + break; + } + case 14: { + message.routeScope = reader.int32(); + break; + } + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 19: { + message.region = reader.string(); + break; + } + case 3: { + message.destIpRange = reader.string(); + break; + } + case 4: { + message.nextHop = reader.string(); + break; + } + case 5: { + message.networkUri = reader.string(); + break; + } + case 6: { + message.priority = reader.int32(); + break; + } + case 7: { + if (!(message.instanceTags && message.instanceTags.length)) + message.instanceTags = []; + message.instanceTags.push(reader.string()); + break; + } + case 10: { + message.srcIpRange = reader.string(); + break; + } + case 11: { + if (!(message.destPortRanges && message.destPortRanges.length)) + message.destPortRanges = []; + message.destPortRanges.push(reader.string()); + break; + } + case 12: { + if (!(message.srcPortRanges && message.srcPortRanges.length)) + message.srcPortRanges = []; + message.srcPortRanges.push(reader.string()); + break; + } + case 13: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + message.protocols.push(reader.string()); + break; + } + case 15: { + message.nccHubUri = reader.string(); + break; + } + case 16: { + message.nccSpokeUri = reader.string(); + break; + } + case 17: { + message.advertisedRouteSourceRouterUri = reader.string(); + break; + } + case 18: { + message.advertisedRouteNextHopUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RouteInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RouteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.routeType != null && message.hasOwnProperty("routeType")) + switch (message.routeType) { + default: + return "routeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 101: + break; + } + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + switch (message.nextHopType) { + default: + return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) + switch (message.routeScope) { + default: + return "routeScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + if (!$util.isString(message.destIpRange)) + return "destIpRange: string expected"; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + if (!$util.isString(message.nextHop)) + return "nextHop: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { + if (!Array.isArray(message.instanceTags)) + return "instanceTags: array expected"; + for (var i = 0; i < message.instanceTags.length; ++i) + if (!$util.isString(message.instanceTags[i])) + return "instanceTags: string[] expected"; + } + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + if (!$util.isString(message.srcIpRange)) + return "srcIpRange: string expected"; + if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { + if (!Array.isArray(message.destPortRanges)) + return "destPortRanges: array expected"; + for (var i = 0; i < message.destPortRanges.length; ++i) + if (!$util.isString(message.destPortRanges[i])) + return "destPortRanges: string[] expected"; + } + if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { + if (!Array.isArray(message.srcPortRanges)) + return "srcPortRanges: array expected"; + for (var i = 0; i < message.srcPortRanges.length; ++i) + if (!$util.isString(message.srcPortRanges[i])) + return "srcPortRanges: string[] expected"; + } + if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (!Array.isArray(message.protocols)) + return "protocols: array expected"; + for (var i = 0; i < message.protocols.length; ++i) + if (!$util.isString(message.protocols[i])) + return "protocols: string[] expected"; + } + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + properties._nccHubUri = 1; + if (!$util.isString(message.nccHubUri)) + return "nccHubUri: string expected"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + properties._nccSpokeUri = 1; + if (!$util.isString(message.nccSpokeUri)) + return "nccSpokeUri: string expected"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + properties._advertisedRouteSourceRouterUri = 1; + if (!$util.isString(message.advertisedRouteSourceRouterUri)) + return "advertisedRouteSourceRouterUri: string expected"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + properties._advertisedRouteNextHopUri = 1; + if (!$util.isString(message.advertisedRouteNextHopUri)) + return "advertisedRouteNextHopUri: string expected"; + } + return null; + }; + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo + */ + RouteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RouteInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); + switch (object.routeType) { + default: + if (typeof object.routeType === "number") { + message.routeType = object.routeType; + break; + } + break; + case "ROUTE_TYPE_UNSPECIFIED": + case 0: + message.routeType = 0; + break; + case "SUBNET": + case 1: + message.routeType = 1; + break; + case "STATIC": + case 2: + message.routeType = 2; + break; + case "DYNAMIC": + case 3: + message.routeType = 3; + break; + case "PEERING_SUBNET": + case 4: + message.routeType = 4; + break; + case "PEERING_STATIC": + case 5: + message.routeType = 5; + break; + case "PEERING_DYNAMIC": + case 6: + message.routeType = 6; + break; + case "POLICY_BASED": + case 7: + message.routeType = 7; + break; + case "ADVERTISED": + case 101: + message.routeType = 101; + break; + } + switch (object.nextHopType) { + default: + if (typeof object.nextHopType === "number") { + message.nextHopType = object.nextHopType; + break; + } + break; + case "NEXT_HOP_TYPE_UNSPECIFIED": + case 0: + message.nextHopType = 0; + break; + case "NEXT_HOP_IP": + case 1: + message.nextHopType = 1; + break; + case "NEXT_HOP_INSTANCE": + case 2: + message.nextHopType = 2; + break; + case "NEXT_HOP_NETWORK": + case 3: + message.nextHopType = 3; + break; + case "NEXT_HOP_PEERING": + case 4: + message.nextHopType = 4; + break; + case "NEXT_HOP_INTERCONNECT": + case 5: + message.nextHopType = 5; + break; + case "NEXT_HOP_VPN_TUNNEL": + case 6: + message.nextHopType = 6; + break; + case "NEXT_HOP_VPN_GATEWAY": + case 7: + message.nextHopType = 7; + break; + case "NEXT_HOP_INTERNET_GATEWAY": + case 8: + message.nextHopType = 8; + break; + case "NEXT_HOP_BLACKHOLE": + case 9: + message.nextHopType = 9; + break; + case "NEXT_HOP_ILB": + case 10: + message.nextHopType = 10; + break; + case "NEXT_HOP_ROUTER_APPLIANCE": + case 11: + message.nextHopType = 11; + break; + case "NEXT_HOP_NCC_HUB": + case 12: + message.nextHopType = 12; + break; + } + switch (object.routeScope) { + default: + if (typeof object.routeScope === "number") { + message.routeScope = object.routeScope; + break; + } + break; + case "ROUTE_SCOPE_UNSPECIFIED": + case 0: + message.routeScope = 0; + break; + case "NETWORK": + case 1: + message.routeScope = 1; + break; + case "NCC_HUB": + case 2: + message.routeScope = 2; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.region != null) + message.region = String(object.region); + if (object.destIpRange != null) + message.destIpRange = String(object.destIpRange); + if (object.nextHop != null) + message.nextHop = String(object.nextHop); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.instanceTags) { + if (!Array.isArray(object.instanceTags)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.instanceTags: array expected"); + message.instanceTags = []; + for (var i = 0; i < object.instanceTags.length; ++i) + message.instanceTags[i] = String(object.instanceTags[i]); + } + if (object.srcIpRange != null) + message.srcIpRange = String(object.srcIpRange); + if (object.destPortRanges) { + if (!Array.isArray(object.destPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.destPortRanges: array expected"); + message.destPortRanges = []; + for (var i = 0; i < object.destPortRanges.length; ++i) + message.destPortRanges[i] = String(object.destPortRanges[i]); + } + if (object.srcPortRanges) { + if (!Array.isArray(object.srcPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.srcPortRanges: array expected"); + message.srcPortRanges = []; + for (var i = 0; i < object.srcPortRanges.length; ++i) + message.srcPortRanges[i] = String(object.srcPortRanges[i]); + } + if (object.protocols) { + if (!Array.isArray(object.protocols)) + throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.protocols: array expected"); + message.protocols = []; + for (var i = 0; i < object.protocols.length; ++i) + message.protocols[i] = String(object.protocols[i]); + } + if (object.nccHubUri != null) + message.nccHubUri = String(object.nccHubUri); + if (object.nccSpokeUri != null) + message.nccSpokeUri = String(object.nccSpokeUri); + if (object.advertisedRouteSourceRouterUri != null) + message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); + if (object.advertisedRouteNextHopUri != null) + message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); + return message; + }; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1.RouteInfo} message RouteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RouteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.instanceTags = []; + object.destPortRanges = []; + object.srcPortRanges = []; + object.protocols = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.destIpRange = ""; + object.nextHop = ""; + object.networkUri = ""; + object.priority = 0; + object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; + object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; + object.srcIpRange = ""; + object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + object.destIpRange = message.destIpRange; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + object.nextHop = message.nextHop; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.instanceTags && message.instanceTags.length) { + object.instanceTags = []; + for (var j = 0; j < message.instanceTags.length; ++j) + object.instanceTags[j] = message.instanceTags[j]; + } + if (message.routeType != null && message.hasOwnProperty("routeType")) + object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] : message.routeType; + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + object.srcIpRange = message.srcIpRange; + if (message.destPortRanges && message.destPortRanges.length) { + object.destPortRanges = []; + for (var j = 0; j < message.destPortRanges.length; ++j) + object.destPortRanges[j] = message.destPortRanges[j]; + } + if (message.srcPortRanges && message.srcPortRanges.length) { + object.srcPortRanges = []; + for (var j = 0; j < message.srcPortRanges.length; ++j) + object.srcPortRanges[j] = message.srcPortRanges[j]; + } + if (message.protocols && message.protocols.length) { + object.protocols = []; + for (var j = 0; j < message.protocols.length; ++j) + object.protocols[j] = message.protocols[j]; + } + if (message.routeScope != null && message.hasOwnProperty("routeScope")) + object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + object.nccHubUri = message.nccHubUri; + if (options.oneofs) + object._nccHubUri = "nccHubUri"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + object.nccSpokeUri = message.nccSpokeUri; + if (options.oneofs) + object._nccSpokeUri = "nccSpokeUri"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; + if (options.oneofs) + object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; + if (options.oneofs) + object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; + } + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RouteInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @instance + * @returns {Object.} JSON object + */ + RouteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RouteInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RouteInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RouteInfo"; + }; + + /** + * RouteType enum. + * @name google.cloud.networkmanagement.v1.RouteInfo.RouteType + * @enum {number} + * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value + * @property {number} SUBNET=1 SUBNET value + * @property {number} STATIC=2 STATIC value + * @property {number} DYNAMIC=3 DYNAMIC value + * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value + * @property {number} PEERING_STATIC=5 PEERING_STATIC value + * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value + * @property {number} POLICY_BASED=7 POLICY_BASED value + * @property {number} ADVERTISED=101 ADVERTISED value + */ + RouteInfo.RouteType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUBNET"] = 1; + values[valuesById[2] = "STATIC"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + values[valuesById[4] = "PEERING_SUBNET"] = 4; + values[valuesById[5] = "PEERING_STATIC"] = 5; + values[valuesById[6] = "PEERING_DYNAMIC"] = 6; + values[valuesById[7] = "POLICY_BASED"] = 7; + values[valuesById[101] = "ADVERTISED"] = 101; + return values; + })(); + + /** + * NextHopType enum. + * @name google.cloud.networkmanagement.v1.RouteInfo.NextHopType + * @enum {number} + * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value + * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value + * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value + * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value + * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value + * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value + * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value + * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value + * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value + * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value + * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value + * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value + * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value + */ + RouteInfo.NextHopType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEXT_HOP_IP"] = 1; + values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; + values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; + values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; + values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; + values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; + values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; + values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; + values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; + values[valuesById[10] = "NEXT_HOP_ILB"] = 10; + values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; + values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; + return values; + })(); + + /** + * RouteScope enum. + * @name google.cloud.networkmanagement.v1.RouteInfo.RouteScope + * @enum {number} + * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value + * @property {number} NETWORK=1 NETWORK value + * @property {number} NCC_HUB=2 NCC_HUB value + */ + RouteInfo.RouteScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NETWORK"] = 1; + values[valuesById[2] = "NCC_HUB"] = 2; + return values; + })(); + + return RouteInfo; + })(); + + v1.GoogleServiceInfo = (function() { + + /** + * Properties of a GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IGoogleServiceInfo + * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp + * @property {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType + */ + + /** + * Constructs a new GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a GoogleServiceInfo. + * @implements IGoogleServiceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set + */ + function GoogleServiceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleServiceInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.sourceIp = ""; + + /** + * GoogleServiceInfo googleServiceType. + * @member {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType} googleServiceType + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.googleServiceType = 0; + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo instance + */ + GoogleServiceInfo.create = function create(properties) { + return new GoogleServiceInfo(properties); + }; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); + return writer; + }; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.googleServiceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleServiceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleServiceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + switch (message.googleServiceType) { + default: + return "googleServiceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo + */ + GoogleServiceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.GoogleServiceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + switch (object.googleServiceType) { + default: + if (typeof object.googleServiceType === "number") { + message.googleServiceType = object.googleServiceType; + break; + } + break; + case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": + case 0: + message.googleServiceType = 0; + break; + case "IAP": + case 1: + message.googleServiceType = 1; + break; + case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": + case 2: + message.googleServiceType = 2; + break; + case "CLOUD_DNS": + case 3: + message.googleServiceType = 3; + break; + case "GOOGLE_API": + case 4: + message.googleServiceType = 4; + break; + case "GOOGLE_API_PSC": + case 5: + message.googleServiceType = 5; + break; + case "GOOGLE_API_VPC_SC": + case 6: + message.googleServiceType = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1.GoogleServiceInfo} message GoogleServiceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleServiceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; + return object; + }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @instance + * @returns {Object.} JSON object + */ + GoogleServiceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleServiceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GoogleServiceInfo"; + }; + + /** + * GoogleServiceType enum. + * @name google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType + * @enum {number} + * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value + * @property {number} IAP=1 IAP value + * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value + * @property {number} CLOUD_DNS=3 CLOUD_DNS value + * @property {number} GOOGLE_API=4 GOOGLE_API value + * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value + * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value + */ + GoogleServiceInfo.GoogleServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IAP"] = 1; + values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; + values[valuesById[3] = "CLOUD_DNS"] = 3; + values[valuesById[4] = "GOOGLE_API"] = 4; + values[valuesById[5] = "GOOGLE_API_PSC"] = 5; + values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; + return values; + })(); + + return GoogleServiceInfo; + })(); + + v1.ForwardingRuleInfo = (function() { + + /** + * Properties of a ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IForwardingRuleInfo + * @property {string|null} [displayName] ForwardingRuleInfo displayName + * @property {string|null} [uri] ForwardingRuleInfo uri + * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol + * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange + * @property {string|null} [vip] ForwardingRuleInfo vip + * @property {string|null} [target] ForwardingRuleInfo target + * @property {string|null} [networkUri] ForwardingRuleInfo networkUri + * @property {string|null} [region] ForwardingRuleInfo region + * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName + * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget + */ + + /** + * Constructs a new ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ForwardingRuleInfo. + * @implements IForwardingRuleInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set + */ + function ForwardingRuleInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardingRuleInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.displayName = ""; + + /** + * ForwardingRuleInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.uri = ""; + + /** + * ForwardingRuleInfo matchedProtocol. + * @member {string} matchedProtocol + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedProtocol = ""; + + /** + * ForwardingRuleInfo matchedPortRange. + * @member {string} matchedPortRange + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedPortRange = ""; + + /** + * ForwardingRuleInfo vip. + * @member {string} vip + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.vip = ""; + + /** + * ForwardingRuleInfo target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.target = ""; + + /** + * ForwardingRuleInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.networkUri = ""; + + /** + * ForwardingRuleInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.region = ""; + + /** + * ForwardingRuleInfo loadBalancerName. + * @member {string} loadBalancerName + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.loadBalancerName = ""; + + /** + * ForwardingRuleInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * ForwardingRuleInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo instance + */ + ForwardingRuleInfo.create = function create(properties) { + return new ForwardingRuleInfo(properties); + }; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); + if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); + if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.matchedProtocol = reader.string(); + break; + } + case 6: { + message.matchedPortRange = reader.string(); + break; + } + case 4: { + message.vip = reader.string(); + break; + } + case 5: { + message.target = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.loadBalancerName = reader.string(); + break; + } + case 10: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 11: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardingRuleInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardingRuleInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + if (!$util.isString(message.matchedProtocol)) + return "matchedProtocol: string expected"; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + if (!$util.isString(message.matchedPortRange)) + return "matchedPortRange: string expected"; + if (message.vip != null && message.hasOwnProperty("vip")) + if (!$util.isString(message.vip)) + return "vip: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + if (!$util.isString(message.loadBalancerName)) + return "loadBalancerName: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo + */ + ForwardingRuleInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedProtocol != null) + message.matchedProtocol = String(object.matchedProtocol); + if (object.matchedPortRange != null) + message.matchedPortRange = String(object.matchedPortRange); + if (object.vip != null) + message.vip = String(object.vip); + if (object.target != null) + message.target = String(object.target); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + if (object.loadBalancerName != null) + message.loadBalancerName = String(object.loadBalancerName); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1.ForwardingRuleInfo} message ForwardingRuleInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardingRuleInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedProtocol = ""; + object.vip = ""; + object.target = ""; + object.matchedPortRange = ""; + object.networkUri = ""; + object.region = ""; + object.loadBalancerName = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + object.matchedProtocol = message.matchedProtocol; + if (message.vip != null && message.hasOwnProperty("vip")) + object.vip = message.vip; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + object.matchedPortRange = message.matchedPortRange; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + object.loadBalancerName = message.loadBalancerName; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardingRuleInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardingRuleInfo"; + }; + + return ForwardingRuleInfo; + })(); + + v1.LoadBalancerInfo = (function() { + + /** + * Properties of a LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILoadBalancerInfo + * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType + * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri + * @property {Array.|null} [backends] LoadBalancerInfo backends + * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType + * @property {string|null} [backendUri] LoadBalancerInfo backendUri + */ + + /** + * Constructs a new LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LoadBalancerInfo. + * @implements ILoadBalancerInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set + */ + function LoadBalancerInfo(properties) { + this.backends = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerInfo loadBalancerType. + * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType} loadBalancerType + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.loadBalancerType = 0; + + /** + * LoadBalancerInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerInfo backends. + * @member {Array.} backends + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backends = $util.emptyArray; + + /** + * LoadBalancerInfo backendType. + * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType} backendType + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendType = 0; + + /** + * LoadBalancerInfo backendUri. + * @member {string} backendUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendUri = ""; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo instance + */ + LoadBalancerInfo.create = function create(properties) { + return new LoadBalancerInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); + if (message.backends != null && message.backends.length) + for (var i = 0; i < message.backends.length; ++i) + $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); + if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); + return writer; + }; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.loadBalancerType = reader.int32(); + break; + } + case 2: { + message.healthCheckUri = reader.string(); + break; + } + case 3: { + if (!(message.backends && message.backends.length)) + message.backends = []; + message.backends.push($root.google.cloud.networkmanagement.v1.LoadBalancerBackend.decode(reader, reader.uint32())); + break; + } + case 4: { + message.backendType = reader.int32(); + break; + } + case 5: { + message.backendUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + switch (message.loadBalancerType) { + default: + return "loadBalancerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.backends != null && message.hasOwnProperty("backends")) { + if (!Array.isArray(message.backends)) + return "backends: array expected"; + for (var i = 0; i < message.backends.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.verify(message.backends[i]); + if (error) + return "backends." + error; + } + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + switch (message.backendType) { + default: + return "backendType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + if (!$util.isString(message.backendUri)) + return "backendUri: string expected"; + return null; + }; + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo + */ + LoadBalancerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "INTERNAL_TCP_UDP": + case 1: + message.loadBalancerType = 1; + break; + case "NETWORK_TCP_UDP": + case 2: + message.loadBalancerType = 2; + break; + case "HTTP_PROXY": + case 3: + message.loadBalancerType = 3; + break; + case "TCP_PROXY": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY": + case 5: + message.loadBalancerType = 5; + break; + } + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + if (object.backends) { + if (!Array.isArray(object.backends)) + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: array expected"); + message.backends = []; + for (var i = 0; i < object.backends.length; ++i) { + if (typeof object.backends[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: object expected"); + message.backends[i] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.fromObject(object.backends[i]); + } + } + switch (object.backendType) { + default: + if (typeof object.backendType === "number") { + message.backendType = object.backendType; + break; + } + break; + case "BACKEND_TYPE_UNSPECIFIED": + case 0: + message.backendType = 0; + break; + case "BACKEND_SERVICE": + case 1: + message.backendType = 1; + break; + case "TARGET_POOL": + case 2: + message.backendType = 2; + break; + case "TARGET_INSTANCE": + case 3: + message.backendType = 3; + break; + } + if (object.backendUri != null) + message.backendUri = String(object.backendUri); + return message; + }; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1.LoadBalancerInfo} message LoadBalancerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backends = []; + if (options.defaults) { + object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; + object.healthCheckUri = ""; + object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; + object.backendUri = ""; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.backends && message.backends.length) { + object.backends = []; + for (var j = 0; j < message.backends.length; ++j) + object.backends[j] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.toObject(message.backends[j], options); + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + object.backendUri = message.backendUri; + return object; + }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerInfo"; + }; + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value + * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value + * @property {number} HTTP_PROXY=3 HTTP_PROXY value + * @property {number} TCP_PROXY=4 TCP_PROXY value + * @property {number} SSL_PROXY=5 SSL_PROXY value + */ + LoadBalancerInfo.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; + values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; + values[valuesById[3] = "HTTP_PROXY"] = 3; + values[valuesById[4] = "TCP_PROXY"] = 4; + values[valuesById[5] = "SSL_PROXY"] = 5; + return values; + })(); + + /** + * BackendType enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType + * @enum {number} + * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value + * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value + * @property {number} TARGET_POOL=2 TARGET_POOL value + * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value + */ + LoadBalancerInfo.BackendType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKEND_SERVICE"] = 1; + values[valuesById[2] = "TARGET_POOL"] = 2; + values[valuesById[3] = "TARGET_INSTANCE"] = 3; + return values; + })(); + + return LoadBalancerInfo; + })(); + + v1.LoadBalancerBackend = (function() { + + /** + * Properties of a LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILoadBalancerBackend + * @property {string|null} [displayName] LoadBalancerBackend displayName + * @property {string|null} [uri] LoadBalancerBackend uri + * @property {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState + * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules + * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules + */ + + /** + * Constructs a new LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LoadBalancerBackend. + * @implements ILoadBalancerBackend + * @constructor + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set + */ + function LoadBalancerBackend(properties) { + this.healthCheckAllowingFirewallRules = []; + this.healthCheckBlockingFirewallRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackend displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.displayName = ""; + + /** + * LoadBalancerBackend uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.uri = ""; + + /** + * LoadBalancerBackend healthCheckFirewallState. + * @member {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckFirewallState = 0; + + /** + * LoadBalancerBackend healthCheckAllowingFirewallRules. + * @member {Array.} healthCheckAllowingFirewallRules + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; + + /** + * LoadBalancerBackend healthCheckBlockingFirewallRules. + * @member {Array.} healthCheckBlockingFirewallRules + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend instance + */ + LoadBalancerBackend.create = function create(properties) { + return new LoadBalancerBackend(properties); + }; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); + if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); + if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.healthCheckFirewallState = reader.int32(); + break; + } + case 4: { + if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) + message.healthCheckAllowingFirewallRules = []; + message.healthCheckAllowingFirewallRules.push(reader.string()); + break; + } + case 5: { + if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) + message.healthCheckBlockingFirewallRules = []; + message.healthCheckBlockingFirewallRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackend message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + switch (message.healthCheckFirewallState) { + default: + return "healthCheckFirewallState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { + if (!Array.isArray(message.healthCheckAllowingFirewallRules)) + return "healthCheckAllowingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) + return "healthCheckAllowingFirewallRules: string[] expected"; + } + if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { + if (!Array.isArray(message.healthCheckBlockingFirewallRules)) + return "healthCheckBlockingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) + return "healthCheckBlockingFirewallRules: string[] expected"; + } + return null; + }; + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend + */ + LoadBalancerBackend.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackend) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + switch (object.healthCheckFirewallState) { + default: + if (typeof object.healthCheckFirewallState === "number") { + message.healthCheckFirewallState = object.healthCheckFirewallState; + break; + } + break; + case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallState = 0; + break; + case "CONFIGURED": + case 1: + message.healthCheckFirewallState = 1; + break; + case "MISCONFIGURED": + case 2: + message.healthCheckFirewallState = 2; + break; + } + if (object.healthCheckAllowingFirewallRules) { + if (!Array.isArray(object.healthCheckAllowingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); + message.healthCheckAllowingFirewallRules = []; + for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) + message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); + } + if (object.healthCheckBlockingFirewallRules) { + if (!Array.isArray(object.healthCheckBlockingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); + message.healthCheckBlockingFirewallRules = []; + for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) + message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1.LoadBalancerBackend} message LoadBalancerBackend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.healthCheckAllowingFirewallRules = []; + object.healthCheckBlockingFirewallRules = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; + if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { + object.healthCheckAllowingFirewallRules = []; + for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) + object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; + } + if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { + object.healthCheckBlockingFirewallRules = []; + for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) + object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; + } + return object; + }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackend + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackend"; + }; + + /** + * HealthCheckFirewallState enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value + * @property {number} CONFIGURED=1 CONFIGURED value + * @property {number} MISCONFIGURED=2 MISCONFIGURED value + */ + LoadBalancerBackend.HealthCheckFirewallState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIGURED"] = 1; + values[valuesById[2] = "MISCONFIGURED"] = 2; + return values; + })(); + + return LoadBalancerBackend; + })(); + + v1.VpnGatewayInfo = (function() { + + /** + * Properties of a VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IVpnGatewayInfo + * @property {string|null} [displayName] VpnGatewayInfo displayName + * @property {string|null} [uri] VpnGatewayInfo uri + * @property {string|null} [networkUri] VpnGatewayInfo networkUri + * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress + * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri + * @property {string|null} [region] VpnGatewayInfo region + */ + + /** + * Constructs a new VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a VpnGatewayInfo. + * @implements IVpnGatewayInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set + */ + function VpnGatewayInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnGatewayInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.displayName = ""; + + /** + * VpnGatewayInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.uri = ""; + + /** + * VpnGatewayInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.networkUri = ""; + + /** + * VpnGatewayInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.ipAddress = ""; + + /** + * VpnGatewayInfo vpnTunnelUri. + * @member {string} vpnTunnelUri + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.vpnTunnelUri = ""; + + /** + * VpnGatewayInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.region = ""; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo instance + */ + VpnGatewayInfo.create = function create(properties) { + return new VpnGatewayInfo(properties); + }; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 5: { + message.vpnTunnelUri = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnGatewayInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnGatewayInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + if (!$util.isString(message.vpnTunnelUri)) + return "vpnTunnelUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo + */ + VpnGatewayInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.VpnGatewayInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.vpnTunnelUri != null) + message.vpnTunnelUri = String(object.vpnTunnelUri); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1.VpnGatewayInfo} message VpnGatewayInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnGatewayInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.ipAddress = ""; + object.vpnTunnelUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + object.vpnTunnelUri = message.vpnTunnelUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @instance + * @returns {Object.} JSON object + */ + VpnGatewayInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnGatewayInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnGatewayInfo"; + }; + + return VpnGatewayInfo; + })(); + + v1.VpnTunnelInfo = (function() { + + /** + * Properties of a VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IVpnTunnelInfo + * @property {string|null} [displayName] VpnTunnelInfo displayName + * @property {string|null} [uri] VpnTunnelInfo uri + * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway + * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway + * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp + * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp + * @property {string|null} [networkUri] VpnTunnelInfo networkUri + * @property {string|null} [region] VpnTunnelInfo region + * @property {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType + */ + + /** + * Constructs a new VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a VpnTunnelInfo. + * @implements IVpnTunnelInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set + */ + function VpnTunnelInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnTunnelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.displayName = ""; + + /** + * VpnTunnelInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.uri = ""; + + /** + * VpnTunnelInfo sourceGateway. + * @member {string} sourceGateway + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGateway = ""; + + /** + * VpnTunnelInfo remoteGateway. + * @member {string} remoteGateway + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGateway = ""; + + /** + * VpnTunnelInfo remoteGatewayIp. + * @member {string} remoteGatewayIp + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGatewayIp = ""; + + /** + * VpnTunnelInfo sourceGatewayIp. + * @member {string} sourceGatewayIp + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGatewayIp = ""; + + /** + * VpnTunnelInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.networkUri = ""; + + /** + * VpnTunnelInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.region = ""; + + /** + * VpnTunnelInfo routingType. + * @member {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType} routingType + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.routingType = 0; + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo instance + */ + VpnTunnelInfo.create = function create(properties) { + return new VpnTunnelInfo(properties); + }; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); + if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); + if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); + if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); + return writer; + }; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.sourceGateway = reader.string(); + break; + } + case 4: { + message.remoteGateway = reader.string(); + break; + } + case 5: { + message.remoteGatewayIp = reader.string(); + break; + } + case 6: { + message.sourceGatewayIp = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.routingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnTunnelInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnTunnelInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + if (!$util.isString(message.sourceGateway)) + return "sourceGateway: string expected"; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + if (!$util.isString(message.remoteGateway)) + return "remoteGateway: string expected"; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + if (!$util.isString(message.remoteGatewayIp)) + return "remoteGatewayIp: string expected"; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + if (!$util.isString(message.sourceGatewayIp)) + return "sourceGatewayIp: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.routingType != null && message.hasOwnProperty("routingType")) + switch (message.routingType) { + default: + return "routingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo + */ + VpnTunnelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.VpnTunnelInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sourceGateway != null) + message.sourceGateway = String(object.sourceGateway); + if (object.remoteGateway != null) + message.remoteGateway = String(object.remoteGateway); + if (object.remoteGatewayIp != null) + message.remoteGatewayIp = String(object.remoteGatewayIp); + if (object.sourceGatewayIp != null) + message.sourceGatewayIp = String(object.sourceGatewayIp); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + switch (object.routingType) { + default: + if (typeof object.routingType === "number") { + message.routingType = object.routingType; + break; + } + break; + case "ROUTING_TYPE_UNSPECIFIED": + case 0: + message.routingType = 0; + break; + case "ROUTE_BASED": + case 1: + message.routingType = 1; + break; + case "POLICY_BASED": + case 2: + message.routingType = 2; + break; + case "DYNAMIC": + case 3: + message.routingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1.VpnTunnelInfo} message VpnTunnelInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnTunnelInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.sourceGateway = ""; + object.remoteGateway = ""; + object.remoteGatewayIp = ""; + object.sourceGatewayIp = ""; + object.networkUri = ""; + object.region = ""; + object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + object.sourceGateway = message.sourceGateway; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + object.remoteGateway = message.remoteGateway; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + object.remoteGatewayIp = message.remoteGatewayIp; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + object.sourceGatewayIp = message.sourceGatewayIp; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.routingType != null && message.hasOwnProperty("routingType")) + object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; + return object; + }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @instance + * @returns {Object.} JSON object + */ + VpnTunnelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnTunnelInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnTunnelInfo"; + }; + + /** + * RoutingType enum. + * @name google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType + * @enum {number} + * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value + * @property {number} ROUTE_BASED=1 ROUTE_BASED value + * @property {number} POLICY_BASED=2 POLICY_BASED value + * @property {number} DYNAMIC=3 DYNAMIC value + */ + VpnTunnelInfo.RoutingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROUTE_BASED"] = 1; + values[valuesById[2] = "POLICY_BASED"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + return values; + })(); + + return VpnTunnelInfo; + })(); + + v1.EndpointInfo = (function() { + + /** + * Properties of an EndpointInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IEndpointInfo + * @property {string|null} [sourceIp] EndpointInfo sourceIp + * @property {string|null} [destinationIp] EndpointInfo destinationIp + * @property {string|null} [protocol] EndpointInfo protocol + * @property {number|null} [sourcePort] EndpointInfo sourcePort + * @property {number|null} [destinationPort] EndpointInfo destinationPort + * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri + * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri + * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri + */ + + /** + * Constructs a new EndpointInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an EndpointInfo. + * @implements IEndpointInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set + */ + function EndpointInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EndpointInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceIp = ""; + + /** + * EndpointInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationIp = ""; + + /** + * EndpointInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.protocol = ""; + + /** + * EndpointInfo sourcePort. + * @member {number} sourcePort + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourcePort = 0; + + /** + * EndpointInfo destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationPort = 0; + + /** + * EndpointInfo sourceNetworkUri. + * @member {string} sourceNetworkUri + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceNetworkUri = ""; + + /** + * EndpointInfo destinationNetworkUri. + * @member {string} destinationNetworkUri + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationNetworkUri = ""; + + /** + * EndpointInfo sourceAgentUri. + * @member {string} sourceAgentUri + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceAgentUri = ""; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo instance + */ + EndpointInfo.create = function create(properties) { + return new EndpointInfo(properties); + }; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); + if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); + if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); + if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); + return writer; + }; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.destinationIp = reader.string(); + break; + } + case 3: { + message.protocol = reader.string(); + break; + } + case 4: { + message.sourcePort = reader.int32(); + break; + } + case 5: { + message.destinationPort = reader.int32(); + break; + } + case 6: { + message.sourceNetworkUri = reader.string(); + break; + } + case 7: { + message.destinationNetworkUri = reader.string(); + break; + } + case 8: { + message.sourceAgentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndpointInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndpointInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isInteger(message.sourcePort)) + return "sourcePort: integer expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + if (!$util.isString(message.sourceNetworkUri)) + return "sourceNetworkUri: string expected"; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + if (!$util.isString(message.destinationNetworkUri)) + return "destinationNetworkUri: string expected"; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + if (!$util.isString(message.sourceAgentUri)) + return "sourceAgentUri: string expected"; + return null; + }; + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo + */ + EndpointInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.EndpointInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.sourcePort != null) + message.sourcePort = object.sourcePort | 0; + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; + if (object.sourceNetworkUri != null) + message.sourceNetworkUri = String(object.sourceNetworkUri); + if (object.destinationNetworkUri != null) + message.destinationNetworkUri = String(object.destinationNetworkUri); + if (object.sourceAgentUri != null) + message.sourceAgentUri = String(object.sourceAgentUri); + return message; + }; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1.EndpointInfo} message EndpointInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndpointInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.destinationIp = ""; + object.protocol = ""; + object.sourcePort = 0; + object.destinationPort = 0; + object.sourceNetworkUri = ""; + object.destinationNetworkUri = ""; + object.sourceAgentUri = ""; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + object.sourceNetworkUri = message.sourceNetworkUri; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + object.destinationNetworkUri = message.destinationNetworkUri; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + object.sourceAgentUri = message.sourceAgentUri; + return object; + }; + + /** + * Converts this EndpointInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @instance + * @returns {Object.} JSON object + */ + EndpointInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndpointInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.EndpointInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.EndpointInfo"; + }; + + return EndpointInfo; + })(); + + v1.DeliverInfo = (function() { + + /** + * Properties of a DeliverInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IDeliverInfo + * @property {google.cloud.networkmanagement.v1.DeliverInfo.Target|null} [target] DeliverInfo target + * @property {string|null} [resourceUri] DeliverInfo resourceUri + * @property {string|null} [ipAddress] DeliverInfo ipAddress + * @property {string|null} [storageBucket] DeliverInfo storageBucket + * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget + */ + + /** + * Constructs a new DeliverInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a DeliverInfo. + * @implements IDeliverInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set + */ + function DeliverInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliverInfo target. + * @member {google.cloud.networkmanagement.v1.DeliverInfo.Target} target + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.target = 0; + + /** + * DeliverInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.resourceUri = ""; + + /** + * DeliverInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.ipAddress = ""; + + /** + * DeliverInfo storageBucket. + * @member {string} storageBucket + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.storageBucket = ""; + + /** + * DeliverInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo instance + */ + DeliverInfo.create = function create(properties) { + return new DeliverInfo(properties); + }; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.storageBucket = reader.string(); + break; + } + case 5: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeliverInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeliverInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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: + case 15: + case 16: + case 17: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + if (!$util.isString(message.storageBucket)) + return "storageBucket: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo + */ + DeliverInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.DeliverInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "INSTANCE": + case 1: + message.target = 1; + break; + case "INTERNET": + case 2: + message.target = 2; + break; + case "GOOGLE_API": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "CLOUD_SQL_INSTANCE": + case 5: + message.target = 5; + break; + case "PSC_PUBLISHED_SERVICE": + case 6: + message.target = 6; + break; + case "PSC_GOOGLE_API": + case 7: + message.target = 7; + break; + case "PSC_VPC_SC": + case 8: + message.target = 8; + break; + case "SERVERLESS_NEG": + case 9: + message.target = 9; + break; + case "STORAGE_BUCKET": + case 10: + message.target = 10; + break; + case "PRIVATE_NETWORK": + case 11: + message.target = 11; + break; + case "CLOUD_FUNCTION": + case 12: + message.target = 12; + break; + case "APP_ENGINE_VERSION": + case 13: + message.target = 13; + break; + case "CLOUD_RUN_REVISION": + case 14: + message.target = 14; + break; + case "GOOGLE_MANAGED_SERVICE": + case 15: + message.target = 15; + break; + case "REDIS_INSTANCE": + case 16: + message.target = 16; + break; + case "REDIS_CLUSTER": + case 17: + message.target = 17; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.storageBucket != null) + message.storageBucket = String(object.storageBucket); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1.DeliverInfo} message DeliverInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeliverInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + object.storageBucket = ""; + object.pscGoogleApiTarget = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + object.storageBucket = message.storageBucket; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this DeliverInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @instance + * @returns {Object.} JSON object + */ + DeliverInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeliverInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.DeliverInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeliverInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1.DeliverInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} INTERNET=2 INTERNET value + * @property {number} GOOGLE_API=3 GOOGLE_API value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value + * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value + * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value + * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value + * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value + * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value + * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value + * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value + * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value + * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value + * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value + * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value + * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value + */ + DeliverInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "INTERNET"] = 2; + values[valuesById[3] = "GOOGLE_API"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; + values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; + values[valuesById[7] = "PSC_GOOGLE_API"] = 7; + values[valuesById[8] = "PSC_VPC_SC"] = 8; + values[valuesById[9] = "SERVERLESS_NEG"] = 9; + values[valuesById[10] = "STORAGE_BUCKET"] = 10; + values[valuesById[11] = "PRIVATE_NETWORK"] = 11; + values[valuesById[12] = "CLOUD_FUNCTION"] = 12; + values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; + values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; + values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; + values[valuesById[16] = "REDIS_INSTANCE"] = 16; + values[valuesById[17] = "REDIS_CLUSTER"] = 17; + return values; + })(); + + return DeliverInfo; + })(); + + v1.ForwardInfo = (function() { + + /** + * Properties of a ForwardInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IForwardInfo + * @property {google.cloud.networkmanagement.v1.ForwardInfo.Target|null} [target] ForwardInfo target + * @property {string|null} [resourceUri] ForwardInfo resourceUri + * @property {string|null} [ipAddress] ForwardInfo ipAddress + */ + + /** + * Constructs a new ForwardInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ForwardInfo. + * @implements IForwardInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set + */ + function ForwardInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardInfo target. + * @member {google.cloud.networkmanagement.v1.ForwardInfo.Target} target + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.target = 0; + + /** + * ForwardInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.resourceUri = ""; + + /** + * ForwardInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.ipAddress = ""; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo instance + */ + ForwardInfo.create = function create(properties) { + return new ForwardInfo(properties); + }; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo + */ + ForwardInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "PEERING_VPC": + case 1: + message.target = 1; + break; + case "VPN_GATEWAY": + case 2: + message.target = 2; + break; + case "INTERCONNECT": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": + case 5: + message.target = 5; + break; + case "CLOUD_SQL_INSTANCE": + case 6: + message.target = 6; + break; + case "ANOTHER_PROJECT": + case 7: + message.target = 7; + break; + case "NCC_HUB": + case 8: + message.target = 8; + break; + case "ROUTER_APPLIANCE": + case 9: + message.target = 9; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1.ForwardInfo} message ForwardInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this ForwardInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ForwardInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1.ForwardInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} PEERING_VPC=1 PEERING_VPC value + * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value + * @property {number} INTERCONNECT=3 INTERCONNECT value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value + * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value + * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value + * @property {number} NCC_HUB=8 NCC_HUB value + * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value + */ + ForwardInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "PEERING_VPC"] = 1; + values[valuesById[2] = "VPN_GATEWAY"] = 2; + values[valuesById[3] = "INTERCONNECT"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; + values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; + values[valuesById[7] = "ANOTHER_PROJECT"] = 7; + values[valuesById[8] = "NCC_HUB"] = 8; + values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; + return values; + })(); + + return ForwardInfo; + })(); + + v1.AbortInfo = (function() { + + /** + * Properties of an AbortInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IAbortInfo + * @property {google.cloud.networkmanagement.v1.AbortInfo.Cause|null} [cause] AbortInfo cause + * @property {string|null} [resourceUri] AbortInfo resourceUri + * @property {string|null} [ipAddress] AbortInfo ipAddress + * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission + */ + + /** + * Constructs a new AbortInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an AbortInfo. + * @implements IAbortInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set + */ + function AbortInfo(properties) { + this.projectsMissingPermission = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbortInfo cause. + * @member {google.cloud.networkmanagement.v1.AbortInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.cause = 0; + + /** + * AbortInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.resourceUri = ""; + + /** + * AbortInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.ipAddress = ""; + + /** + * AbortInfo projectsMissingPermission. + * @member {Array.} projectsMissingPermission + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + */ + AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo instance + */ + AbortInfo.create = function create(properties) { + return new AbortInfo(properties); + }; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 3: { + if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) + message.projectsMissingPermission = []; + message.projectsMissingPermission.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbortInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbortInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 3: + case 7: + case 8: + case 11: + case 12: + case 13: + case 14: + case 2: + case 32: + case 23: + case 4: + case 28: + case 29: + case 36: + case 5: + case 6: + case 9: + case 10: + case 15: + case 16: + case 17: + case 18: + case 24: + case 25: + case 26: + case 27: + case 19: + case 20: + case 34: + case 35: + case 21: + case 22: + case 30: + case 31: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { + if (!Array.isArray(message.projectsMissingPermission)) + return "projectsMissingPermission: array expected"; + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + if (!$util.isString(message.projectsMissingPermission[i])) + return "projectsMissingPermission: string[] expected"; + } + return null; + }; + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo + */ + AbortInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.AbortInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_NETWORK": + case 1: + message.cause = 1; + break; + case "UNKNOWN_PROJECT": + case 3: + message.cause = 3; + break; + case "NO_EXTERNAL_IP": + case 7: + message.cause = 7; + break; + case "UNINTENDED_DESTINATION": + case 8: + message.cause = 8; + break; + case "SOURCE_ENDPOINT_NOT_FOUND": + case 11: + message.cause = 11; + break; + case "MISMATCHED_SOURCE_NETWORK": + case 12: + message.cause = 12; + break; + case "DESTINATION_ENDPOINT_NOT_FOUND": + case 13: + message.cause = 13; + break; + case "MISMATCHED_DESTINATION_NETWORK": + case 14: + message.cause = 14; + break; + case "UNKNOWN_IP": + case 2: + message.cause = 2; + break; + case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": + case 32: + message.cause = 32; + break; + case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": + case 23: + message.cause = 23; + break; + case "PERMISSION_DENIED": + case 4: + message.cause = 4; + break; + case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": + case 28: + message.cause = 28; + break; + case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": + case 29: + message.cause = 29; + break; + case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": + case 36: + message.cause = 36; + break; + case "NO_SOURCE_LOCATION": + case 5: + message.cause = 5; + break; + case "INVALID_ARGUMENT": + case 6: + message.cause = 6; + break; + case "TRACE_TOO_LONG": + case 9: + message.cause = 9; + break; + case "INTERNAL_ERROR": + case 10: + message.cause = 10; + break; + case "UNSUPPORTED": + case 15: + message.cause = 15; + break; + case "MISMATCHED_IP_VERSION": + case 16: + message.cause = 16; + break; + case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": + case 17: + message.cause = 17; + break; + case "RESOURCE_CONFIG_NOT_FOUND": + case 18: + message.cause = 18; + break; + case "VM_INSTANCE_CONFIG_NOT_FOUND": + case 24: + message.cause = 24; + break; + case "NETWORK_CONFIG_NOT_FOUND": + case 25: + message.cause = 25; + break; + case "FIREWALL_CONFIG_NOT_FOUND": + case 26: + message.cause = 26; + break; + case "ROUTE_CONFIG_NOT_FOUND": + case 27: + message.cause = 27; + break; + case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": + case 19: + message.cause = 19; + break; + case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": + case 20: + message.cause = 20; + break; + case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": + case 34: + message.cause = 34; + break; + case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": + case 35: + message.cause = 35; + break; + case "SOURCE_FORWARDING_RULE_UNSUPPORTED": + case 21: + message.cause = 21; + break; + case "NON_ROUTABLE_IP_ADDRESS": + case 22: + message.cause = 22; + break; + case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": + case 30: + message.cause = 30; + break; + case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": + case 31: + message.cause = 31; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.projectsMissingPermission) { + if (!Array.isArray(object.projectsMissingPermission)) + throw TypeError(".google.cloud.networkmanagement.v1.AbortInfo.projectsMissingPermission: array expected"); + message.projectsMissingPermission = []; + for (var i = 0; i < object.projectsMissingPermission.length; ++i) + message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); + } + return message; + }; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1.AbortInfo} message AbortInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbortInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectsMissingPermission = []; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.projectsMissingPermission && message.projectsMissingPermission.length) { + object.projectsMissingPermission = []; + for (var j = 0; j < message.projectsMissingPermission.length; ++j) + object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this AbortInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @instance + * @returns {Object.} JSON object + */ + AbortInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbortInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.AbortInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AbortInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1.AbortInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value + * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value + * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value + * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value + * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value + * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value + * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value + * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value + * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value + * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value + * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value + * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value + * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value + * @property {number} UNSUPPORTED=15 UNSUPPORTED value + * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value + * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value + * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value + * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value + * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value + * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value + * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value + * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value + * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value + * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value + * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value + * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value + * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value + * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value + * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value + */ + AbortInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; + values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; + values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; + values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; + values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; + values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; + values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; + values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; + values[valuesById[2] = "UNKNOWN_IP"] = 2; + values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; + values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; + values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; + values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; + values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; + values[valuesById[6] = "INVALID_ARGUMENT"] = 6; + values[valuesById[9] = "TRACE_TOO_LONG"] = 9; + values[valuesById[10] = "INTERNAL_ERROR"] = 10; + values[valuesById[15] = "UNSUPPORTED"] = 15; + values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; + values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; + values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; + values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; + values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; + values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; + values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; + values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; + values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; + values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; + values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; + values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; + values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; + values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; + values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; + return values; + })(); + + return AbortInfo; + })(); + + v1.DropInfo = (function() { + + /** + * Properties of a DropInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IDropInfo + * @property {google.cloud.networkmanagement.v1.DropInfo.Cause|null} [cause] DropInfo cause + * @property {string|null} [resourceUri] DropInfo resourceUri + * @property {string|null} [sourceIp] DropInfo sourceIp + * @property {string|null} [destinationIp] DropInfo destinationIp + * @property {string|null} [region] DropInfo region + */ + + /** + * Constructs a new DropInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a DropInfo. + * @implements IDropInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set + */ + function DropInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DropInfo cause. + * @member {google.cloud.networkmanagement.v1.DropInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.cause = 0; + + /** + * DropInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.resourceUri = ""; + + /** + * DropInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.sourceIp = ""; + + /** + * DropInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.destinationIp = ""; + + /** + * DropInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + */ + DropInfo.prototype.region = ""; + + /** + * Creates a new DropInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo instance + */ + DropInfo.create = function create(properties) { + return new DropInfo(properties); + }; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); + return writer; + }; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DropInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.sourceIp = reader.string(); + break; + } + case 4: { + message.destinationIp = reader.string(); + break; + } + case 5: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DropInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DropInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 42: + case 43: + case 49: + case 50: + case 51: + case 52: + case 53: + case 44: + case 45: + case 46: + case 7: + case 8: + case 47: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 27: + case 28: + case 68: + case 69: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 38: + case 36: + case 21: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 63: + case 22: + case 23: + case 24: + case 60: + case 61: + case 25: + case 26: + case 41: + case 48: + case 54: + case 58: + case 57: + case 64: + case 55: + case 56: + case 29: + case 37: + case 39: + case 40: + case 59: + case 62: + case 65: + case 66: + case 67: + case 70: + case 71: + case 72: + case 73: + case 74: + case 78: + case 75: + case 76: + case 77: + case 79: + case 80: + case 81: + case 82: + case 83: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo + */ + DropInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.DropInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.DropInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_EXTERNAL_ADDRESS": + case 1: + message.cause = 1; + break; + case "FOREIGN_IP_DISALLOWED": + case 2: + message.cause = 2; + break; + case "FIREWALL_RULE": + case 3: + message.cause = 3; + break; + case "NO_ROUTE": + case 4: + message.cause = 4; + break; + case "ROUTE_BLACKHOLE": + case 5: + message.cause = 5; + break; + case "ROUTE_WRONG_NETWORK": + case 6: + message.cause = 6; + break; + case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": + case 42: + message.cause = 42; + break; + case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": + case 43: + message.cause = 43; + break; + case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": + case 49: + message.cause = 49; + break; + case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": + case 50: + message.cause = 50; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": + case 51: + message.cause = 51; + break; + case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": + case 52: + message.cause = 52; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": + case 53: + message.cause = 53; + break; + case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": + case 44: + message.cause = 44; + break; + case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": + case 45: + message.cause = 45; + break; + case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": + case 46: + message.cause = 46; + break; + case "PRIVATE_TRAFFIC_TO_INTERNET": + case 7: + message.cause = 7; + break; + case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": + case 8: + message.cause = 8; + break; + case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": + case 47: + message.cause = 47; + break; + case "NO_EXTERNAL_ADDRESS": + case 9: + message.cause = 9; + break; + case "UNKNOWN_INTERNAL_ADDRESS": + case 10: + message.cause = 10; + break; + case "FORWARDING_RULE_MISMATCH": + case 11: + message.cause = 11; + break; + case "FORWARDING_RULE_NO_INSTANCES": + case 12: + message.cause = 12; + break; + case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": + case 13: + message.cause = 13; + break; + case "INSTANCE_NOT_RUNNING": + case 14: + message.cause = 14; + break; + case "GKE_CLUSTER_NOT_RUNNING": + case 27: + message.cause = 27; + break; + case "CLOUD_SQL_INSTANCE_NOT_RUNNING": + case 28: + message.cause = 28; + break; + case "REDIS_INSTANCE_NOT_RUNNING": + case 68: + message.cause = 68; + break; + case "REDIS_CLUSTER_NOT_RUNNING": + case 69: + message.cause = 69; + break; + case "TRAFFIC_TYPE_BLOCKED": + case 15: + message.cause = 15; + break; + case "GKE_MASTER_UNAUTHORIZED_ACCESS": + case 16: + message.cause = 16; + break; + case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": + case 17: + message.cause = 17; + break; + case "DROPPED_INSIDE_GKE_SERVICE": + case 18: + message.cause = 18; + break; + case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": + case 19: + message.cause = 19; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PEERING": + case 20: + message.cause = 20; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": + case 38: + message.cause = 38; + break; + case "GKE_PSC_ENDPOINT_MISSING": + case 36: + message.cause = 36; + break; + case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": + case 21: + message.cause = 21; + break; + case "GKE_CONTROL_PLANE_REGION_MISMATCH": + case 30: + message.cause = 30; + break; + case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": + case 31: + message.cause = 31; + break; + case "GKE_CONTROL_PLANE_NO_ROUTE": + case 32: + message.cause = 32; + break; + case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": + case 33: + message.cause = 33; + break; + case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": + case 34: + message.cause = 34; + break; + case "CLOUD_SQL_INSTANCE_NO_ROUTE": + case 35: + message.cause = 35; + break; + case "CLOUD_SQL_CONNECTOR_REQUIRED": + case 63: + message.cause = 63; + break; + case "CLOUD_FUNCTION_NOT_ACTIVE": + case 22: + message.cause = 22; + break; + case "VPC_CONNECTOR_NOT_SET": + case 23: + message.cause = 23; + break; + case "VPC_CONNECTOR_NOT_RUNNING": + case 24: + message.cause = 24; + break; + case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": + case 60: + message.cause = 60; + break; + case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": + case 61: + message.cause = 61; + break; + case "FORWARDING_RULE_REGION_MISMATCH": + case 25: + message.cause = 25; + break; + case "PSC_CONNECTION_NOT_ACCEPTED": + case 26: + message.cause = 26; + break; + case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": + case 41: + message.cause = 41; + break; + case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": + case 48: + message.cause = 48; + break; + case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": + case 54: + message.cause = 54; + break; + case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": + case 58: + message.cause = 58; + break; + case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": + case 57: + message.cause = 57; + break; + case "PSC_TRANSITIVITY_NOT_PROPAGATED": + case 64: + message.cause = 64; + break; + case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": + case 55: + message.cause = 55; + break; + case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": + case 56: + message.cause = 56; + break; + case "CLOUD_RUN_REVISION_NOT_READY": + case 29: + message.cause = 29; + break; + case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": + case 37: + message.cause = 37; + break; + case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": + case 39: + message.cause = 39; + break; + case "CLOUD_NAT_NO_ADDRESSES": + case 40: + message.cause = 40; + break; + case "ROUTING_LOOP": + case 59: + message.cause = 59; + break; + case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": + case 62: + message.cause = 62; + break; + case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": + case 65: + message.cause = 65; + break; + case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": + case 66: + message.cause = 66; + break; + case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": + case 67: + message.cause = 67; + break; + case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": + case 70: + message.cause = 70; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PORT": + case 71: + message.cause = 71; + break; + case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": + case 72: + message.cause = 72; + break; + case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": + case 73: + message.cause = 73; + break; + case "REDIS_INSTANCE_NO_EXTERNAL_IP": + case 74: + message.cause = 74; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": + case 78: + message.cause = 78; + break; + case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": + case 75: + message.cause = 75; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PORT": + case 76: + message.cause = 76; + break; + case "REDIS_CLUSTER_NO_EXTERNAL_IP": + case 77: + message.cause = 77; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": + case 79: + message.cause = 79; + break; + case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": + case 80: + message.cause = 80; + break; + case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": + case 81: + message.cause = 81; + break; + case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": + case 82: + message.cause = 82; + break; + case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": + case 83: + message.cause = 83; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1.DropInfo} message DropInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DropInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.sourceIp = ""; + object.destinationIp = ""; + object.region = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this DropInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @instance + * @returns {Object.} JSON object + */ + DropInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DropInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.DropInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DropInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1.DropInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value + * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value + * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value + * @property {number} NO_ROUTE=4 NO_ROUTE value + * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value + * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value + * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value + * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value + * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value + * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value + * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value + * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value + * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value + * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value + * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value + * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value + * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value + * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value + * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value + * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value + * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value + * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value + * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value + * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value + * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value + * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value + * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value + * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value + * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value + * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value + * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value + * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value + * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value + * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value + * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value + * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value + * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value + * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value + * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value + * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value + * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value + * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value + * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value + * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value + * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value + * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value + * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value + * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value + * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value + * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value + * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value + * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value + * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value + * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value + * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value + * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value + * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value + * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value + * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value + * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value + * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value + * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value + * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value + * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value + * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value + * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value + * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value + * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value + * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value + * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value + */ + DropInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; + values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; + values[valuesById[3] = "FIREWALL_RULE"] = 3; + values[valuesById[4] = "NO_ROUTE"] = 4; + values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; + values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; + values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; + values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; + values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; + values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; + values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; + values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; + values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; + values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; + values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; + values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; + values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; + values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; + values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; + values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; + values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; + values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; + values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; + values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; + values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; + values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; + values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; + values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; + values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; + values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; + values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; + values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; + values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; + values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; + values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; + values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; + values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; + values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; + values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; + values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; + values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; + values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; + values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; + values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; + values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; + values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; + values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; + values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; + values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; + values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; + values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; + values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; + values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; + values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; + values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; + values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; + values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; + values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; + values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; + values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; + values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; + values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; + values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; + values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; + values[valuesById[59] = "ROUTING_LOOP"] = 59; + values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; + values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; + values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; + values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; + values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; + values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; + values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; + values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; + values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; + values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; + values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; + values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; + values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; + values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; + values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; + values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; + values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; + values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; + return values; + })(); + + return DropInfo; + })(); + + v1.GKEMasterInfo = (function() { + + /** + * Properties of a GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IGKEMasterInfo + * @property {string|null} [clusterUri] GKEMasterInfo clusterUri + * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri + * @property {string|null} [internalIp] GKEMasterInfo internalIp + * @property {string|null} [externalIp] GKEMasterInfo externalIp + * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint + */ + + /** + * Constructs a new GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a GKEMasterInfo. + * @implements IGKEMasterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set + */ + function GKEMasterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GKEMasterInfo clusterUri. + * @member {string} clusterUri + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterUri = ""; + + /** + * GKEMasterInfo clusterNetworkUri. + * @member {string} clusterNetworkUri + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterNetworkUri = ""; + + /** + * GKEMasterInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.internalIp = ""; + + /** + * GKEMasterInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.externalIp = ""; + + /** + * GKEMasterInfo dnsEndpoint. + * @member {string} dnsEndpoint + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.dnsEndpoint = ""; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo instance + */ + GKEMasterInfo.create = function create(properties) { + return new GKEMasterInfo(properties); + }; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); + if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); + return writer; + }; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.clusterUri = reader.string(); + break; + } + case 4: { + message.clusterNetworkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.dnsEndpoint = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GKEMasterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GKEMasterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + if (!$util.isString(message.clusterUri)) + return "clusterUri: string expected"; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + if (!$util.isString(message.clusterNetworkUri)) + return "clusterNetworkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + if (!$util.isString(message.dnsEndpoint)) + return "dnsEndpoint: string expected"; + return null; + }; + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo + */ + GKEMasterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.GKEMasterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); + if (object.clusterUri != null) + message.clusterUri = String(object.clusterUri); + if (object.clusterNetworkUri != null) + message.clusterNetworkUri = String(object.clusterNetworkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.dnsEndpoint != null) + message.dnsEndpoint = String(object.dnsEndpoint); + return message; + }; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1.GKEMasterInfo} message GKEMasterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GKEMasterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterUri = ""; + object.clusterNetworkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.dnsEndpoint = ""; + } + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + object.clusterUri = message.clusterUri; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + object.clusterNetworkUri = message.clusterNetworkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + object.dnsEndpoint = message.dnsEndpoint; + return object; + }; + + /** + * Converts this GKEMasterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + * @returns {Object.} JSON object + */ + GKEMasterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GKEMasterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GKEMasterInfo"; + }; + + return GKEMasterInfo; + })(); + + v1.CloudSQLInstanceInfo = (function() { + + /** + * Properties of a CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICloudSQLInstanceInfo + * @property {string|null} [displayName] CloudSQLInstanceInfo displayName + * @property {string|null} [uri] CloudSQLInstanceInfo uri + * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri + * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp + * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp + * @property {string|null} [region] CloudSQLInstanceInfo region + */ + + /** + * Constructs a new CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CloudSQLInstanceInfo. + * @implements ICloudSQLInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set + */ + function CloudSQLInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudSQLInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.displayName = ""; + + /** + * CloudSQLInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.uri = ""; + + /** + * CloudSQLInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.networkUri = ""; + + /** + * CloudSQLInstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.internalIp = ""; + + /** + * CloudSQLInstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.externalIp = ""; + + /** + * CloudSQLInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.region = ""; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance + */ + CloudSQLInstanceInfo.create = function create(properties) { + return new CloudSQLInstanceInfo(properties); + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); + return writer; + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSQLInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + */ + CloudSQLInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSQLInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudSQLInstanceInfo"; + }; + + return CloudSQLInstanceInfo; + })(); + + v1.RedisInstanceInfo = (function() { + + /** + * Properties of a RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRedisInstanceInfo + * @property {string|null} [displayName] RedisInstanceInfo displayName + * @property {string|null} [uri] RedisInstanceInfo uri + * @property {string|null} [networkUri] RedisInstanceInfo networkUri + * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp + * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp + * @property {string|null} [region] RedisInstanceInfo region + */ + + /** + * Constructs a new RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RedisInstanceInfo. + * @implements IRedisInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set + */ + function RedisInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.displayName = ""; + + /** + * RedisInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.uri = ""; + + /** + * RedisInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.networkUri = ""; + + /** + * RedisInstanceInfo primaryEndpointIp. + * @member {string} primaryEndpointIp + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.primaryEndpointIp = ""; + + /** + * RedisInstanceInfo readEndpointIp. + * @member {string} readEndpointIp + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.readEndpointIp = ""; + + /** + * RedisInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.region = ""; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo instance + */ + RedisInstanceInfo.create = function create(properties) { + return new RedisInstanceInfo(properties); + }; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); + if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.primaryEndpointIp = reader.string(); + break; + } + case 5: { + message.readEndpointIp = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + if (!$util.isString(message.primaryEndpointIp)) + return "primaryEndpointIp: string expected"; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + if (!$util.isString(message.readEndpointIp)) + return "readEndpointIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo + */ + RedisInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RedisInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.primaryEndpointIp != null) + message.primaryEndpointIp = String(object.primaryEndpointIp); + if (object.readEndpointIp != null) + message.readEndpointIp = String(object.readEndpointIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1.RedisInstanceInfo} message RedisInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.primaryEndpointIp = ""; + object.readEndpointIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + object.primaryEndpointIp = message.primaryEndpointIp; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + object.readEndpointIp = message.readEndpointIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + RedisInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisInstanceInfo"; + }; + + return RedisInstanceInfo; + })(); + + v1.RedisClusterInfo = (function() { + + /** + * Properties of a RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRedisClusterInfo + * @property {string|null} [displayName] RedisClusterInfo displayName + * @property {string|null} [uri] RedisClusterInfo uri + * @property {string|null} [networkUri] RedisClusterInfo networkUri + * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress + * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress + * @property {string|null} [location] RedisClusterInfo location + */ + + /** + * Constructs a new RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RedisClusterInfo. + * @implements IRedisClusterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set + */ + function RedisClusterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisClusterInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.displayName = ""; + + /** + * RedisClusterInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.uri = ""; + + /** + * RedisClusterInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.networkUri = ""; + + /** + * RedisClusterInfo discoveryEndpointIpAddress. + * @member {string} discoveryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; + + /** + * RedisClusterInfo secondaryEndpointIpAddress. + * @member {string} secondaryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; + + /** + * RedisClusterInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.location = ""; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo instance + */ + RedisClusterInfo.create = function create(properties) { + return new RedisClusterInfo(properties); + }; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); + if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); + return writer; + }; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.discoveryEndpointIpAddress = reader.string(); + break; + } + case 5: { + message.secondaryEndpointIpAddress = reader.string(); + break; + } + case 6: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisClusterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisClusterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + if (!$util.isString(message.discoveryEndpointIpAddress)) + return "discoveryEndpointIpAddress: string expected"; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + if (!$util.isString(message.secondaryEndpointIpAddress)) + return "secondaryEndpointIpAddress: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo + */ + RedisClusterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RedisClusterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.discoveryEndpointIpAddress != null) + message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); + if (object.secondaryEndpointIpAddress != null) + message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1.RedisClusterInfo} message RedisClusterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisClusterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.discoveryEndpointIpAddress = ""; + object.secondaryEndpointIpAddress = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this RedisClusterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @instance + * @returns {Object.} JSON object + */ + RedisClusterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisClusterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisClusterInfo"; + }; + + return RedisClusterInfo; + })(); + + v1.CloudFunctionInfo = (function() { + + /** + * Properties of a CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICloudFunctionInfo + * @property {string|null} [displayName] CloudFunctionInfo displayName + * @property {string|null} [uri] CloudFunctionInfo uri + * @property {string|null} [location] CloudFunctionInfo location + * @property {number|Long|null} [versionId] CloudFunctionInfo versionId + */ + + /** + * Constructs a new CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CloudFunctionInfo. + * @implements ICloudFunctionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set + */ + function CloudFunctionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.displayName = ""; + + /** + * CloudFunctionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.uri = ""; + + /** + * CloudFunctionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.location = ""; + + /** + * CloudFunctionInfo versionId. + * @member {number|Long} versionId + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo instance + */ + CloudFunctionInfo.create = function create(properties) { + return new CloudFunctionInfo(properties); + }; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); + return writer; + }; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + case 4: { + message.versionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) + return "versionId: integer|Long expected"; + return null; + }; + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo + */ + CloudFunctionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CloudFunctionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.versionId != null) + if ($util.Long) + (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; + else if (typeof object.versionId === "string") + message.versionId = parseInt(object.versionId, 10); + else if (typeof object.versionId === "number") + message.versionId = object.versionId; + else if (typeof object.versionId === "object") + message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1.CloudFunctionInfo} message CloudFunctionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionId = options.longs === String ? "0" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (typeof message.versionId === "number") + object.versionId = options.longs === String ? String(message.versionId) : message.versionId; + else + object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; + return object; + }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudFunctionInfo"; + }; + + return CloudFunctionInfo; + })(); + + v1.CloudRunRevisionInfo = (function() { + + /** + * Properties of a CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICloudRunRevisionInfo + * @property {string|null} [displayName] CloudRunRevisionInfo displayName + * @property {string|null} [uri] CloudRunRevisionInfo uri + * @property {string|null} [location] CloudRunRevisionInfo location + * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri + */ + + /** + * Constructs a new CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CloudRunRevisionInfo. + * @implements ICloudRunRevisionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set + */ + function CloudRunRevisionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.displayName = ""; + + /** + * CloudRunRevisionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.uri = ""; + + /** + * CloudRunRevisionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.location = ""; + + /** + * CloudRunRevisionInfo serviceUri. + * @member {string} serviceUri + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.serviceUri = ""; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo instance + */ + CloudRunRevisionInfo.create = function create(properties) { + return new CloudRunRevisionInfo(properties); + }; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + case 5: { + message.serviceUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + if (!$util.isString(message.serviceUri)) + return "serviceUri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo + */ + CloudRunRevisionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.serviceUri != null) + message.serviceUri = String(object.serviceUri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} message CloudRunRevisionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + object.serviceUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + object.serviceUri = message.serviceUri; + return object; + }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudRunRevisionInfo"; + }; + + return CloudRunRevisionInfo; + })(); + + v1.AppEngineVersionInfo = (function() { + + /** + * Properties of an AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IAppEngineVersionInfo + * @property {string|null} [displayName] AppEngineVersionInfo displayName + * @property {string|null} [uri] AppEngineVersionInfo uri + * @property {string|null} [runtime] AppEngineVersionInfo runtime + * @property {string|null} [environment] AppEngineVersionInfo environment + */ + + /** + * Constructs a new AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an AppEngineVersionInfo. + * @implements IAppEngineVersionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set + */ + function AppEngineVersionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.displayName = ""; + + /** + * AppEngineVersionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.uri = ""; + + /** + * AppEngineVersionInfo runtime. + * @member {string} runtime + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.runtime = ""; + + /** + * AppEngineVersionInfo environment. + * @member {string} environment + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.environment = ""; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo instance + */ + AppEngineVersionInfo.create = function create(properties) { + return new AppEngineVersionInfo(properties); + }; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.runtime = reader.string(); + break; + } + case 4: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.runtime != null && message.hasOwnProperty("runtime")) + if (!$util.isString(message.runtime)) + return "runtime: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo + */ + AppEngineVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.runtime != null) + message.runtime = String(object.runtime); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1.AppEngineVersionInfo} message AppEngineVersionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.runtime = ""; + object.environment = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.runtime != null && message.hasOwnProperty("runtime")) + object.runtime = message.runtime; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AppEngineVersionInfo"; + }; + + return AppEngineVersionInfo; + })(); + + v1.VpcConnectorInfo = (function() { + + /** + * Properties of a VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IVpcConnectorInfo + * @property {string|null} [displayName] VpcConnectorInfo displayName + * @property {string|null} [uri] VpcConnectorInfo uri + * @property {string|null} [location] VpcConnectorInfo location + */ + + /** + * Constructs a new VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a VpcConnectorInfo. + * @implements IVpcConnectorInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set + */ + function VpcConnectorInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcConnectorInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.displayName = ""; + + /** + * VpcConnectorInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.uri = ""; + + /** + * VpcConnectorInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.location = ""; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo instance + */ + VpcConnectorInfo.create = function create(properties) { + return new VpcConnectorInfo(properties); + }; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + return writer; + }; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcConnectorInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcConnectorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo + */ + VpcConnectorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.VpcConnectorInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1.VpcConnectorInfo} message VpcConnectorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcConnectorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @instance + * @returns {Object.} JSON object + */ + VpcConnectorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcConnectorInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpcConnectorInfo"; + }; + + return VpcConnectorInfo; + })(); + + v1.NatInfo = (function() { + + /** + * Properties of a NatInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface INatInfo + * @property {google.cloud.networkmanagement.v1.NatInfo.Type|null} [type] NatInfo type + * @property {string|null} [protocol] NatInfo protocol + * @property {string|null} [networkUri] NatInfo networkUri + * @property {string|null} [oldSourceIp] NatInfo oldSourceIp + * @property {string|null} [newSourceIp] NatInfo newSourceIp + * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp + * @property {string|null} [newDestinationIp] NatInfo newDestinationIp + * @property {number|null} [oldSourcePort] NatInfo oldSourcePort + * @property {number|null} [newSourcePort] NatInfo newSourcePort + * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort + * @property {number|null} [newDestinationPort] NatInfo newDestinationPort + * @property {string|null} [routerUri] NatInfo routerUri + * @property {string|null} [natGatewayName] NatInfo natGatewayName + */ + + /** + * Constructs a new NatInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a NatInfo. + * @implements INatInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set + */ + function NatInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NatInfo type. + * @member {google.cloud.networkmanagement.v1.NatInfo.Type} type + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.type = 0; + + /** + * NatInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.protocol = ""; + + /** + * NatInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.networkUri = ""; + + /** + * NatInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourceIp = ""; + + /** + * NatInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newSourceIp = ""; + + /** + * NatInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationIp = ""; + + /** + * NatInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationIp = ""; + + /** + * NatInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourcePort = 0; + + /** + * NatInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newSourcePort = 0; + + /** + * NatInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationPort = 0; + + /** + * NatInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationPort = 0; + + /** + * NatInfo routerUri. + * @member {string} routerUri + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.routerUri = ""; + + /** + * NatInfo natGatewayName. + * @member {string} natGatewayName + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + */ + NatInfo.prototype.natGatewayName = ""; + + /** + * Creates a new NatInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo instance + */ + NatInfo.create = function create(properties) { + return new NatInfo(properties); + }; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); + if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); + if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); + return writer; + }; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NatInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.protocol = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.oldSourceIp = reader.string(); + break; + } + case 5: { + message.newSourceIp = reader.string(); + break; + } + case 6: { + message.oldDestinationIp = reader.string(); + break; + } + case 7: { + message.newDestinationIp = reader.string(); + break; + } + case 8: { + message.oldSourcePort = reader.int32(); + break; + } + case 9: { + message.newSourcePort = reader.int32(); + break; + } + case 10: { + message.oldDestinationPort = reader.int32(); + break; + } + case 11: { + message.newDestinationPort = reader.int32(); + break; + } + case 12: { + message.routerUri = reader.string(); + break; + } + case 13: { + message.natGatewayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NatInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NatInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + if (!$util.isString(message.routerUri)) + return "routerUri: string expected"; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + if (!$util.isString(message.natGatewayName)) + return "natGatewayName: string expected"; + return null; + }; + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo + */ + NatInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.NatInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.NatInfo(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INTERNAL_TO_EXTERNAL": + case 1: + message.type = 1; + break; + case "EXTERNAL_TO_INTERNAL": + case 2: + message.type = 2; + break; + case "CLOUD_NAT": + case 3: + message.type = 3; + break; + case "PRIVATE_SERVICE_CONNECT": + case 4: + message.type = 4; + break; + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.routerUri != null) + message.routerUri = String(object.routerUri); + if (object.natGatewayName != null) + message.natGatewayName = String(object.natGatewayName); + return message; + }; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1.NatInfo} message NatInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NatInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.protocol = ""; + object.networkUri = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.routerUri = ""; + object.natGatewayName = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] : message.type; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + object.routerUri = message.routerUri; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + object.natGatewayName = message.natGatewayName; + return object; + }; + + /** + * Converts this NatInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @instance + * @returns {Object.} JSON object + */ + NatInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NatInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.NatInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NatInfo"; + }; + + /** + * Type enum. + * @name google.cloud.networkmanagement.v1.NatInfo.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value + * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value + * @property {number} CLOUD_NAT=3 CLOUD_NAT value + * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value + */ + NatInfo.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; + values[valuesById[3] = "CLOUD_NAT"] = 3; + values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; + return values; + })(); + + return NatInfo; + })(); + + v1.ProxyConnectionInfo = (function() { + + /** + * Properties of a ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IProxyConnectionInfo + * @property {string|null} [protocol] ProxyConnectionInfo protocol + * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp + * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp + * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp + * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp + * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort + * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort + * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort + * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort + * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri + * @property {string|null} [networkUri] ProxyConnectionInfo networkUri + */ + + /** + * Constructs a new ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ProxyConnectionInfo. + * @implements IProxyConnectionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set + */ + function ProxyConnectionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProxyConnectionInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.protocol = ""; + + /** + * ProxyConnectionInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourceIp = ""; + + /** + * ProxyConnectionInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourceIp = ""; + + /** + * ProxyConnectionInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationIp = ""; + + /** + * ProxyConnectionInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationIp = ""; + + /** + * ProxyConnectionInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourcePort = 0; + + /** + * ProxyConnectionInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourcePort = 0; + + /** + * ProxyConnectionInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationPort = 0; + + /** + * ProxyConnectionInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationPort = 0; + + /** + * ProxyConnectionInfo subnetUri. + * @member {string} subnetUri + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.subnetUri = ""; + + /** + * ProxyConnectionInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.networkUri = ""; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo instance + */ + ProxyConnectionInfo.create = function create(properties) { + return new ProxyConnectionInfo(properties); + }; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); + if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); + return writer; + }; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protocol = reader.string(); + break; + } + case 2: { + message.oldSourceIp = reader.string(); + break; + } + case 3: { + message.newSourceIp = reader.string(); + break; + } + case 4: { + message.oldDestinationIp = reader.string(); + break; + } + case 5: { + message.newDestinationIp = reader.string(); + break; + } + case 6: { + message.oldSourcePort = reader.int32(); + break; + } + case 7: { + message.newSourcePort = reader.int32(); + break; + } + case 8: { + message.oldDestinationPort = reader.int32(); + break; + } + case 9: { + message.newDestinationPort = reader.int32(); + break; + } + case 10: { + message.subnetUri = reader.string(); + break; + } + case 11: { + message.networkUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProxyConnectionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProxyConnectionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + if (!$util.isString(message.subnetUri)) + return "subnetUri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + return null; + }; + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo + */ + ProxyConnectionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.subnetUri != null) + message.subnetUri = String(object.subnetUri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + return message; + }; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1.ProxyConnectionInfo} message ProxyConnectionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProxyConnectionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protocol = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.subnetUri = ""; + object.networkUri = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + object.subnetUri = message.subnetUri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + return object; + }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @instance + * @returns {Object.} JSON object + */ + ProxyConnectionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProxyConnectionInfo"; + }; + + return ProxyConnectionInfo; + })(); + + v1.LoadBalancerBackendInfo = (function() { + + /** + * Properties of a LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface ILoadBalancerBackendInfo + * @property {string|null} [name] LoadBalancerBackendInfo name + * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri + * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri + * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri + * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri + * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri + * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget + * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri + * @property {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState + */ + + /** + * Constructs a new LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a LoadBalancerBackendInfo. + * @implements ILoadBalancerBackendInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set + */ + function LoadBalancerBackendInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackendInfo name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.name = ""; + + /** + * LoadBalancerBackendInfo instanceUri. + * @member {string} instanceUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceUri = ""; + + /** + * LoadBalancerBackendInfo backendServiceUri. + * @member {string} backendServiceUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendServiceUri = ""; + + /** + * LoadBalancerBackendInfo instanceGroupUri. + * @member {string} instanceGroupUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; + + /** + * LoadBalancerBackendInfo networkEndpointGroupUri. + * @member {string} networkEndpointGroupUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; + + /** + * LoadBalancerBackendInfo backendBucketUri. + * @member {string} backendBucketUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendBucketUri = ""; + + /** + * LoadBalancerBackendInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * LoadBalancerBackendInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; + + /** + * LoadBalancerBackendInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerBackendInfo healthCheckFirewallsConfigState. + * @member {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance + */ + LoadBalancerBackendInfo.create = function create(properties) { + return new LoadBalancerBackendInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); + if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); + if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); + if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); + if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); + if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instanceUri = reader.string(); + break; + } + case 3: { + message.backendServiceUri = reader.string(); + break; + } + case 4: { + message.instanceGroupUri = reader.string(); + break; + } + case 5: { + message.networkEndpointGroupUri = reader.string(); + break; + } + case 8: { + message.backendBucketUri = reader.string(); + break; + } + case 9: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 10: { + message.pscGoogleApiTarget = reader.string(); + break; + } + case 6: { + message.healthCheckUri = reader.string(); + break; + } + case 7: { + message.healthCheckFirewallsConfigState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackendInfo.verify = function verify(message) { + if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) + if (!$util.isString(message.instanceUri)) + return "instanceUri: string expected"; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + if (!$util.isString(message.backendServiceUri)) + return "backendServiceUri: string expected"; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + if (!$util.isString(message.instanceGroupUri)) + return "instanceGroupUri: string expected"; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + if (!$util.isString(message.networkEndpointGroupUri)) + return "networkEndpointGroupUri: string expected"; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + if (!$util.isString(message.backendBucketUri)) + return "backendBucketUri: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + switch (message.healthCheckFirewallsConfigState) { + default: + return "healthCheckFirewallsConfigState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + */ + LoadBalancerBackendInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceUri != null) + message.instanceUri = String(object.instanceUri); + if (object.backendServiceUri != null) + message.backendServiceUri = String(object.backendServiceUri); + if (object.instanceGroupUri != null) + message.instanceGroupUri = String(object.instanceGroupUri); + if (object.networkEndpointGroupUri != null) + message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); + if (object.backendBucketUri != null) + message.backendBucketUri = String(object.backendBucketUri); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + switch (object.healthCheckFirewallsConfigState) { + default: + if (typeof object.healthCheckFirewallsConfigState === "number") { + message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; + break; + } + break; + case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallsConfigState = 0; + break; + case "FIREWALLS_CONFIGURED": + case 1: + message.healthCheckFirewallsConfigState = 1; + break; + case "FIREWALLS_PARTIALLY_CONFIGURED": + case 2: + message.healthCheckFirewallsConfigState = 2; + break; + case "FIREWALLS_NOT_CONFIGURED": + case 3: + message.healthCheckFirewallsConfigState = 3; + break; + case "FIREWALLS_UNSUPPORTED": + case 4: + message.healthCheckFirewallsConfigState = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackendInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceUri = ""; + object.backendServiceUri = ""; + object.instanceGroupUri = ""; + object.networkEndpointGroupUri = ""; + object.healthCheckUri = ""; + object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; + object.backendBucketUri = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) + object.instanceUri = message.instanceUri; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + object.backendServiceUri = message.backendServiceUri; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + object.instanceGroupUri = message.instanceGroupUri; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + object.networkEndpointGroupUri = message.networkEndpointGroupUri; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + object.backendBucketUri = message.backendBucketUri; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackendInfo"; + }; + + /** + * HealthCheckFirewallsConfigState enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value + * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value + * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value + * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value + * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value + */ + LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; + values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; + values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; + values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; + return values; + })(); + + return LoadBalancerBackendInfo; + })(); + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value + * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value + * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value + * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value + * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value + * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value + * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value + * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value + * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value + * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value + */ + v1.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; + values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; + values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; + values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; + values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; + values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; + values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; + values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; + values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; + values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; + return values; + })(); + + v1.StorageBucketInfo = (function() { + + /** + * Properties of a StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IStorageBucketInfo + * @property {string|null} [bucket] StorageBucketInfo bucket + */ + + /** + * Constructs a new StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a StorageBucketInfo. + * @implements IStorageBucketInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set + */ + function StorageBucketInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageBucketInfo bucket. + * @member {string} bucket + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @instance + */ + StorageBucketInfo.prototype.bucket = ""; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo instance + */ + StorageBucketInfo.create = function create(properties) { + return new StorageBucketInfo(properties); + }; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageBucketInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageBucketInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo + */ + StorageBucketInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.StorageBucketInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1.StorageBucketInfo} message StorageBucketInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageBucketInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this StorageBucketInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @instance + * @returns {Object.} JSON object + */ + StorageBucketInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageBucketInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.StorageBucketInfo"; + }; + + return StorageBucketInfo; + })(); + + v1.ServerlessNegInfo = (function() { + + /** + * Properties of a ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1 + * @interface IServerlessNegInfo + * @property {string|null} [negUri] ServerlessNegInfo negUri + */ + + /** + * Constructs a new ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ServerlessNegInfo. + * @implements IServerlessNegInfo + * @constructor + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set + */ + function ServerlessNegInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerlessNegInfo negUri. + * @member {string} negUri + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @instance + */ + ServerlessNegInfo.prototype.negUri = ""; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo instance + */ + ServerlessNegInfo.create = function create(properties) { + return new ServerlessNegInfo(properties); + }; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); + return writer; + }; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.negUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerlessNegInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerlessNegInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.negUri != null && message.hasOwnProperty("negUri")) + if (!$util.isString(message.negUri)) + return "negUri: string expected"; + return null; + }; + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo + */ + ServerlessNegInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ServerlessNegInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); + if (object.negUri != null) + message.negUri = String(object.negUri); + return message; + }; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1.ServerlessNegInfo} message ServerlessNegInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerlessNegInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.negUri = ""; + if (message.negUri != null && message.hasOwnProperty("negUri")) + object.negUri = message.negUri; + return object; + }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @instance + * @returns {Object.} JSON object + */ + ServerlessNegInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerlessNegInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ServerlessNegInfo"; + }; + + return ServerlessNegInfo; + })(); + + v1.ReachabilityService = (function() { + + /** + * Constructs a new ReachabilityService service. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ReachabilityService + * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; + + /** + * Creates new ReachabilityService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. + */ + ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef ListConnectivityTestsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse + */ + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { + return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, request, callback); + }, "name", { value: "ListConnectivityTests" }); + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef GetConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} [response] ConnectivityTest + */ + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { + return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1.ConnectivityTest, request, callback); + }, "name", { value: "GetConnectivityTest" }); + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef CreateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { + return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConnectivityTest" }); + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef UpdateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { + return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConnectivityTest" }); + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef RerunConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { + return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RerunConnectivityTest" }); + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @typedef DeleteConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { + return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConnectivityTest" }); + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReachabilityService; + })(); + + v1.ListConnectivityTestsRequest = (function() { + + /** + * Properties of a ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IListConnectivityTestsRequest + * @property {string|null} [parent] ListConnectivityTestsRequest parent + * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize + * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken + * @property {string|null} [filter] ListConnectivityTestsRequest filter + * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy + */ + + /** + * Constructs a new ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ListConnectivityTestsRequest. + * @implements IListConnectivityTestsRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set + */ + function ListConnectivityTestsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectivityTestsRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.parent = ""; + + /** + * ListConnectivityTestsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageSize = 0; + + /** + * ListConnectivityTestsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageToken = ""; + + /** + * ListConnectivityTestsRequest filter. + * @member {string} filter + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.filter = ""; + + /** + * ListConnectivityTestsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance + */ + ListConnectivityTestsRequest.create = function create(properties) { + return new ListConnectivityTestsRequest(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + */ + ListConnectivityTestsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsRequest"; + }; + + return ListConnectivityTestsRequest; + })(); + + v1.ListConnectivityTestsResponse = (function() { + + /** + * Properties of a ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1 + * @interface IListConnectivityTestsResponse + * @property {Array.|null} [resources] ListConnectivityTestsResponse resources + * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken + * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable + */ + + /** + * Constructs a new ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a ListConnectivityTestsResponse. + * @implements IListConnectivityTestsResponse + * @constructor + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set + */ + function ListConnectivityTestsResponse(properties) { + this.resources = []; + 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]]; + } + + /** + * ListConnectivityTestsResponse resources. + * @member {Array.} resources + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; + + /** + * ListConnectivityTestsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.nextPageToken = ""; + + /** + * ListConnectivityTestsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance + */ + ListConnectivityTestsResponse.create = function create(properties) { + return new ListConnectivityTestsResponse(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.networkmanagement.v1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resources[i]); + if (error) + return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + */ + ListConnectivityTestsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) + return object; + var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"; + }; + + return ListConnectivityTestsResponse; + })(); + + v1.GetConnectivityTestRequest = (function() { + + /** + * Properties of a GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IGetConnectivityTestRequest + * @property {string|null} [name] GetConnectivityTestRequest name + */ + + /** + * Constructs a new GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a GetConnectivityTestRequest. + * @implements IGetConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set + */ + function GetConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @instance + */ + GetConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest instance + */ + GetConnectivityTestRequest.create = function create(properties) { + return new GetConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encode = function encode(message, writer) { + 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); + 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectivityTestRequest.verify = function verify(message) { + if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest + */ + GetConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} message GetConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GetConnectivityTestRequest"; + }; + + return GetConnectivityTestRequest; + })(); + + v1.CreateConnectivityTestRequest = (function() { + + /** + * Properties of a CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface ICreateConnectivityTestRequest + * @property {string|null} [parent] CreateConnectivityTestRequest parent + * @property {string|null} [testId] CreateConnectivityTestRequest testId + * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource + */ + + /** + * Constructs a new CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a CreateConnectivityTestRequest. + * @implements ICreateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set + */ + function CreateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectivityTestRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.parent = ""; + + /** + * CreateConnectivityTestRequest testId. + * @member {string} testId + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.testId = ""; + + /** + * CreateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance + */ + CreateConnectivityTestRequest.create = function create(properties) { + return new CreateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.testId = reader.string(); + break; + } + case 3: { + message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) + if (!$util.isString(message.testId)) + return "testId: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + */ + CreateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.testId != null) + message.testId = String(object.testId); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.testId = ""; + object.resource = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.testId != null && message.hasOwnProperty("testId")) + object.testId = message.testId; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CreateConnectivityTestRequest"; + }; + + return CreateConnectivityTestRequest; + })(); + + v1.UpdateConnectivityTestRequest = (function() { + + /** + * Properties of an UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IUpdateConnectivityTestRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask + * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource + */ + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an UpdateConnectivityTestRequest. + * @implements IUpdateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set + */ + function UpdateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectivityTestRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.updateMask = null; + + /** + * UpdateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance + */ + UpdateConnectivityTestRequest.create = function create(properties) { + return new UpdateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); + 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.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + */ + UpdateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.resource = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest"; + }; + + return UpdateConnectivityTestRequest; + })(); + + v1.DeleteConnectivityTestRequest = (function() { + + /** + * Properties of a DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IDeleteConnectivityTestRequest + * @property {string|null} [name] DeleteConnectivityTestRequest name + */ + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a DeleteConnectivityTestRequest. + * @implements IDeleteConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set + */ + function DeleteConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @instance + */ + DeleteConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance + */ + DeleteConnectivityTestRequest.create = function create(properties) { + return new DeleteConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encode = function encode(message, writer) { + 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); + 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectivityTestRequest.verify = function verify(message) { + if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + */ + DeleteConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest"; + }; + + return DeleteConnectivityTestRequest; + })(); + + v1.RerunConnectivityTestRequest = (function() { + + /** + * Properties of a RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @interface IRerunConnectivityTestRequest + * @property {string|null} [name] RerunConnectivityTestRequest name + */ + + /** + * Constructs a new RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents a RerunConnectivityTestRequest. + * @implements IRerunConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set + */ + function RerunConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RerunConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @instance + */ + RerunConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance + */ + RerunConnectivityTestRequest.create = function create(properties) { + return new RerunConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encode = function encode(message, writer) { + 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); + 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RerunConnectivityTestRequest.verify = function verify(message) { + if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + */ + RerunConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RerunConnectivityTestRequest"; + }; + + return RerunConnectivityTestRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.networkmanagement.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} [statusDetail] OperationMetadata statusDetail + * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.networkmanagement.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusDetail. + * @member {string} statusDetail + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusDetail = ""; + + /** + * OperationMetadata cancelRequested. + * @member {boolean} cancelRequested + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.cancelRequested = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); + if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusDetail = reader.string(); + break; + } + case 6: { + message.cancelRequested = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + 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.networkmanagement.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + if (typeof message.cancelRequested !== "boolean") + return "cancelRequested: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: 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.networkmanagement.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.networkmanagement.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.cancelRequested != null) + message.cancelRequested = Boolean(object.cancelRequested); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusDetail = ""; + object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + object.cancelRequested = message.cancelRequested; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + return v1; + })(); + + return networkmanagement; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + 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; + })(); + + 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.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; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + 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; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + 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"]); + } + 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.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.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.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.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-networkmanagement/v1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json new file mode 100644 index 00000000000..e9c42233e71 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json @@ -0,0 +1,4280 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "networkmanagement": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.NetworkManagement.V1", + "go_package": "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb", + "java_multiple_files": true, + "java_outer_classname": "ReachabilityServiceProto", + "java_package": "com.google.cloud.networkmanagement.v1", + "php_namespace": "Google\\Cloud\\NetworkManagement\\V1", + "ruby_package": "Google::Cloud::NetworkManagement::V1" + }, + "nested": { + "ConnectivityTest": { + "options": { + "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", + "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "source": { + "type": "Endpoint", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "destination": { + "type": "Endpoint", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protocol": { + "type": "string", + "id": 5 + }, + "relatedProjects": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reachabilityDetails": { + "type": "ReachabilityDetails", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "probingDetails": { + "type": "ProbingDetails", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bypassFirewallChecks": { + "type": "bool", + "id": 17 + } + } + }, + "Endpoint": { + "oneofs": { + "_forwardingRuleTarget": { + "oneof": [ + "forwardingRuleTarget" + ] + }, + "_loadBalancerId": { + "oneof": [ + "loadBalancerId" + ] + }, + "_loadBalancerType": { + "oneof": [ + "loadBalancerType" + ] + } + }, + "fields": { + "ipAddress": { + "type": "string", + "id": 1 + }, + "port": { + "type": "int32", + "id": 2 + }, + "instance": { + "type": "string", + "id": 3 + }, + "forwardingRule": { + "type": "string", + "id": 13 + }, + "forwardingRuleTarget": { + "type": "ForwardingRuleTarget", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "gkeMasterCluster": { + "type": "string", + "id": 7 + }, + "fqdn": { + "type": "string", + "id": 19 + }, + "cloudSqlInstance": { + "type": "string", + "id": 8 + }, + "redisInstance": { + "type": "string", + "id": 17 + }, + "redisCluster": { + "type": "string", + "id": 18 + }, + "cloudFunction": { + "type": "CloudFunctionEndpoint", + "id": 10 + }, + "appEngineVersion": { + "type": "AppEngineVersionEndpoint", + "id": 11 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionEndpoint", + "id": 12 + }, + "network": { + "type": "string", + "id": 4 + }, + "networkType": { + "type": "NetworkType", + "id": 5 + }, + "projectId": { + "type": "string", + "id": 6 + } + }, + "nested": { + "NetworkType": { + "values": { + "NETWORK_TYPE_UNSPECIFIED": 0, + "GCP_NETWORK": 1, + "NON_GCP_NETWORK": 2 + } + }, + "ForwardingRuleTarget": { + "values": { + "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "LOAD_BALANCER": 2, + "VPN_GATEWAY": 3, + "PSC": 4 + } + }, + "CloudFunctionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "AppEngineVersionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "CloudRunRevisionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ReachabilityDetails": { + "fields": { + "result": { + "type": "Result", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "traces": { + "rule": "repeated", + "type": "Trace", + "id": 5 + } + }, + "nested": { + "Result": { + "values": { + "RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "AMBIGUOUS": 4, + "UNDETERMINED": 5 + } + } + } + }, + "LatencyPercentile": { + "fields": { + "percent": { + "type": "int32", + "id": 1 + }, + "latencyMicros": { + "type": "int64", + "id": 2 + } + } + }, + "LatencyDistribution": { + "fields": { + "latencyPercentiles": { + "rule": "repeated", + "type": "LatencyPercentile", + "id": 1 + } + } + }, + "ProbingDetails": { + "fields": { + "result": { + "type": "ProbingResult", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "abortCause": { + "type": "ProbingAbortCause", + "id": 4 + }, + "sentProbeCount": { + "type": "int32", + "id": 5 + }, + "successfulProbeCount": { + "type": "int32", + "id": 6 + }, + "endpointInfo": { + "type": "EndpointInfo", + "id": 7 + }, + "probingLatency": { + "type": "LatencyDistribution", + "id": 8 + }, + "destinationEgressLocation": { + "type": "EdgeLocation", + "id": 9 + } + }, + "nested": { + "ProbingResult": { + "values": { + "PROBING_RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "REACHABILITY_INCONSISTENT": 3, + "UNDETERMINED": 4 + } + }, + "ProbingAbortCause": { + "values": { + "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, + "PERMISSION_DENIED": 1, + "NO_SOURCE_LOCATION": 2 + } + }, + "EdgeLocation": { + "fields": { + "metropolitanArea": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Trace": { + "fields": { + "endpointInfo": { + "type": "EndpointInfo", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + }, + "forwardTraceId": { + "type": "int32", + "id": 4 + } + } + }, + "Step": { + "oneofs": { + "stepInfo": { + "oneof": [ + "instance", + "firewall", + "route", + "endpoint", + "googleService", + "forwardingRule", + "vpnGateway", + "vpnTunnel", + "vpcConnector", + "deliver", + "forward", + "abort", + "drop", + "loadBalancer", + "network", + "gkeMaster", + "cloudSqlInstance", + "redisInstance", + "redisCluster", + "cloudFunction", + "appEngineVersion", + "cloudRunRevision", + "nat", + "proxyConnection", + "loadBalancerBackendInfo", + "storageBucket", + "serverlessNeg" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "causesDrop": { + "type": "bool", + "id": 3 + }, + "projectId": { + "type": "string", + "id": 4 + }, + "instance": { + "type": "InstanceInfo", + "id": 5 + }, + "firewall": { + "type": "FirewallInfo", + "id": 6 + }, + "route": { + "type": "RouteInfo", + "id": 7 + }, + "endpoint": { + "type": "EndpointInfo", + "id": 8 + }, + "googleService": { + "type": "GoogleServiceInfo", + "id": 24 + }, + "forwardingRule": { + "type": "ForwardingRuleInfo", + "id": 9 + }, + "vpnGateway": { + "type": "VpnGatewayInfo", + "id": 10 + }, + "vpnTunnel": { + "type": "VpnTunnelInfo", + "id": 11 + }, + "vpcConnector": { + "type": "VpcConnectorInfo", + "id": 21 + }, + "deliver": { + "type": "DeliverInfo", + "id": 12 + }, + "forward": { + "type": "ForwardInfo", + "id": 13 + }, + "abort": { + "type": "AbortInfo", + "id": 14 + }, + "drop": { + "type": "DropInfo", + "id": 15 + }, + "loadBalancer": { + "type": "LoadBalancerInfo", + "id": 16, + "options": { + "deprecated": true + } + }, + "network": { + "type": "NetworkInfo", + "id": 17 + }, + "gkeMaster": { + "type": "GKEMasterInfo", + "id": 18 + }, + "cloudSqlInstance": { + "type": "CloudSQLInstanceInfo", + "id": 19 + }, + "redisInstance": { + "type": "RedisInstanceInfo", + "id": 30 + }, + "redisCluster": { + "type": "RedisClusterInfo", + "id": 31 + }, + "cloudFunction": { + "type": "CloudFunctionInfo", + "id": 20 + }, + "appEngineVersion": { + "type": "AppEngineVersionInfo", + "id": 22 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionInfo", + "id": 23 + }, + "nat": { + "type": "NatInfo", + "id": 25 + }, + "proxyConnection": { + "type": "ProxyConnectionInfo", + "id": 26 + }, + "loadBalancerBackendInfo": { + "type": "LoadBalancerBackendInfo", + "id": 27 + }, + "storageBucket": { + "type": "StorageBucketInfo", + "id": 28 + }, + "serverlessNeg": { + "type": "ServerlessNegInfo", + "id": 29 + } + }, + "nested": { + "State": { + "valuesOptions": { + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { + "deprecated": true + }, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { + "deprecated": true + } + }, + "values": { + "STATE_UNSPECIFIED": 0, + "START_FROM_INSTANCE": 1, + "START_FROM_INTERNET": 2, + "START_FROM_GOOGLE_SERVICE": 27, + "START_FROM_PRIVATE_NETWORK": 3, + "START_FROM_GKE_MASTER": 21, + "START_FROM_CLOUD_SQL_INSTANCE": 22, + "START_FROM_REDIS_INSTANCE": 32, + "START_FROM_REDIS_CLUSTER": 33, + "START_FROM_CLOUD_FUNCTION": 23, + "START_FROM_APP_ENGINE_VERSION": 25, + "START_FROM_CLOUD_RUN_REVISION": 26, + "START_FROM_STORAGE_BUCKET": 29, + "START_FROM_PSC_PUBLISHED_SERVICE": 30, + "START_FROM_SERVERLESS_NEG": 31, + "APPLY_INGRESS_FIREWALL_RULE": 4, + "APPLY_EGRESS_FIREWALL_RULE": 5, + "APPLY_ROUTE": 6, + "APPLY_FORWARDING_RULE": 7, + "ANALYZE_LOAD_BALANCER_BACKEND": 28, + "SPOOFING_APPROVED": 8, + "ARRIVE_AT_INSTANCE": 9, + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, + "ARRIVE_AT_VPN_GATEWAY": 12, + "ARRIVE_AT_VPN_TUNNEL": 13, + "ARRIVE_AT_VPC_CONNECTOR": 24, + "NAT": 14, + "PROXY_CONNECTION": 15, + "DELIVER": 16, + "DROP": 17, + "FORWARD": 18, + "ABORT": 19, + "VIEWER_PERMISSION_MISSING": 20 + } + } + } + }, + "InstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "interface": { + "type": "string", + "id": 3 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "serviceAccount": { + "type": "string", + "id": 8, + "options": { + "deprecated": true + } + }, + "pscNetworkAttachmentUri": { + "type": "string", + "id": 9 + } + } + }, + "NetworkInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedSubnetUri": { + "type": "string", + "id": 5 + }, + "matchedIpRange": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "FirewallInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "direction": { + "type": "string", + "id": 3 + }, + "action": { + "type": "string", + "id": 4 + }, + "priority": { + "type": "int32", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 6 + }, + "targetTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "targetServiceAccounts": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "policy": { + "type": "string", + "id": 9 + }, + "policyUri": { + "type": "string", + "id": 11 + }, + "firewallRuleType": { + "type": "FirewallRuleType", + "id": 10 + } + }, + "nested": { + "FirewallRuleType": { + "values": { + "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, + "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, + "VPC_FIREWALL_RULE": 2, + "IMPLIED_VPC_FIREWALL_RULE": 3, + "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, + "NETWORK_FIREWALL_POLICY_RULE": 5, + "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, + "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, + "TRACKING_STATE": 101 + } + } + } + }, + "RouteInfo": { + "oneofs": { + "_nccHubUri": { + "oneof": [ + "nccHubUri" + ] + }, + "_nccSpokeUri": { + "oneof": [ + "nccSpokeUri" + ] + }, + "_advertisedRouteSourceRouterUri": { + "oneof": [ + "advertisedRouteSourceRouterUri" + ] + }, + "_advertisedRouteNextHopUri": { + "oneof": [ + "advertisedRouteNextHopUri" + ] + } + }, + "fields": { + "routeType": { + "type": "RouteType", + "id": 8 + }, + "nextHopType": { + "type": "NextHopType", + "id": 9 + }, + "routeScope": { + "type": "RouteScope", + "id": 14 + }, + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "region": { + "type": "string", + "id": 19 + }, + "destIpRange": { + "type": "string", + "id": 3 + }, + "nextHop": { + "type": "string", + "id": 4 + }, + "networkUri": { + "type": "string", + "id": 5 + }, + "priority": { + "type": "int32", + "id": 6 + }, + "instanceTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "srcIpRange": { + "type": "string", + "id": 10 + }, + "destPortRanges": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "srcPortRanges": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "protocols": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "nccHubUri": { + "type": "string", + "id": 15, + "options": { + "proto3_optional": true + } + }, + "nccSpokeUri": { + "type": "string", + "id": 16, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteSourceRouterUri": { + "type": "string", + "id": 17, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteNextHopUri": { + "type": "string", + "id": 18, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "RouteType": { + "values": { + "ROUTE_TYPE_UNSPECIFIED": 0, + "SUBNET": 1, + "STATIC": 2, + "DYNAMIC": 3, + "PEERING_SUBNET": 4, + "PEERING_STATIC": 5, + "PEERING_DYNAMIC": 6, + "POLICY_BASED": 7, + "ADVERTISED": 101 + } + }, + "NextHopType": { + "values": { + "NEXT_HOP_TYPE_UNSPECIFIED": 0, + "NEXT_HOP_IP": 1, + "NEXT_HOP_INSTANCE": 2, + "NEXT_HOP_NETWORK": 3, + "NEXT_HOP_PEERING": 4, + "NEXT_HOP_INTERCONNECT": 5, + "NEXT_HOP_VPN_TUNNEL": 6, + "NEXT_HOP_VPN_GATEWAY": 7, + "NEXT_HOP_INTERNET_GATEWAY": 8, + "NEXT_HOP_BLACKHOLE": 9, + "NEXT_HOP_ILB": 10, + "NEXT_HOP_ROUTER_APPLIANCE": 11, + "NEXT_HOP_NCC_HUB": 12 + } + }, + "RouteScope": { + "values": { + "ROUTE_SCOPE_UNSPECIFIED": 0, + "NETWORK": 1, + "NCC_HUB": 2 + } + } + } + }, + "GoogleServiceInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "googleServiceType": { + "type": "GoogleServiceType", + "id": 2 + } + }, + "nested": { + "GoogleServiceType": { + "values": { + "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, + "IAP": 1, + "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, + "CLOUD_DNS": 3, + "GOOGLE_API": 4, + "GOOGLE_API_PSC": 5, + "GOOGLE_API_VPC_SC": 6 + } + } + } + }, + "ForwardingRuleInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedProtocol": { + "type": "string", + "id": 3 + }, + "matchedPortRange": { + "type": "string", + "id": 6 + }, + "vip": { + "type": "string", + "id": 4 + }, + "target": { + "type": "string", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "loadBalancerName": { + "type": "string", + "id": 9 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 10 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerInfo": { + "fields": { + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 1 + }, + "healthCheckUri": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "backends": { + "rule": "repeated", + "type": "LoadBalancerBackend", + "id": 3 + }, + "backendType": { + "type": "BackendType", + "id": 4 + }, + "backendUri": { + "type": "string", + "id": 5 + } + }, + "nested": { + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "INTERNAL_TCP_UDP": 1, + "NETWORK_TCP_UDP": 2, + "HTTP_PROXY": 3, + "TCP_PROXY": 4, + "SSL_PROXY": 5 + } + }, + "BackendType": { + "values": { + "BACKEND_TYPE_UNSPECIFIED": 0, + "BACKEND_SERVICE": 1, + "TARGET_POOL": 2, + "TARGET_INSTANCE": 3 + } + } + } + }, + "LoadBalancerBackend": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "healthCheckFirewallState": { + "type": "HealthCheckFirewallState", + "id": 3 + }, + "healthCheckAllowingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "healthCheckBlockingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "HealthCheckFirewallState": { + "values": { + "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, + "CONFIGURED": 1, + "MISCONFIGURED": 2 + } + } + } + }, + "VpnGatewayInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "ipAddress": { + "type": "string", + "id": 4 + }, + "vpnTunnelUri": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "VpnTunnelInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "sourceGateway": { + "type": "string", + "id": 3 + }, + "remoteGateway": { + "type": "string", + "id": 4 + }, + "remoteGatewayIp": { + "type": "string", + "id": 5 + }, + "sourceGatewayIp": { + "type": "string", + "id": 6 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "routingType": { + "type": "RoutingType", + "id": 9 + } + }, + "nested": { + "RoutingType": { + "values": { + "ROUTING_TYPE_UNSPECIFIED": 0, + "ROUTE_BASED": 1, + "POLICY_BASED": 2, + "DYNAMIC": 3 + } + } + } + }, + "EndpointInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "destinationIp": { + "type": "string", + "id": 2 + }, + "protocol": { + "type": "string", + "id": 3 + }, + "sourcePort": { + "type": "int32", + "id": 4 + }, + "destinationPort": { + "type": "int32", + "id": 5 + }, + "sourceNetworkUri": { + "type": "string", + "id": 6 + }, + "destinationNetworkUri": { + "type": "string", + "id": 7 + }, + "sourceAgentUri": { + "type": "string", + "id": 8 + } + } + }, + "DeliverInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "storageBucket": { + "type": "string", + "id": 4 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Target": { + "values": { + "TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "INTERNET": 2, + "GOOGLE_API": 3, + "GKE_MASTER": 4, + "CLOUD_SQL_INSTANCE": 5, + "PSC_PUBLISHED_SERVICE": 6, + "PSC_GOOGLE_API": 7, + "PSC_VPC_SC": 8, + "SERVERLESS_NEG": 9, + "STORAGE_BUCKET": 10, + "PRIVATE_NETWORK": 11, + "CLOUD_FUNCTION": 12, + "APP_ENGINE_VERSION": 13, + "CLOUD_RUN_REVISION": 14, + "GOOGLE_MANAGED_SERVICE": 15, + "REDIS_INSTANCE": 16, + "REDIS_CLUSTER": 17 + } + } + } + }, + "ForwardInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + } + }, + "nested": { + "Target": { + "valuesOptions": { + "GKE_MASTER": { + "deprecated": true + }, + "CLOUD_SQL_INSTANCE": { + "deprecated": true + } + }, + "values": { + "TARGET_UNSPECIFIED": 0, + "PEERING_VPC": 1, + "VPN_GATEWAY": 2, + "INTERCONNECT": 3, + "GKE_MASTER": 4, + "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, + "CLOUD_SQL_INSTANCE": 6, + "ANOTHER_PROJECT": 7, + "NCC_HUB": 8, + "ROUTER_APPLIANCE": 9 + } + } + } + }, + "AbortInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "projectsMissingPermission": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Cause": { + "valuesOptions": { + "UNKNOWN_NETWORK": { + "deprecated": true + }, + "UNKNOWN_PROJECT": { + "deprecated": true + }, + "NO_EXTERNAL_IP": { + "deprecated": true + }, + "UNINTENDED_DESTINATION": { + "deprecated": true + }, + "SOURCE_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_SOURCE_NETWORK": { + "deprecated": true + }, + "DESTINATION_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_DESTINATION_NETWORK": { + "deprecated": true + } + }, + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_NETWORK": 1, + "UNKNOWN_PROJECT": 3, + "NO_EXTERNAL_IP": 7, + "UNINTENDED_DESTINATION": 8, + "SOURCE_ENDPOINT_NOT_FOUND": 11, + "MISMATCHED_SOURCE_NETWORK": 12, + "DESTINATION_ENDPOINT_NOT_FOUND": 13, + "MISMATCHED_DESTINATION_NETWORK": 14, + "UNKNOWN_IP": 2, + "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, + "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, + "PERMISSION_DENIED": 4, + "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, + "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, + "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, + "NO_SOURCE_LOCATION": 5, + "INVALID_ARGUMENT": 6, + "TRACE_TOO_LONG": 9, + "INTERNAL_ERROR": 10, + "UNSUPPORTED": 15, + "MISMATCHED_IP_VERSION": 16, + "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, + "RESOURCE_CONFIG_NOT_FOUND": 18, + "VM_INSTANCE_CONFIG_NOT_FOUND": 24, + "NETWORK_CONFIG_NOT_FOUND": 25, + "FIREWALL_CONFIG_NOT_FOUND": 26, + "ROUTE_CONFIG_NOT_FOUND": 27, + "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, + "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, + "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, + "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, + "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, + "NON_ROUTABLE_IP_ADDRESS": 22, + "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, + "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 + } + } + } + }, + "DropInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "sourceIp": { + "type": "string", + "id": 3 + }, + "destinationIp": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Cause": { + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_EXTERNAL_ADDRESS": 1, + "FOREIGN_IP_DISALLOWED": 2, + "FIREWALL_RULE": 3, + "NO_ROUTE": 4, + "ROUTE_BLACKHOLE": 5, + "ROUTE_WRONG_NETWORK": 6, + "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, + "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, + "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, + "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, + "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, + "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, + "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, + "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, + "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, + "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, + "PRIVATE_TRAFFIC_TO_INTERNET": 7, + "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, + "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, + "NO_EXTERNAL_ADDRESS": 9, + "UNKNOWN_INTERNAL_ADDRESS": 10, + "FORWARDING_RULE_MISMATCH": 11, + "FORWARDING_RULE_NO_INSTANCES": 12, + "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, + "INSTANCE_NOT_RUNNING": 14, + "GKE_CLUSTER_NOT_RUNNING": 27, + "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, + "REDIS_INSTANCE_NOT_RUNNING": 68, + "REDIS_CLUSTER_NOT_RUNNING": 69, + "TRAFFIC_TYPE_BLOCKED": 15, + "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, + "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, + "DROPPED_INSIDE_GKE_SERVICE": 18, + "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, + "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, + "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, + "GKE_PSC_ENDPOINT_MISSING": 36, + "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, + "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, + "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, + "GKE_CONTROL_PLANE_NO_ROUTE": 32, + "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, + "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, + "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, + "CLOUD_SQL_CONNECTOR_REQUIRED": 63, + "CLOUD_FUNCTION_NOT_ACTIVE": 22, + "VPC_CONNECTOR_NOT_SET": 23, + "VPC_CONNECTOR_NOT_RUNNING": 24, + "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, + "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, + "FORWARDING_RULE_REGION_MISMATCH": 25, + "PSC_CONNECTION_NOT_ACCEPTED": 26, + "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, + "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, + "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, + "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, + "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, + "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, + "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, + "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, + "CLOUD_RUN_REVISION_NOT_READY": 29, + "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, + "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, + "CLOUD_NAT_NO_ADDRESSES": 40, + "ROUTING_LOOP": 59, + "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, + "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, + "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, + "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, + "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, + "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, + "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, + "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, + "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, + "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, + "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, + "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, + "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, + "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, + "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, + "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, + "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 + } + } + } + }, + "GKEMasterInfo": { + "fields": { + "clusterUri": { + "type": "string", + "id": 2 + }, + "clusterNetworkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "dnsEndpoint": { + "type": "string", + "id": 7 + } + } + }, + "CloudSQLInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "region": { + "type": "string", + "id": 7 + } + } + }, + "RedisInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "primaryEndpointIp": { + "type": "string", + "id": 4 + }, + "readEndpointIp": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "RedisClusterInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "discoveryEndpointIpAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "secondaryEndpointIpAddress": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "location": { + "type": "string", + "id": 6 + } + } + }, + "CloudFunctionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + }, + "versionId": { + "type": "int64", + "id": 4 + } + } + }, + "CloudRunRevisionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 4 + }, + "serviceUri": { + "type": "string", + "id": 5 + } + } + }, + "AppEngineVersionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "runtime": { + "type": "string", + "id": 3 + }, + "environment": { + "type": "string", + "id": 4 + } + } + }, + "VpcConnectorInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + } + } + }, + "NatInfo": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "protocol": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "oldSourceIp": { + "type": "string", + "id": 4 + }, + "newSourceIp": { + "type": "string", + "id": 5 + }, + "oldDestinationIp": { + "type": "string", + "id": 6 + }, + "newDestinationIp": { + "type": "string", + "id": 7 + }, + "oldSourcePort": { + "type": "int32", + "id": 8 + }, + "newSourcePort": { + "type": "int32", + "id": 9 + }, + "oldDestinationPort": { + "type": "int32", + "id": 10 + }, + "newDestinationPort": { + "type": "int32", + "id": 11 + }, + "routerUri": { + "type": "string", + "id": 12 + }, + "natGatewayName": { + "type": "string", + "id": 13 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INTERNAL_TO_EXTERNAL": 1, + "EXTERNAL_TO_INTERNAL": 2, + "CLOUD_NAT": 3, + "PRIVATE_SERVICE_CONNECT": 4 + } + } + } + }, + "ProxyConnectionInfo": { + "fields": { + "protocol": { + "type": "string", + "id": 1 + }, + "oldSourceIp": { + "type": "string", + "id": 2 + }, + "newSourceIp": { + "type": "string", + "id": 3 + }, + "oldDestinationIp": { + "type": "string", + "id": 4 + }, + "newDestinationIp": { + "type": "string", + "id": 5 + }, + "oldSourcePort": { + "type": "int32", + "id": 6 + }, + "newSourcePort": { + "type": "int32", + "id": 7 + }, + "oldDestinationPort": { + "type": "int32", + "id": 8 + }, + "newDestinationPort": { + "type": "int32", + "id": 9 + }, + "subnetUri": { + "type": "string", + "id": 10 + }, + "networkUri": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerBackendInfo": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "instanceUri": { + "type": "string", + "id": 2 + }, + "backendServiceUri": { + "type": "string", + "id": 3 + }, + "instanceGroupUri": { + "type": "string", + "id": 4 + }, + "networkEndpointGroupUri": { + "type": "string", + "id": 5 + }, + "backendBucketUri": { + "type": "string", + "id": 8 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 9 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 10 + }, + "healthCheckUri": { + "type": "string", + "id": 6 + }, + "healthCheckFirewallsConfigState": { + "type": "HealthCheckFirewallsConfigState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "HealthCheckFirewallsConfigState": { + "values": { + "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, + "FIREWALLS_CONFIGURED": 1, + "FIREWALLS_PARTIALLY_CONFIGURED": 2, + "FIREWALLS_NOT_CONFIGURED": 3, + "FIREWALLS_UNSUPPORTED": 4 + } + } + } + }, + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "HTTPS_ADVANCED_LOAD_BALANCER": 1, + "HTTPS_LOAD_BALANCER": 2, + "REGIONAL_HTTPS_LOAD_BALANCER": 3, + "INTERNAL_HTTPS_LOAD_BALANCER": 4, + "SSL_PROXY_LOAD_BALANCER": 5, + "TCP_PROXY_LOAD_BALANCER": 6, + "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, + "NETWORK_LOAD_BALANCER": 8, + "LEGACY_NETWORK_LOAD_BALANCER": 9, + "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 + } + }, + "StorageBucketInfo": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + } + } + }, + "ServerlessNegInfo": { + "fields": { + "negUri": { + "type": "string", + "id": 1 + } + } + }, + "ReachabilityService": { + "options": { + "(google.api.default_host)": "networkmanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListConnectivityTests": { + "requestType": "ListConnectivityTestsRequest", + "responseType": "ListConnectivityTestsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/global}/connectivityTests", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/global}/connectivityTests" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetConnectivityTest": { + "requestType": "GetConnectivityTestRequest", + "responseType": "ConnectivityTest", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/global/connectivityTests/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/global/connectivityTests/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateConnectivityTest": { + "requestType": "CreateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/global}/connectivityTests", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "parent,test_id,resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/global}/connectivityTests", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "parent,test_id,resource" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConnectivityTest": { + "requestType": "UpdateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "update_mask,resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "update_mask,resource" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RerunConnectivityTest": { + "requestType": "RerunConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConnectivityTest": { + "requestType": "DeleteConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/global/connectivityTests/*}", + "(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/global/connectivityTests/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "ListConnectivityTestsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListConnectivityTestsResponse": { + "fields": { + "resources": { + "rule": "repeated", + "type": "ConnectivityTest", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "CreateConnectivityTestRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "testId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateConnectivityTestRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "RerunConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "target": { + "type": "string", + "id": 3 + }, + "verb": { + "type": "string", + "id": 4 + }, + "statusDetail": { + "type": "string", + "id": 5 + }, + "cancelRequested": { + "type": "bool", + "id": 6 + }, + "apiVersion": { + "type": "string", + "id": 7 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + } + } + }, + "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 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js new file mode 100644 index 00000000000..cbd3d9c9f0e --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js @@ -0,0 +1,79 @@ +// 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, testId, resource) { + // [START networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + */ + // const testId = 'abc123' + /** + * Required. A `ConnectivityTest` resource + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callCreateConnectivityTest() { + // Construct request + const request = { + parent, + testId, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.createConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js new file mode 100644 index 00000000000..7cd83e08556 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callDeleteConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.deleteConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js new file mode 100644 index 00000000000..36f308151bf --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callGetConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networkmanagementClient.getConnectivityTest(request); + console.log(response); + } + + callGetConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js new file mode 100644 index 00000000000..11366d5248a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.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(parent) { + // [START networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Number of `ConnectivityTests` to return. + */ + // const pageSize = 1234 + /** + * Page token from an earlier query, as returned in `next_page_token`. + */ + // const pageToken = 'abc123' + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callListConnectivityTests() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networkmanagementClient.listConnectivityTestsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnectivityTests(); + // [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js new file mode 100644 index 00000000000..e279d602dd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callRerunConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.rerunConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRerunConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js new file mode 100644 index 00000000000..808714b00bb --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js @@ -0,0 +1,68 @@ +// 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, resource) { + // [START networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. Only fields specified in update_mask are updated. + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callUpdateConnectivityTest() { + // Construct request + const request = { + updateMask, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.updateConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConnectivityTest(); + // [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json new file mode 100644 index 00000000000..9c56c9e9913 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json @@ -0,0 +1,283 @@ +{ + "clientLibrary": { + "name": "nodejs-networkmanagement", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.networkmanagement.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async", + "title": "ReachabilityService listConnectivityTests Sample", + "origin": "API_DEFINITION", + "description": " Lists all Connectivity Tests owned by a project.", + "canonical": true, + "file": "reachability_service.list_connectivity_tests.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", + "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.networkmanagement.v1.ListConnectivityTestsResponse", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async", + "title": "ReachabilityService getConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific Connectivity Test.", + "canonical": true, + "file": "reachability_service.get_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networkmanagement.v1.ConnectivityTest", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async", + "title": "ReachabilityService createConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", + "canonical": true, + "file": "reachability_service.create_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "test_id", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async", + "title": "ReachabilityService updateConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", + "canonical": true, + "file": "reachability_service.update_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async", + "title": "ReachabilityService rerunConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", + "canonical": true, + "file": "reachability_service.rerun_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async", + "title": "ReachabilityService deleteConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific `ConnectivityTest`.", + "canonical": true, + "file": "reachability_service.delete_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" + }, + "method": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts new file mode 100644 index 00000000000..88c81931ccf --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 ReachabilityServiceClient = v1.ReachabilityServiceClient; +type ReachabilityServiceClient = v1.ReachabilityServiceClient; +export {v1, ReachabilityServiceClient}; +export default {v1, ReachabilityServiceClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..0a5d92ed4df --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json @@ -0,0 +1,87 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.networkmanagement.v1", + "libraryPackage": "@google-cloud/network-management", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts new file mode 100644 index 00000000000..5d88a6370d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from './reachability_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts new file mode 100644 index 00000000000..f7fc6ca3bf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts @@ -0,0 +1,1595 @@ +// 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/reachability_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './reachability_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Reachability service in the Google Cloud Network Management API provides + * services that analyze the reachability within a single Google Virtual Private + * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + * networks, or between VPC networks and internet hosts. A reachability analysis + * is based on Google Cloud network configurations. + * + * You can use the analysis results to verify these configurations and + * to troubleshoot connectivity issues. + * @class + * @memberof v1 + */ +export class ReachabilityServiceClient { + 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; + reachabilityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ReachabilityServiceClient. + * + * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; + 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 = 'networkmanagement.' + 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 = { + connectivityTestPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/global/connectivityTests/{test}' + ), + 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 = { + listConnectivityTests: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') + }; + + 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/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/global}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; + const createConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + const updateConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; + const updateConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + const rerunConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; + const rerunConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + const deleteConnectivityTestResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), + createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), + updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), + updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), + rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), + rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), + deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), + deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networkmanagement.v1.ReachabilityService', 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.reachabilityServiceStub) { + return this.reachabilityServiceStub; + } + + // Put together the "service stub" for + // google.cloud.networkmanagement.v1.ReachabilityService. + this.reachabilityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1.ReachabilityService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networkmanagement.v1.ReachabilityService, + 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 reachabilityServiceStubMethods = + ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; + for (const methodName of reachabilityServiceStubMethods) { + const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; + } + + /** + * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. + * 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/reachability_service.get_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async + */ + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|undefined, {}|undefined + ]>; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + callback: Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); + } + +/** + * Creates a new Connectivity Test. + * After you create a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, containing non-existent resources in the network, or you + * don't have read permissions to the network configurations of listed + * projects), then the reachability result returns a value of `UNKNOWN`. + * + * If the endpoint specifications in `ConnectivityTest` are + * incomplete, the reachability result returns a value of + * AMBIGUOUS. For more information, + * see the Connectivity Test documentation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * @param {string} request.testId + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource + * Required. A `ConnectivityTest` 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 + * 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/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async + */ + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, + 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.createConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createConnectivityTest()`. + * @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/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async + */ + async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the configuration of an existing `ConnectivityTest`. + * After you update a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * The Reachability state in the test resource is updated with the new result. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, they contain non-existent resources in the network, or the + * user does not have read permissions to the network configurations of + * listed projects), then the reachability result returns a value of + * UNKNOWN. + * + * If the endpoint specifications in `ConnectivityTest` are incomplete, the + * reachability result returns a value of `AMBIGUOUS`. See the documentation + * in `ConnectivityTest` for more details. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource + * Required. Only fields specified in update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, + 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({ + 'resource.name': request.resource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateConnectivityTest()`. + * @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/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Rerun an existing `ConnectivityTest`. + * After the user triggers the rerun, the reachability analysis is performed + * as part of the long running operation, which completes when the analysis + * completes. + * + * Even though the test configuration remains the same, the reachability + * result may change due to underlying network configuration changes. + * + * If the endpoint specifications in `ConnectivityTest` become invalid (for + * example, specified resources are deleted in the network, or you lost + * read permissions to the network configurations of listed projects), then + * the reachability result returns a value of `UNKNOWN`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async + */ + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, + 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.rerunConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `rerunConnectivityTest()`. + * @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/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async + */ + async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific `ConnectivityTest`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, + 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.deleteConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteConnectivityTest()`. + * @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/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all Connectivity Tests owned by a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. + * 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse + ]>; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>, + callback?: PaginationCallback< + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1.IConnectivityTest>): + Promise<[ + protos.google.cloud.networkmanagement.v1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTestsStream( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.createStream( + this.innerApiCalls.listConnectivityTests as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConnectivityTests`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. 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/reachability_service.list_connectivity_tests.js + * region_tag:networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async + */ + listConnectivityTestsAsync( + request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.asyncIterate( + this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. + * + * @param {string} project + * @param {string} test + * @returns {string} Resource name string. + */ + connectivityTestPath(project:string,test:string) { + return this.pathTemplates.connectivityTestPathTemplate.render({ + project: project, + test: test, + }); + } + + /** + * Parse the project from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; + } + + /** + * Parse the test from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the test. + */ + matchTestFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; + } + + /** + * 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.reachabilityServiceStub && !this._terminated) { + return this.reachabilityServiceStub.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-networkmanagement/v1/src/v1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json new file mode 100644 index 00000000000..6fcdab96cf2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1.ReachabilityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListConnectivityTests": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RerunConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json new file mode 100644 index 00000000000..d84c76feae1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/networkmanagement/v1/connectivity_test.proto", + "../../protos/google/cloud/networkmanagement/v1/reachability.proto", + "../../protos/google/cloud/networkmanagement/v1/trace.proto" +] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..ef3e3b070ae --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 networkmanagement = require('@google-cloud/network-management'); + +function main() { + const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..d3182081b86 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from '@google-cloud/network-management'; + +// check that the client class type name can be used +function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const reachabilityServiceClient = new ReachabilityServiceClient(); + doStuffWithReachabilityServiceClient(reachabilityServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/test/gapic_reachability_service_v1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts new file mode 100644 index 00000000000..35e3ba63eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts @@ -0,0 +1,2018 @@ +// 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 reachabilityserviceModule 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.ReachabilityServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); + 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 = reachabilityserviceModule.v1.ReachabilityServiceClient.servicePath; + assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = reachabilityserviceModule.v1.ReachabilityServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = reachabilityserviceModule.v1.ReachabilityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + await client.initialize(); + assert(client.reachabilityServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.reachabilityServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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('getConnectivityTest', () => { + it('invokes getConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); + const [response] = await client.getConnectivityTest(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnectivityTest( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with closed client', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnectivityTest(request), expectedError); + }); + }); + + describe('createConnectivityTest', () => { + it('invokes createConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.createConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnectivityTest( + 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.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateConnectivityTest', () => { + it('invokes updateConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnectivityTest( + 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.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('rerunConnectivityTest', () => { + it('invokes rerunConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.rerunConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rerunConnectivityTest( + 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.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.rerunConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.rerunConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRerunConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRerunConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteConnectivityTest', () => { + it('invokes deleteConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectivityTest( + 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.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listConnectivityTests', () => { + it('invokes listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); + const [response] = await client.listConnectivityTests(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests without error using callback', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectivityTests( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConnectivityTests(request), expectedError); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTestsStream without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { + 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.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConnectivityTestsStream with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; + const iterable = client.listConnectivityTestsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectivityTestsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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('connectivityTest', () => { + const fakePath = "/rendered/path/connectivityTest"; + const expectedParameters = { + project: "projectValue", + test: "testValue", + }; + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectivityTestPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.connectivityTestPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('connectivityTestPath', () => { + const result = client.connectivityTestPath("projectValue", "testValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConnectivityTestName', () => { + const result = client.matchProjectFromConnectivityTestName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestFromConnectivityTestName', () => { + const result = client.matchTestFromConnectivityTestName(fakePath); + assert.strictEqual(result, "testValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ + 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-networkmanagement/v1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js new file mode 100644 index 00000000000..d975be0ab73 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/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: 'ReachabilityService', + filename: './reachability-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js new file mode 100644 index 00000000000..22d92e8132c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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/network-management', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md new file mode 100644 index 00000000000..90c3778ad46 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md @@ -0,0 +1 @@ +Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json new file mode 100644 index 00000000000..d6594c83107 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json @@ -0,0 +1,59 @@ +{ + "name": "@google-cloud/network-management", + "version": "0.1.0", + "description": "Networkmanagement client for Node.js", + "repository": "googleapis/nodejs-networkmanagement", + "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 networkmanagement", + "networkmanagement", + "reachability service", + "vpc flow logs service" + ], + "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-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto new file mode 100644 index 00000000000..a001077d66c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto @@ -0,0 +1,422 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/trace.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TestOuterClass"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// A Connectivity Test for a network reachability analysis. +message ConnectivityTest { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + pattern: "projects/{project}/locations/global/connectivityTests/{test}" + }; + + // Identifier. Unique name of the resource using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The user-supplied description of the Connectivity Test. + // Maximum of 512 characters. + string description = 2; + + // Required. Source specification of the Connectivity Test. + // + // You can use a combination of source IP address, virtual machine + // (VM) instance, or Compute Engine network to uniquely identify + // the source location. + // + // Examples: + // If the source IP address is an internal IP address within a Google Cloud + // Virtual Private Cloud (VPC) network, then you must also specify the VPC + // network. Otherwise, specify the VM instance, which already contains its + // internal IP address and VPC network information. + // + // If the source of the test is within an on-premises network, then you must + // provide the destination VPC network. + // + // If the source endpoint is a Compute Engine VM instance with multiple + // network interfaces, the instance itself is not sufficient to identify the + // endpoint. So, you must also specify the source IP address or VPC network. + // + // A reachability analysis proceeds even if the source location is + // ambiguous. However, the test result may include endpoints that you don't + // intend to test. + Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Destination specification of the Connectivity Test. + // + // You can use a combination of destination IP address, Compute Engine + // VM instance, or VPC network to uniquely identify the destination + // location. + // + // Even if the destination IP address is not unique, the source IP + // location is unique. Usually, the analysis can infer the destination + // endpoint from route information. + // + // If the destination you specify is a VM instance and the instance has + // multiple network interfaces, then you must also specify either + // a destination IP address or VPC network to identify the destination + // interface. + // + // A reachability analysis proceeds even if the destination location is + // ambiguous. However, the result can include endpoints that you don't + // intend to test. + Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; + + // IP Protocol of the test. When not provided, "TCP" is assumed. + string protocol = 5; + + // Other projects that may be relevant for reachability analysis. + // This is applicable to scenarios where a test can cross project boundaries. + repeated string related_projects = 6; + + // Output only. The display name of a Connectivity Test. + string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Resource labels to represent user-provided metadata. + map labels = 8; + + // Output only. The time the test was created. + google.protobuf.Timestamp create_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the test's configuration was updated. + google.protobuf.Timestamp update_time = 11 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reachability details of this test from the latest run. + // The details are updated when creating a new test, updating an + // existing test, or triggering a one-time rerun of an existing test. + ReachabilityDetails reachability_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The probing details of this test from the latest run, present + // for applicable tests only. The details are updated when creating a new + // test, updating an existing test, or triggering a one-time rerun of an + // existing test. + ProbingDetails probing_details = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the test should skip firewall checking. + // If not provided, we assume false. + bool bypass_firewall_checks = 17; +} + +// Source or destination of the Connectivity Test. +message Endpoint { + // The type definition of an endpoint's network. Use one of the + // following choices: + enum NetworkType { + // Default type if unspecified. + NETWORK_TYPE_UNSPECIFIED = 0; + + // A network hosted within Google Cloud. + // To receive more detailed output, specify the URI for the source or + // destination network. + GCP_NETWORK = 1; + + // A network hosted outside of Google Cloud. + // This can be an on-premises network, or a network hosted by another cloud + // provider. + NON_GCP_NETWORK = 2; + } + + // Type of the target of a forwarding rule. + enum ForwardingRuleTarget { + // Forwarding rule target is unknown. + FORWARDING_RULE_TARGET_UNSPECIFIED = 0; + + // Compute Engine instance for protocol forwarding. + INSTANCE = 1; + + // Load Balancer. The specific type can be found from [load_balancer_type] + // [google.cloud.networkmanagement.v1beta1.Endpoint.load_balancer_type]. + LOAD_BALANCER = 2; + + // Classic Cloud VPN Gateway. + VPN_GATEWAY = 3; + + // Forwarding Rule is a Private Service Connect endpoint. + PSC = 4; + } + + // Wrapper for Cloud Function attributes. + message CloudFunctionEndpoint { + // A [Cloud Function](https://cloud.google.com/functions) name. + string uri = 1; + } + + // Wrapper for the App Engine service version attributes. + message AppEngineVersionEndpoint { + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) + // name. + string uri = 1; + } + + // Wrapper for Cloud Run revision attributes. + message CloudRunRevisionEndpoint { + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + // URI. The format is: + // projects/{project}/locations/{location}/revisions/{revision} + string uri = 1; + } + + // The IP address of the endpoint, which can be an external or internal IP. + string ip_address = 1; + + // The IP protocol port of the endpoint. + // Only applicable when protocol is TCP or UDP. + int32 port = 2; + + // A Compute Engine instance URI. + string instance = 3; + + // A forwarding rule and its corresponding IP address represent the frontend + // configuration of a Google Cloud load balancer. Forwarding rules are also + // used for protocol forwarding, Private Service Connect and other network + // services to provide forwarding information in the control plane. Format: + // projects/{project}/global/forwardingRules/{id} or + // projects/{project}/regions/{region}/forwardingRules/{id} + string forwarding_rule = 13; + + // Output only. Specifies the type of the target of the forwarding rule. + optional ForwardingRuleTarget forwarding_rule_target = 14 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the load balancer the forwarding rule points to. Empty + // for forwarding rules not related to load balancers. + optional string load_balancer_id = 15 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Type of the load balancer the forwarding rule points to. + optional LoadBalancerType load_balancer_type = 16 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A cluster URI for [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + string gke_master_cluster = 7; + + // DNS endpoint of [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // Requires gke_master_cluster to be set, can't be used simultaneoulsly with + // ip_address or network. Applicable only to destination endpoint. + string fqdn = 19; + + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. + string cloud_sql_instance = 8; + + // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) + // URI. + string redis_instance = 17; + + // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) + // URI. + string redis_cluster = 18; + + // A [Cloud Function](https://cloud.google.com/functions). + CloudFunctionEndpoint cloud_function = 10; + + // An [App Engine](https://cloud.google.com/appengine) [service + // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). + AppEngineVersionEndpoint app_engine_version = 11; + + // A [Cloud Run](https://cloud.google.com/run) + // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) + CloudRunRevisionEndpoint cloud_run_revision = 12; + + // A Compute Engine network URI. + string network = 4; + + // Type of the network where the endpoint is located. + // Applicable only to source endpoint, as destination network type can be + // inferred from the source. + NetworkType network_type = 5; + + // Project ID where the endpoint is located. + // The Project ID can be derived from the URI if you provide a VM instance or + // network URI. + // The following are two cases where you must provide the project ID: + // 1. Only the IP address is specified, and the IP address is within a Google + // Cloud project. + // 2. When you are using Shared VPC and the IP address that you provide is + // from the service project. In this case, the network that the IP address + // resides in is defined in the host project. + string project_id = 6; +} + +// Results of the configuration analysis from the last run of the test. +message ReachabilityDetails { + // The overall result of the test's configuration analysis. + enum Result { + // No result was specified. + RESULT_UNSPECIFIED = 0; + + // Possible scenarios are: + // + // * The configuration analysis determined that a packet originating from + // the source is expected to reach the destination. + // * The analysis didn't complete because the user lacks permission for + // some of the resources in the trace. However, at the time the user's + // permission became insufficient, the trace had been successful so far. + REACHABLE = 1; + + // A packet originating from the source is expected to be dropped before + // reaching the destination. + UNREACHABLE = 2; + + // The source and destination endpoints do not uniquely identify + // the test location in the network, and the reachability result contains + // multiple traces. For some traces, a packet could be delivered, and for + // others, it would not be. This result is also assigned to + // configuration analysis of return path if on its own it should be + // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. + AMBIGUOUS = 4; + + // The configuration analysis did not complete. Possible reasons are: + // + // * A permissions error occurred--for example, the user might not have + // read permission for all of the resources named in the test. + // * An internal error occurred. + // * The analyzer received an invalid or unsupported argument or was unable + // to identify a known endpoint. + UNDETERMINED = 5; + } + + // The overall result of the test's configuration analysis. + Result result = 1; + + // The time of the configuration analysis. + google.protobuf.Timestamp verify_time = 2; + + // The details of a failure or a cancellation of reachability analysis. + google.rpc.Status error = 3; + + // Result may contain a list of traces if a test has multiple possible + // paths in the network, such as when destination endpoint is a load balancer + // with multiple backends. + repeated Trace traces = 5; +} + +// Latency percentile rank and value. +message LatencyPercentile { + // Percentage of samples this data point applies to. + int32 percent = 1; + + // percent-th percentile of latency observed, in microseconds. + // Fraction of percent/100 of samples have latency lower or + // equal to the value of this field. + int64 latency_micros = 2; +} + +// Describes measured latency distribution. +message LatencyDistribution { + // Representative latency percentiles. + repeated LatencyPercentile latency_percentiles = 1; +} + +// Results of active probing from the last run of the test. +message ProbingDetails { + // Overall probing result of the test. + enum ProbingResult { + // No result was specified. + PROBING_RESULT_UNSPECIFIED = 0; + + // At least 95% of packets reached the destination. + REACHABLE = 1; + + // No packets reached the destination. + UNREACHABLE = 2; + + // Less than 95% of packets reached the destination. + REACHABILITY_INCONSISTENT = 3; + + // Reachability could not be determined. Possible reasons are: + // * The user lacks permission to access some of the network resources + // required to run the test. + // * No valid source endpoint could be derived from the request. + // * An internal error occurred. + UNDETERMINED = 4; + } + + // Abort cause types. + enum ProbingAbortCause { + // No reason was specified. + PROBING_ABORT_CAUSE_UNSPECIFIED = 0; + + // The user lacks permission to access some of the + // network resources required to run the test. + PERMISSION_DENIED = 1; + + // No valid source endpoint could be derived from the request. + NO_SOURCE_LOCATION = 2; + } + + // Representation of a network edge location as per + // https://cloud.google.com/vpc/docs/edge-locations. + message EdgeLocation { + // Name of the metropolitan area. + string metropolitan_area = 1; + } + + // The overall result of active probing. + ProbingResult result = 1; + + // The time that reachability was assessed through active probing. + google.protobuf.Timestamp verify_time = 2; + + // Details about an internal failure or the cancellation of active probing. + google.rpc.Status error = 3; + + // The reason probing was aborted. + ProbingAbortCause abort_cause = 4; + + // Number of probes sent. + int32 sent_probe_count = 5; + + // Number of probes that reached the destination. + int32 successful_probe_count = 6; + + // The source and destination endpoints derived from the test input and used + // for active probing. + EndpointInfo endpoint_info = 7; + + // Latency as measured by active probing in one direction: + // from the source to the destination endpoint. + LatencyDistribution probing_latency = 8; + + // The EdgeLocation from which a packet destined for/originating from the + // internet will egress/ingress the Google network. + // This will only be populated for a connectivity test which has an internet + // destination/source address. + // The absence of this field *must not* be used as an indication that the + // destination/source is part of the Google network. + EdgeLocation destination_egress_location = 9; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto new file mode 100644 index 00000000000..d888696545b --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto @@ -0,0 +1,304 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/connectivity_test.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "ReachabilityServiceProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// The Reachability service in Google Cloud Network Management API + +// The Reachability service in the Google Cloud Network Management API provides +// services that analyze the reachability within a single Google Virtual Private +// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises +// networks, or between VPC networks and internet hosts. A reachability analysis +// is based on Google Cloud network configurations. +// +// You can use the analysis results to verify these configurations and +// to troubleshoot connectivity issues. +service ReachabilityService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all Connectivity Tests owned by a project. + rpc ListConnectivityTests(ListConnectivityTestsRequest) + returns (ListConnectivityTestsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + }; + } + + // Gets the details of a specific Connectivity Test. + rpc GetConnectivityTest(GetConnectivityTestRequest) + returns (ConnectivityTest) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }; + } + + // Creates a new Connectivity Test. + // After you create a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, containing non-existent resources in the network, or you + // don't have read permissions to the network configurations of listed + // projects), then the reachability result returns a value of `UNKNOWN`. + // + // If the endpoint specifications in `ConnectivityTest` are + // incomplete, the reachability result returns a value of + // AMBIGUOUS. For more information, + // see the Connectivity Test documentation. + rpc CreateConnectivityTest(CreateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + body: "resource" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Updates the configuration of an existing `ConnectivityTest`. + // After you update a test, the reachability analysis is performed as part + // of the long running operation, which completes when the analysis completes. + // The Reachability state in the test resource is updated with the new result. + // + // If the endpoint specifications in `ConnectivityTest` are invalid + // (for example, they contain non-existent resources in the network, or the + // user does not have read permissions to the network configurations of + // listed projects), then the reachability result returns a value of + // UNKNOWN. + // + // If the endpoint specifications in `ConnectivityTest` are incomplete, the + // reachability result returns a value of `AMBIGUOUS`. See the documentation + // in `ConnectivityTest` for more details. + rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}" + body: "resource" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Rerun an existing `ConnectivityTest`. + // After the user triggers the rerun, the reachability analysis is performed + // as part of the long running operation, which completes when the analysis + // completes. + // + // Even though the test configuration remains the same, the reachability + // result may change due to underlying network configuration changes. + // + // If the endpoint specifications in `ConnectivityTest` become invalid (for + // example, specified resources are deleted in the network, or you lost + // read permissions to the network configurations of listed projects), then + // the reachability result returns a value of `UNKNOWN`. + rpc RerunConnectivityTest(RerunConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a specific `ConnectivityTest`. + rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } +} + +// Request for the `ListConnectivityTests` method. +message ListConnectivityTestsRequest { + // Required. The parent resource of the Connectivity Tests: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Number of `ConnectivityTests` to return. + int32 page_size = 2; + + // Page token from an earlier query, as returned in `next_page_token`. + string page_token = 3; + + // Lists the `ConnectivityTests` that match the filter expression. A filter + // expression filters the resources listed in the response. The expression + // must be of the form ` ` where operators: `<`, `>`, + // `<=`, + // `>=`, + // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + // roughly synonymous with equality). can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = "projects/proj-1/locations/global/connectivityTests/test-1 + // + // - Filter by labels: + // - Resources that have a key called `foo` + // labels.foo:* + // - Resources that have a key called `foo` whose value is `bar` + // labels.foo = bar + string filter = 4; + + // Field to use to sort the list. + string order_by = 5; +} + +// Response for the `ListConnectivityTests` method. +message ListConnectivityTestsResponse { + // List of Connectivity Tests. + repeated ConnectivityTest resources = 1; + + // Page token to fetch the next set of Connectivity Tests. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetConnectivityTest` method. +message GetConnectivityTestRequest { + // Required. `ConnectivityTest` resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `CreateConnectivityTest` method. +message CreateConnectivityTestRequest { + // Required. The parent resource of the Connectivity Test to create: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The logical name of the Connectivity Test in your project + // with the following restrictions: + // + // * Must contain only lowercase letters, numbers, and hyphens. + // * Must start with a letter. + // * Must be between 1-40 characters. + // * Must end with a number or a letter. + // * Must be unique within the customer project + string test_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A `ConnectivityTest` resource + ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateConnectivityTest` method. +message UpdateConnectivityTestRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteConnectivityTest` method. +message DeleteConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Request for the `RerunConnectivityTest` method. +message RerunConnectivityTestRequest { + // Required. Connectivity Test resource name using the form: + // `projects/{project_id}/locations/global/connectivityTests/{test_id}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/ConnectivityTest" + } + ]; +} + +// Metadata describing an [Operation][google.longrunning.Operation] +message OperationMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // Target of the operation - for example + // projects/project-1/locations/global/connectivityTests/test-1 + string target = 3; + + // Name of the verb executed by the operation. + string verb = 4; + + // Human-readable status of the operation, if any. + string status_detail = 5; + + // Specifies if cancellation was requested for the operation. + bool cancel_requested = 6; + + // API version. + string api_version = 7; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto new file mode 100644 index 00000000000..b8169361686 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto @@ -0,0 +1,1876 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "TraceProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// Trace represents one simulated packet forwarding path. +// +// * Each trace contains multiple ordered steps. +// * Each step is in a particular state with associated configuration. +// * State is categorized as final or non-final states. +// * Each final state has a reason associated. +// * Each trace must end with a final state (the last step). +// ``` +// |---------------------Trace----------------------| +// Step1(State) Step2(State) --- StepN(State(final)) +// ``` +message Trace { + // Derived from the source and destination endpoints definition specified by + // user request, and validated by the data plane model. + // If there are multiple traces starting from different source locations, then + // the endpoint_info may be different between traces. + EndpointInfo endpoint_info = 1; + + // A trace of a test contains multiple steps from the initial state to the + // final state (delivered, dropped, forwarded, or aborted). + // + // The steps are ordered by the processing sequence within the simulated + // network state machine. It is critical to preserve the order of the steps + // and avoid reordering or sorting them. + repeated Step steps = 2; + + // ID of trace. For forward traces, this ID is unique for each trace. For + // return traces, it matches ID of associated forward trace. A single forward + // trace can be associated with none, one or more than one return trace. + int32 forward_trace_id = 4; +} + +// A simulated forwarding path is composed of multiple steps. +// Each step has a well-defined state and an associated configuration. +message Step { + // Type of states that are defined in the network state machine. + // Each step in the packet trace is in a specific state. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // Initial state: packet originating from a Compute Engine instance. + // An InstanceInfo is populated with starting instance information. + START_FROM_INSTANCE = 1; + + // Initial state: packet originating from the internet. + // The endpoint information is populated. + START_FROM_INTERNET = 2; + + // Initial state: packet originating from a Google service. + // The google_service information is populated. + START_FROM_GOOGLE_SERVICE = 27; + + // Initial state: packet originating from a VPC or on-premises network + // with internal source IP. + // If the source is a VPC network visible to the user, a NetworkInfo + // is populated with details of the network. + START_FROM_PRIVATE_NETWORK = 3; + + // Initial state: packet originating from a Google Kubernetes Engine cluster + // master. A GKEMasterInfo is populated with starting instance information. + START_FROM_GKE_MASTER = 21; + + // Initial state: packet originating from a Cloud SQL instance. + // A CloudSQLInstanceInfo is populated with starting instance information. + START_FROM_CLOUD_SQL_INSTANCE = 22; + + // Initial state: packet originating from a Redis instance. + // A RedisInstanceInfo is populated with starting instance information. + START_FROM_REDIS_INSTANCE = 32; + + // Initial state: packet originating from a Redis Cluster. + // A RedisClusterInfo is populated with starting Cluster information. + START_FROM_REDIS_CLUSTER = 33; + + // Initial state: packet originating from a Cloud Function. + // A CloudFunctionInfo is populated with starting function information. + START_FROM_CLOUD_FUNCTION = 23; + + // Initial state: packet originating from an App Engine service version. + // An AppEngineVersionInfo is populated with starting version information. + START_FROM_APP_ENGINE_VERSION = 25; + + // Initial state: packet originating from a Cloud Run revision. + // A CloudRunRevisionInfo is populated with starting revision information. + START_FROM_CLOUD_RUN_REVISION = 26; + + // Initial state: packet originating from a Storage Bucket. Used only for + // return traces. + // The storage_bucket information is populated. + START_FROM_STORAGE_BUCKET = 29; + + // Initial state: packet originating from a published service that uses + // Private Service Connect. Used only for return traces. + START_FROM_PSC_PUBLISHED_SERVICE = 30; + + // Initial state: packet originating from a serverless network endpoint + // group backend. Used only for return traces. + // The serverless_neg information is populated. + START_FROM_SERVERLESS_NEG = 31; + + // Config checking state: verify ingress firewall rule. + APPLY_INGRESS_FIREWALL_RULE = 4; + + // Config checking state: verify egress firewall rule. + APPLY_EGRESS_FIREWALL_RULE = 5; + + // Config checking state: verify route. + APPLY_ROUTE = 6; + + // Config checking state: match forwarding rule. + APPLY_FORWARDING_RULE = 7; + + // Config checking state: verify load balancer backend configuration. + ANALYZE_LOAD_BALANCER_BACKEND = 28; + + // Config checking state: packet sent or received under foreign IP + // address and allowed. + SPOOFING_APPROVED = 8; + + // Forwarding state: arriving at a Compute Engine instance. + ARRIVE_AT_INSTANCE = 9; + + // Forwarding state: arriving at a Compute Engine internal load balancer. + // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not + // used in new tests. + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; + + // Forwarding state: arriving at a Compute Engine external load balancer. + // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not + // used in new tests. + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; + + // Forwarding state: arriving at a Cloud VPN gateway. + ARRIVE_AT_VPN_GATEWAY = 12; + + // Forwarding state: arriving at a Cloud VPN tunnel. + ARRIVE_AT_VPN_TUNNEL = 13; + + // Forwarding state: arriving at a VPC connector. + ARRIVE_AT_VPC_CONNECTOR = 24; + + // Transition state: packet header translated. + NAT = 14; + + // Transition state: original connection is terminated and a new proxied + // connection is initiated. + PROXY_CONNECTION = 15; + + // Final state: packet could be delivered. + DELIVER = 16; + + // Final state: packet could be dropped. + DROP = 17; + + // Final state: packet could be forwarded to a network with an unknown + // configuration. + FORWARD = 18; + + // Final state: analysis is aborted. + ABORT = 19; + + // Special state: viewer of the test result does not have permission to + // see the configuration in this step. + VIEWER_PERMISSION_MISSING = 20; + } + + // A description of the step. Usually this is a summary of the state. + string description = 1; + + // Each step is in one of the pre-defined states. + State state = 2; + + // This is a step that leads to the final state Drop. + bool causes_drop = 3; + + // Project ID that contains the configuration this step is validating. + string project_id = 4; + + // Configuration or metadata associated with each step. + // The configuration is filtered based on viewer's permission. If a viewer + // has no permission to view the configuration in this step, for non-final + // states a special state is populated (VIEWER_PERMISSION_MISSING), and for + // final state the configuration is cleared. + oneof step_info { + // Display information of a Compute Engine instance. + InstanceInfo instance = 5; + + // Display information of a Compute Engine firewall rule. + FirewallInfo firewall = 6; + + // Display information of a Compute Engine route. + RouteInfo route = 7; + + // Display information of the source and destination under analysis. + // The endpoint information in an intermediate state may differ with the + // initial input, as it might be modified by state like NAT, + // or Connection Proxy. + EndpointInfo endpoint = 8; + + // Display information of a Google service + GoogleServiceInfo google_service = 24; + + // Display information of a Compute Engine forwarding rule. + ForwardingRuleInfo forwarding_rule = 9; + + // Display information of a Compute Engine VPN gateway. + VpnGatewayInfo vpn_gateway = 10; + + // Display information of a Compute Engine VPN tunnel. + VpnTunnelInfo vpn_tunnel = 11; + + // Display information of a VPC connector. + VpcConnectorInfo vpc_connector = 21; + + // Display information of the final state "deliver" and reason. + DeliverInfo deliver = 12; + + // Display information of the final state "forward" and reason. + ForwardInfo forward = 13; + + // Display information of the final state "abort" and reason. + AbortInfo abort = 14; + + // Display information of the final state "drop" and reason. + DropInfo drop = 15; + + // Display information of the load balancers. Deprecated in favor of the + // `load_balancer_backend_info` field, not used in new tests. + LoadBalancerInfo load_balancer = 16 [deprecated = true]; + + // Display information of a Google Cloud network. + NetworkInfo network = 17; + + // Display information of a Google Kubernetes Engine cluster master. + GKEMasterInfo gke_master = 18; + + // Display information of a Cloud SQL instance. + CloudSQLInstanceInfo cloud_sql_instance = 19; + + // Display information of a Redis Instance. + RedisInstanceInfo redis_instance = 30; + + // Display information of a Redis Cluster. + RedisClusterInfo redis_cluster = 31; + + // Display information of a Cloud Function. + CloudFunctionInfo cloud_function = 20; + + // Display information of an App Engine service version. + AppEngineVersionInfo app_engine_version = 22; + + // Display information of a Cloud Run revision. + CloudRunRevisionInfo cloud_run_revision = 23; + + // Display information of a NAT. + NatInfo nat = 25; + + // Display information of a ProxyConnection. + ProxyConnectionInfo proxy_connection = 26; + + // Display information of a specific load balancer backend. + LoadBalancerBackendInfo load_balancer_backend_info = 27; + + // Display information of a Storage Bucket. Used only for return traces. + StorageBucketInfo storage_bucket = 28; + + // Display information of a Serverless network endpoint group backend. Used + // only for return traces. + ServerlessNegInfo serverless_neg = 29; + } +} + +// For display only. Metadata associated with a Compute Engine instance. +message InstanceInfo { + // Name of a Compute Engine instance. + string display_name = 1; + + // URI of a Compute Engine instance. + string uri = 2; + + // Name of the network interface of a Compute Engine instance. + string interface = 3; + + // URI of a Compute Engine network. + string network_uri = 4; + + // Internal IP address of the network interface. + string internal_ip = 5; + + // External IP address of the network interface. + string external_ip = 6; + + // Network tags configured on the instance. + repeated string network_tags = 7; + + // Service account authorized for the instance. + string service_account = 8 [deprecated = true]; + + // URI of the PSC network attachment the NIC is attached to (if relevant). + string psc_network_attachment_uri = 9; +} + +// For display only. Metadata associated with a Compute Engine network. +// Next ID: 7 +message NetworkInfo { + // Name of a Compute Engine network. + string display_name = 1; + + // URI of a Compute Engine network. + string uri = 2; + + // URI of the subnet matching the source IP address of the test. + string matched_subnet_uri = 5; + + // The IP range of the subnet matching the source IP address of the test. + string matched_ip_range = 4; + + // The region of the subnet matching the source IP address of the test. + string region = 6; +} + +// For display only. Metadata associated with a VPC firewall rule, an implied +// VPC firewall rule, or a firewall policy rule. +message FirewallInfo { + // The firewall rule's type. + enum FirewallRuleType { + // Unspecified type. + FIREWALL_RULE_TYPE_UNSPECIFIED = 0; + + // Hierarchical firewall policy rule. For details, see + // [Hierarchical firewall policies + // overview](https://cloud.google.com/vpc/docs/firewall-policies). + HIERARCHICAL_FIREWALL_POLICY_RULE = 1; + + // VPC firewall rule. For details, see + // [VPC firewall rules + // overview](https://cloud.google.com/vpc/docs/firewalls). + VPC_FIREWALL_RULE = 2; + + // Implied VPC firewall rule. For details, see + // [Implied + // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). + IMPLIED_VPC_FIREWALL_RULE = 3; + + // Implicit firewall rules that are managed by serverless VPC access to + // allow ingress access. They are not visible in the Google Cloud console. + // For details, see [VPC connector's implicit + // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; + + // Global network firewall policy rule. + // For details, see [Network firewall + // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). + NETWORK_FIREWALL_POLICY_RULE = 5; + + // Regional network firewall policy rule. + // For details, see [Regional network firewall + // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; + + // Firewall policy rule containing attributes not yet supported in + // Connectivity tests. Firewall analysis is skipped if such a rule can + // potentially be matched. Please see the [list of unsupported + // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). + UNSUPPORTED_FIREWALL_POLICY_RULE = 100; + + // Tracking state for response traffic created when request traffic goes + // through allow firewall rule. + // For details, see [firewall rules + // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) + TRACKING_STATE = 101; + } + + // The display name of the firewall rule. This field might be empty for + // firewall policy rules. + string display_name = 1; + + // The URI of the firewall rule. This field is not applicable to implied + // VPC firewall rules. + string uri = 2; + + // Possible values: INGRESS, EGRESS + string direction = 3; + + // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP + string action = 4; + + // The priority of the firewall rule. + int32 priority = 5; + + // The URI of the VPC network that the firewall rule is associated with. + // This field is not applicable to hierarchical firewall policy rules. + string network_uri = 6; + + // The target tags defined by the VPC firewall rule. This field is not + // applicable to firewall policy rules. + repeated string target_tags = 7; + + // The target service accounts specified by the firewall rule. + repeated string target_service_accounts = 8; + + // The name of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy = 9; + + // The URI of the firewall policy that this rule is associated with. + // This field is not applicable to VPC firewall rules and implied VPC firewall + // rules. + string policy_uri = 11; + + // The firewall rule's type. + FirewallRuleType firewall_rule_type = 10; +} + +// For display only. Metadata associated with a Compute Engine route. +message RouteInfo { + // Type of route: + enum RouteType { + // Unspecified type. Default value. + ROUTE_TYPE_UNSPECIFIED = 0; + + // Route is a subnet route automatically created by the system. + SUBNET = 1; + + // Static route created by the user, including the default route to the + // internet. + STATIC = 2; + + // Dynamic route exchanged between BGP peers. + DYNAMIC = 3; + + // A subnet route received from peering network. + PEERING_SUBNET = 4; + + // A static route received from peering network. + PEERING_STATIC = 5; + + // A dynamic route received from peering network. + PEERING_DYNAMIC = 6; + + // Policy based route. + POLICY_BASED = 7; + + // Advertised route. Synthetic route which is used to transition from the + // StartFromPrivateNetwork state in Connectivity tests. + ADVERTISED = 101; + } + + // Type of next hop: + enum NextHopType { + // Unspecified type. Default value. + NEXT_HOP_TYPE_UNSPECIFIED = 0; + + // Next hop is an IP address. + NEXT_HOP_IP = 1; + + // Next hop is a Compute Engine instance. + NEXT_HOP_INSTANCE = 2; + + // Next hop is a VPC network gateway. + NEXT_HOP_NETWORK = 3; + + // Next hop is a peering VPC. + NEXT_HOP_PEERING = 4; + + // Next hop is an interconnect. + NEXT_HOP_INTERCONNECT = 5; + + // Next hop is a VPN tunnel. + NEXT_HOP_VPN_TUNNEL = 6; + + // Next hop is a VPN gateway. This scenario only happens when tracing + // connectivity from an on-premises network to Google Cloud through a VPN. + // The analysis simulates a packet departing from the on-premises network + // through a VPN tunnel and arriving at a Cloud VPN gateway. + NEXT_HOP_VPN_GATEWAY = 7; + + // Next hop is an internet gateway. + NEXT_HOP_INTERNET_GATEWAY = 8; + + // Next hop is blackhole; that is, the next hop either does not exist or is + // not running. + NEXT_HOP_BLACKHOLE = 9; + + // Next hop is the forwarding rule of an Internal Load Balancer. + NEXT_HOP_ILB = 10; + + // Next hop is a + // [router appliance + // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). + NEXT_HOP_ROUTER_APPLIANCE = 11; + + // Next hop is an NCC hub. + NEXT_HOP_NCC_HUB = 12; + } + + // Indicates where routes are applicable. + enum RouteScope { + // Unspecified scope. Default value. + ROUTE_SCOPE_UNSPECIFIED = 0; + + // Route is applicable to packets in Network. + NETWORK = 1; + + // Route is applicable to packets using NCC Hub's routing table. + NCC_HUB = 2; + } + + // Type of route. + RouteType route_type = 8; + + // Type of next hop. + NextHopType next_hop_type = 9; + + // Indicates where route is applicable. + RouteScope route_scope = 14; + + // Name of a route. + string display_name = 1; + + // URI of a route (if applicable). + string uri = 2; + + // Region of the route (if applicable). + string region = 19; + + // Destination IP range of the route. + string dest_ip_range = 3; + + // Next hop of the route. + string next_hop = 4; + + // URI of a Compute Engine network. NETWORK routes only. + string network_uri = 5; + + // Priority of the route. + int32 priority = 6; + + // Instance tags of the route. + repeated string instance_tags = 7; + + // Source IP address range of the route. Policy based routes only. + string src_ip_range = 10; + + // Destination port ranges of the route. Policy based routes only. + repeated string dest_port_ranges = 11; + + // Source port ranges of the route. Policy based routes only. + repeated string src_port_ranges = 12; + + // Protocols of the route. Policy based routes only. + repeated string protocols = 13; + + // URI of a NCC Hub. NCC_HUB routes only. + optional string ncc_hub_uri = 15; + + // URI of a NCC Spoke. NCC_HUB routes only. + optional string ncc_spoke_uri = 16; + + // For advertised dynamic routes, the URI of the Cloud Router that advertised + // the corresponding IP prefix. + optional string advertised_route_source_router_uri = 17; + + // For advertised routes, the URI of their next hop, i.e. the URI of the + // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) + // the advertised prefix is advertised through, or URI of the source peered + // network. + optional string advertised_route_next_hop_uri = 18; +} + +// For display only. Details of a Google Service sending packets to a +// VPC network. Although the source IP might be a publicly routable address, +// some Google Services use special routes within Google production +// infrastructure to reach Compute Engine Instances. +// https://cloud.google.com/vpc/docs/routes#special_return_paths +message GoogleServiceInfo { + // Recognized type of a Google Service. + enum GoogleServiceType { + // Unspecified Google Service. + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; + + // Identity aware proxy. + // https://cloud.google.com/iap/docs/using-tcp-forwarding + IAP = 1; + + // One of two services sharing IP ranges: + // * Load Balancer proxy + // * Centralized Health Check prober + // https://cloud.google.com/load-balancing/docs/firewall-rules + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; + + // Connectivity from Cloud DNS to forwarding targets or alternate name + // servers that use private routing. + // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules + // https://cloud.google.com/dns/docs/policies#firewall-rules + CLOUD_DNS = 3; + + // private.googleapis.com and restricted.googleapis.com + GOOGLE_API = 4; + + // Google API via Private Service Connect. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_PSC = 5; + + // Google API via VPC Service Controls. + // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis + GOOGLE_API_VPC_SC = 6; + } + + // Source IP address. + string source_ip = 1; + + // Recognized type of a Google Service. + GoogleServiceType google_service_type = 2; +} + +// For display only. Metadata associated with a Compute Engine forwarding rule. +message ForwardingRuleInfo { + // Name of the forwarding rule. + string display_name = 1; + + // URI of the forwarding rule. + string uri = 2; + + // Protocol defined in the forwarding rule that matches the packet. + string matched_protocol = 3; + + // Port range defined in the forwarding rule that matches the packet. + string matched_port_range = 6; + + // VIP of the forwarding rule. + string vip = 4; + + // Target type of the forwarding rule. + string target = 5; + + // Network URI. + string network_uri = 7; + + // Region of the forwarding rule. Set only for regional forwarding rules. + string region = 8; + + // Name of the load balancer the forwarding rule belongs to. Empty for + // forwarding rules not related to load balancers (like PSC forwarding rules). + string load_balancer_name = 9; + + // URI of the PSC service attachment this forwarding rule targets (if + // applicable). + string psc_service_attachment_uri = 10; + + // PSC Google API target this forwarding rule targets (if applicable). + string psc_google_api_target = 11; +} + +// For display only. Metadata associated with a load balancer. +message LoadBalancerInfo { + // The type definition for a load balancer: + enum LoadBalancerType { + // Type is unspecified. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Internal TCP/UDP load balancer. + INTERNAL_TCP_UDP = 1; + + // Network TCP/UDP load balancer. + NETWORK_TCP_UDP = 2; + + // HTTP(S) proxy load balancer. + HTTP_PROXY = 3; + + // TCP proxy load balancer. + TCP_PROXY = 4; + + // SSL proxy load balancer. + SSL_PROXY = 5; + } + + // The type definition for a load balancer backend configuration: + enum BackendType { + // Type is unspecified. + BACKEND_TYPE_UNSPECIFIED = 0; + + // Backend Service as the load balancer's backend. + BACKEND_SERVICE = 1; + + // Target Pool as the load balancer's backend. + TARGET_POOL = 2; + + // Target Instance as the load balancer's backend. + TARGET_INSTANCE = 3; + } + + // Type of the load balancer. + LoadBalancerType load_balancer_type = 1; + + // URI of the health check for the load balancer. Deprecated and no longer + // populated as different load balancer backends might have different health + // checks. + string health_check_uri = 2 [deprecated = true]; + + // Information for the loadbalancer backends. + repeated LoadBalancerBackend backends = 3; + + // Type of load balancer's backend configuration. + BackendType backend_type = 4; + + // Backend configuration URI. + string backend_uri = 5; +} + +// For display only. Metadata associated with a specific load balancer backend. +message LoadBalancerBackend { + // State of a health check firewall configuration: + enum HealthCheckFirewallState { + // State is unspecified. Default state if not populated. + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; + + // There are configured firewall rules to allow health check probes to the + // backend. + CONFIGURED = 1; + + // There are firewall rules configured to allow partial health check ranges + // or block all health check ranges. + // If a health check probe is sent from denied IP ranges, + // the health check to the backend will fail. Then, the backend will be + // marked unhealthy and will not receive traffic sent to the load balancer. + MISCONFIGURED = 2; + } + + // Name of a Compute Engine instance or network endpoint. + string display_name = 1; + + // URI of a Compute Engine instance or network endpoint. + string uri = 2; + + // State of the health check firewall configuration. + HealthCheckFirewallState health_check_firewall_state = 3; + + // A list of firewall rule URIs allowing probes from health check IP ranges. + repeated string health_check_allowing_firewall_rules = 4; + + // A list of firewall rule URIs blocking probes from health check IP ranges. + repeated string health_check_blocking_firewall_rules = 5; +} + +// For display only. Metadata associated with a Compute Engine VPN gateway. +message VpnGatewayInfo { + // Name of a VPN gateway. + string display_name = 1; + + // URI of a VPN gateway. + string uri = 2; + + // URI of a Compute Engine network where the VPN gateway is configured. + string network_uri = 3; + + // IP address of the VPN gateway. + string ip_address = 4; + + // A VPN tunnel that is associated with this VPN gateway. + // There may be multiple VPN tunnels configured on a VPN gateway, and only + // the one relevant to the test is displayed. + string vpn_tunnel_uri = 5; + + // Name of a Google Cloud region where this VPN gateway is configured. + string region = 6; +} + +// For display only. Metadata associated with a Compute Engine VPN tunnel. +message VpnTunnelInfo { + // Types of VPN routing policy. For details, refer to [Networks and Tunnel + // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). + enum RoutingType { + // Unspecified type. Default value. + ROUTING_TYPE_UNSPECIFIED = 0; + + // Route based VPN. + ROUTE_BASED = 1; + + // Policy based routing. + POLICY_BASED = 2; + + // Dynamic (BGP) routing. + DYNAMIC = 3; + } + + // Name of a VPN tunnel. + string display_name = 1; + + // URI of a VPN tunnel. + string uri = 2; + + // URI of the VPN gateway at local end of the tunnel. + string source_gateway = 3; + + // URI of a VPN gateway at remote end of the tunnel. + string remote_gateway = 4; + + // Remote VPN gateway's IP address. + string remote_gateway_ip = 5; + + // Local VPN gateway's IP address. + string source_gateway_ip = 6; + + // URI of a Compute Engine network where the VPN tunnel is configured. + string network_uri = 7; + + // Name of a Google Cloud region where this VPN tunnel is configured. + string region = 8; + + // Type of the routing policy. + RoutingType routing_type = 9; +} + +// For display only. The specification of the endpoints for the test. +// EndpointInfo is derived from source and destination Endpoint and validated +// by the backend data plane model. +message EndpointInfo { + // Source IP address. + string source_ip = 1; + + // Destination IP address. + string destination_ip = 2; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 3; + + // Source port. Only valid when protocol is TCP or UDP. + int32 source_port = 4; + + // Destination port. Only valid when protocol is TCP or UDP. + int32 destination_port = 5; + + // URI of the network where this packet originates from. + string source_network_uri = 6; + + // URI of the network where this packet is sent to. + string destination_network_uri = 7; + + // URI of the source telemetry agent this packet originates from. + string source_agent_uri = 8; +} + +// Details of the final state "deliver" and associated resource. +message DeliverInfo { + // Deliver target types: + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Target is a Compute Engine instance. + INSTANCE = 1; + + // Target is the internet. + INTERNET = 2; + + // Target is a Google API. + GOOGLE_API = 3; + + // Target is a Google Kubernetes Engine cluster master. + GKE_MASTER = 4; + + // Target is a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 5; + + // Target is a published service that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + PSC_PUBLISHED_SERVICE = 6; + + // Target is Google APIs that use [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_GOOGLE_API = 7; + + // Target is a VPC-SC that uses [Private Service + // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). + PSC_VPC_SC = 8; + + // Target is a serverless network endpoint group. + SERVERLESS_NEG = 9; + + // Target is a Cloud Storage bucket. + STORAGE_BUCKET = 10; + + // Target is a private network. Used only for return traces. + PRIVATE_NETWORK = 11; + + // Target is a Cloud Function. Used only for return traces. + CLOUD_FUNCTION = 12; + + // Target is a App Engine service version. Used only for return traces. + APP_ENGINE_VERSION = 13; + + // Target is a Cloud Run revision. Used only for return traces. + CLOUD_RUN_REVISION = 14; + + // Target is a Google-managed service. Used only for return traces. + GOOGLE_MANAGED_SERVICE = 15; + + // Target is a Redis Instance. + REDIS_INSTANCE = 16; + + // Target is a Redis Cluster. + REDIS_CLUSTER = 17; + } + + // Target type where the packet is delivered to. + Target target = 1; + + // URI of the resource that the packet is delivered to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the Cloud Storage Bucket the packet is delivered to (if + // applicable). + string storage_bucket = 4; + + // PSC Google API target the packet is delivered to (if applicable). + string psc_google_api_target = 5; +} + +// Details of the final state "forward" and associated resource. +message ForwardInfo { + // Forward target types. + enum Target { + // Target not specified. + TARGET_UNSPECIFIED = 0; + + // Forwarded to a VPC peering network. + PEERING_VPC = 1; + + // Forwarded to a Cloud VPN gateway. + VPN_GATEWAY = 2; + + // Forwarded to a Cloud Interconnect connection. + INTERCONNECT = 3; + + // Forwarded to a Google Kubernetes Engine Container cluster master. + GKE_MASTER = 4 [deprecated = true]; + + // Forwarded to the next hop of a custom route imported from a peering VPC. + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; + + // Forwarded to a Cloud SQL instance. + CLOUD_SQL_INSTANCE = 6 [deprecated = true]; + + // Forwarded to a VPC network in another project. + ANOTHER_PROJECT = 7; + + // Forwarded to an NCC Hub. + NCC_HUB = 8; + + // Forwarded to a router appliance. + ROUTER_APPLIANCE = 9; + } + + // Target type where this packet is forwarded to. + Target target = 1; + + // URI of the resource that the packet is forwarded to. + string resource_uri = 2; + + // IP address of the target (if applicable). + string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; +} + +// Details of the final state "abort" and associated resource. +message AbortInfo { + // Abort cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Aborted due to unknown network. Deprecated, not used in the new tests. + UNKNOWN_NETWORK = 1 [deprecated = true]; + + // Aborted because no project information can be derived from the test + // input. Deprecated, not used in the new tests. + UNKNOWN_PROJECT = 3 [deprecated = true]; + + // Aborted because traffic is sent from a public IP to an instance without + // an external IP. Deprecated, not used in the new tests. + NO_EXTERNAL_IP = 7 [deprecated = true]; + + // Aborted because none of the traces matches destination information + // specified in the input test request. Deprecated, not used in the new + // tests. + UNINTENDED_DESTINATION = 8 [deprecated = true]; + + // Aborted because the source endpoint could not be found. Deprecated, not + // used in the new tests. + SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; + + // Aborted because the source network does not match the source endpoint. + // Deprecated, not used in the new tests. + MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; + + // Aborted because the destination endpoint could not be found. Deprecated, + // not used in the new tests. + DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; + + // Aborted because the destination network does not match the destination + // endpoint. Deprecated, not used in the new tests. + MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; + + // Aborted because no endpoint with the packet's destination IP address is + // found. + UNKNOWN_IP = 2; + + // Aborted because no endpoint with the packet's destination IP is found in + // the Google-managed project. + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; + + // Aborted because the source IP address doesn't belong to any of the + // subnets of the source VPC network. + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; + + // Aborted because user lacks permission to access all or part of the + // network configurations required to run the test. + PERMISSION_DENIED = 4; + + // Aborted because user lacks permission to access Cloud NAT configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; + + // Aborted because user lacks permission to access Network endpoint group + // endpoint configs required to run the test. + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; + + // Aborted because user lacks permission to access Cloud Router configs + // required to run the test. + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; + + // Aborted because no valid source or destination endpoint is derived from + // the input test request. + NO_SOURCE_LOCATION = 5; + + // Aborted because the source or destination endpoint specified in + // the request is invalid. Some examples: + // - The request might contain malformed resource URI, project ID, or IP + // address. + // - The request might contain inconsistent information (for example, the + // request might include both the instance and the network, but the instance + // might not have a NIC in that network). + INVALID_ARGUMENT = 6; + + // Aborted because the number of steps in the trace exceeds a certain + // limit. It might be caused by a routing loop. + TRACE_TOO_LONG = 9; + + // Aborted due to internal server error. + INTERNAL_ERROR = 10; + + // Aborted because the test scenario is not supported. + UNSUPPORTED = 15; + + // Aborted because the source and destination resources have no common IP + // version. + MISMATCHED_IP_VERSION = 16; + + // Aborted because the connection between the control plane and the node of + // the source cluster is initiated by the node and managed by the + // Konnectivity proxy. + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; + + // Aborted because expected resource configuration was missing. + RESOURCE_CONFIG_NOT_FOUND = 18; + + // Aborted because expected VM instance configuration was missing. + VM_INSTANCE_CONFIG_NOT_FOUND = 24; + + // Aborted because expected network configuration was missing. + NETWORK_CONFIG_NOT_FOUND = 25; + + // Aborted because expected firewall configuration was missing. + FIREWALL_CONFIG_NOT_FOUND = 26; + + // Aborted because expected route configuration was missing. + ROUTE_CONFIG_NOT_FOUND = 27; + + // Aborted because a PSC endpoint selection for the Google-managed service + // is ambiguous (several PSC endpoints satisfy test input). + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; + + // Aborted because tests with a PSC-based Cloud SQL instance as a source are + // not supported. + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; + + // Aborted because tests with a Redis Cluster as a source are not supported. + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; + + // Aborted because tests with a Redis Instance as a source are not + // supported. + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; + + // Aborted because tests with a forwarding rule as a source are not + // supported. + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; + + // Aborted because one of the endpoints is a non-routable IP address + // (loopback, link-local, etc). + NON_ROUTABLE_IP_ADDRESS = 22; + + // Aborted due to an unknown issue in the Google-managed project. + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; + + // Aborted due to an unsupported configuration of the Google-managed + // project. + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; + } + + // Causes that the analysis is aborted. + Cause cause = 1; + + // URI of the resource that caused the abort. + string resource_uri = 2; + + // IP address that caused the abort. + string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; + + // List of project IDs the user specified in the request but lacks access to. + // In this case, analysis is aborted with the PERMISSION_DENIED cause. + repeated string projects_missing_permission = 3; +} + +// Details of the final state "drop" and associated resource. +message DropInfo { + // Drop cause types: + enum Cause { + // Cause is unspecified. + CAUSE_UNSPECIFIED = 0; + + // Destination external address cannot be resolved to a known target. If + // the address is used in a Google Cloud project, provide the project ID + // as test input. + UNKNOWN_EXTERNAL_ADDRESS = 1; + + // A Compute Engine instance can only send or receive a packet with a + // foreign IP address if ip_forward is enabled. + FOREIGN_IP_DISALLOWED = 2; + + // Dropped due to a firewall rule, unless allowed due to connection + // tracking. + FIREWALL_RULE = 3; + + // Dropped due to no matching routes. + NO_ROUTE = 4; + + // Dropped due to invalid route. Route's next hop is a blackhole. + ROUTE_BLACKHOLE = 5; + + // Packet is sent to a wrong (unintended) network. Example: you trace a + // packet from VM1:Network1 to VM2:Network2, however, the route configured + // in Network1 sends the packet destined for VM2's IP address to Network3. + ROUTE_WRONG_NETWORK = 6; + + // Route's next hop IP address cannot be resolved to a GCP resource. + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; + + // Route's next hop resource is not found. + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; + + // Route's next hop instance doesn't have a NIC in the route's network. + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; + + // Route's next hop IP address is not a primary IP address of the next hop + // instance. + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; + + // Route's next hop forwarding rule doesn't match next hop IP address. + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; + + // Route's next hop VPN tunnel is down (does not have valid IKE SAs). + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; + + // Route's next hop forwarding rule type is invalid (it's not a forwarding + // rule of the internal passthrough load balancer). + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; + + // Packet is sent from the Internet to the private IPv6 address. + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; + + // The packet does not match a policy-based VPN tunnel local selector. + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; + + // The packet does not match a policy-based VPN tunnel remote selector. + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; + + // Packet with internal destination address sent to the internet gateway. + PRIVATE_TRAFFIC_TO_INTERNET = 7; + + // Instance with only an internal IP address tries to access Google API and + // services, but private Google access is not enabled in the subnet. + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; + + // Source endpoint tries to access Google API and services through the VPN + // tunnel to another network, but Private Google Access needs to be enabled + // in the source endpoint network. + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; + + // Instance with only an internal IP address tries to access external hosts, + // but Cloud NAT is not enabled in the subnet, unless special configurations + // on a VM allow this connection. + NO_EXTERNAL_ADDRESS = 9; + + // Destination internal address cannot be resolved to a known target. If + // this is a shared VPC scenario, verify if the service project ID is + // provided as test input. Otherwise, verify if the IP address is being + // used in the project. + UNKNOWN_INTERNAL_ADDRESS = 10; + + // Forwarding rule's protocol and ports do not match the packet header. + FORWARDING_RULE_MISMATCH = 11; + + // Forwarding rule does not have backends configured. + FORWARDING_RULE_NO_INSTANCES = 12; + + // Firewalls block the health check probes to the backends and cause + // the backends to be unavailable for traffic from the load balancer. + // For more details, see [Health check firewall + // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; + + // Packet is sent from or to a Compute Engine instance that is not in a + // running state. + INSTANCE_NOT_RUNNING = 14; + + // Packet sent from or to a GKE cluster that is not in running state. + GKE_CLUSTER_NOT_RUNNING = 27; + + // Packet sent from or to a Cloud SQL instance that is not in running state. + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; + + // Packet sent from or to a Redis Instance that is not in running state. + REDIS_INSTANCE_NOT_RUNNING = 68; + + // Packet sent from or to a Redis Cluster that is not in running state. + REDIS_CLUSTER_NOT_RUNNING = 69; + + // The type of traffic is blocked and the user cannot configure a firewall + // rule to enable it. See [Always blocked + // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for + // more details. + TRAFFIC_TYPE_BLOCKED = 15; + + // Access to Google Kubernetes Engine cluster master's endpoint is not + // authorized. See [Access to the cluster + // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) + // for more details. + GKE_MASTER_UNAUTHORIZED_ACCESS = 16; + + // Access to the Cloud SQL instance endpoint is not authorized. + // See [Authorizing with authorized + // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for + // more details. + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; + + // Packet was dropped inside Google Kubernetes Engine Service. + DROPPED_INSIDE_GKE_SERVICE = 18; + + // Packet was dropped inside Cloud SQL Service. + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; + + // Packet was dropped because there is no peering between the originating + // network and the Google Managed Services Network. + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; + + // Packet was dropped because the Google-managed service uses Private + // Service Connect (PSC), but the PSC endpoint is not found in the project. + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; + + // Packet was dropped because the GKE cluster uses Private Service Connect + // (PSC), but the PSC endpoint is not found in the project. + GKE_PSC_ENDPOINT_MISSING = 36; + + // Packet was dropped because the Cloud SQL instance has neither a private + // nor a public IP address. + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; + + // Packet was dropped because a GKE cluster private endpoint is + // unreachable from a region different from the cluster's region. + GKE_CONTROL_PLANE_REGION_MISMATCH = 30; + + // Packet sent from a public GKE cluster control plane to a private + // IP address. + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; + + // Packet was dropped because there is no route from a GKE cluster + // control plane to a destination network. + GKE_CONTROL_PLANE_NO_ROUTE = 32; + + // Packet sent from a Cloud SQL instance to an external IP address is not + // allowed. The Cloud SQL instance is not configured to send packets to + // external IP addresses. + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; + + // Packet sent from a Cloud SQL instance with only a public IP address to a + // private IP address. + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; + + // Packet was dropped because there is no route from a Cloud SQL + // instance to a destination network. + CLOUD_SQL_INSTANCE_NO_ROUTE = 35; + + // Packet was dropped because the Cloud SQL instance requires all + // connections to use Cloud SQL connectors and to target the Cloud SQL proxy + // port (3307). + CLOUD_SQL_CONNECTOR_REQUIRED = 63; + + // Packet could be dropped because the Cloud Function is not in an active + // status. + CLOUD_FUNCTION_NOT_ACTIVE = 22; + + // Packet could be dropped because no VPC connector is set. + VPC_CONNECTOR_NOT_SET = 23; + + // Packet could be dropped because the VPC connector is not in a running + // state. + VPC_CONNECTOR_NOT_RUNNING = 24; + + // Packet could be dropped because the traffic from the serverless service + // to the VPC connector is not allowed. + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; + + // Packet could be dropped because the health check traffic to the VPC + // connector is not allowed. + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; + + // Packet could be dropped because it was sent from a different region + // to a regional forwarding without global access. + FORWARDING_RULE_REGION_MISMATCH = 25; + + // The Private Service Connect endpoint is in a project that is not approved + // to connect to the service. + PSC_CONNECTION_NOT_ACCEPTED = 26; + + // The packet is sent to the Private Service Connect endpoint over the + // peering, but [it's not + // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule does not have + // global access enabled. + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group), but the producer PSC forwarding rule has multiple ports + // specified. + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; + + // The packet is sent to the Private Service Connect backend (network + // endpoint group) targeting a Cloud SQL service attachment, but this + // configuration is not supported. + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; + + // No NAT subnets are defined for the PSC service attachment. + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; + + // PSC endpoint is accessed via NCC, but PSC transitivity configuration is + // not yet propagated. + PSC_TRANSITIVITY_NOT_PROPAGATED = 64; + + // The packet sent from the hybrid NEG proxy matches a non-dynamic route, + // but such a configuration is not supported. + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; + + // The packet sent from the hybrid NEG proxy matches a dynamic route with a + // next hop in a different region, but such a configuration is not + // supported. + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; + + // Packet sent from a Cloud Run revision that is not ready. + CLOUD_RUN_REVISION_NOT_READY = 29; + + // Packet was dropped inside Private Service Connect service producer. + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; + + // Packet sent to a load balancer, which requires a proxy-only subnet and + // the subnet is not found. + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; + + // Packet sent to Cloud Nat without active NAT IPs. + CLOUD_NAT_NO_ADDRESSES = 40; + + // Packet is stuck in a routing loop. + ROUTING_LOOP = 59; + + // Packet is dropped inside a Google-managed service due to being delivered + // in return trace to an endpoint that doesn't match the endpoint the packet + // was sent from in forward trace. Used only for return traces. + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; + + // Packet is dropped due to a load balancer backend instance not having a + // network interface in the network expected by the load balancer. + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; + + // Packet is dropped due to a backend service named port not being defined + // on the instance group level. + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; + + // Packet is dropped due to a destination IP range being part of a Private + // NAT IP range. + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; + + // Generic drop cause for a packet being dropped inside a Redis Instance + // service project. + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Instance. Port 6379 should be used to connect to a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PORT = 71; + + // Packet is dropped due to connecting from PUPI address to a PSA based + // Redis Instance. + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; + + // Packet is dropped due to no route to the destination network. + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; + + // Redis Instance does not have an external IP address. + REDIS_INSTANCE_NO_EXTERNAL_IP = 74; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Instance. Only TCP connections are accepted by a Redis Instance. + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; + + // Generic drop cause for a packet being dropped inside a Redis Cluster + // service project. + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; + + // Packet is dropped due to an unsupported port being used to connect to a + // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to + // a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PORT = 76; + + // Redis Cluster does not have an external IP address. + REDIS_CLUSTER_NO_EXTERNAL_IP = 77; + + // Packet is dropped due to an unsupported protocol being used to connect to + // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix advertised + // via BGP by the Cloud Router. + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; + + // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due + // to the destination IP address not belonging to any IP prefix included to + // the local traffic selector of the VPN tunnel. + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; + + // Packet from the unknown peered network is dropped due to no known route + // from the source network to the destination IP address. + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + + // Sending packets processed by the Private NAT Gateways to the Private + // Service Connect endpoints is not supported. + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; + } + + // Cause that the packet is dropped. + Cause cause = 1; + + // URI of the resource that caused the drop. + string resource_uri = 2; + + // Source IP address of the dropped packet (if relevant). + string source_ip = 3; + + // Destination IP address of the dropped packet (if relevant). + string destination_ip = 4; + + // Region of the dropped packet (if relevant). + string region = 5; +} + +// For display only. Metadata associated with a Google Kubernetes Engine (GKE) +// cluster master. +message GKEMasterInfo { + // URI of a GKE cluster. + string cluster_uri = 2; + + // URI of a GKE cluster network. + string cluster_network_uri = 4; + + // Internal IP address of a GKE cluster control plane. + string internal_ip = 5; + + // External IP address of a GKE cluster control plane. + string external_ip = 6; + + // DNS endpoint of a GKE cluster control plane. + string dns_endpoint = 7; +} + +// For display only. Metadata associated with a Cloud SQL instance. +message CloudSQLInstanceInfo { + // Name of a Cloud SQL instance. + string display_name = 1; + + // URI of a Cloud SQL instance. + string uri = 2; + + // URI of a Cloud SQL instance network or empty string if the instance does + // not have one. + string network_uri = 4; + + // Internal IP address of a Cloud SQL instance. + string internal_ip = 5; + + // External IP address of a Cloud SQL instance. + string external_ip = 6; + + // Region in which the Cloud SQL instance is running. + string region = 7; +} + +// For display only. Metadata associated with a Cloud Redis Instance. +message RedisInstanceInfo { + // Name of a Cloud Redis Instance. + string display_name = 1; + + // URI of a Cloud Redis Instance. + string uri = 2; + + // URI of a Cloud Redis Instance network. + string network_uri = 3; + + // Primary endpoint IP address of a Cloud Redis Instance. + string primary_endpoint_ip = 4; + + // Read endpoint IP address of a Cloud Redis Instance (if applicable). + string read_endpoint_ip = 5; + + // Region in which the Cloud Redis Instance is defined. + string region = 6; +} + +// For display only. Metadata associated with a Redis Cluster. +message RedisClusterInfo { + // Name of a Redis Cluster. + string display_name = 1; + + // URI of a Redis Cluster in format + // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" + string uri = 2; + + // URI of a Redis Cluster network in format + // "projects/{project_id}/global/networks/{network_id}". + string network_uri = 3; + + // Discovery endpoint IP address of a Redis Cluster. + string discovery_endpoint_ip_address = 4 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Secondary endpoint IP address of a Redis Cluster. + string secondary_endpoint_ip_address = 5 + [(google.api.field_info).format = IPV4_OR_IPV6]; + + // Name of the region in which the Redis Cluster is defined. For example, + // "us-central1". + string location = 6; +} + +// For display only. Metadata associated with a Cloud Function. +message CloudFunctionInfo { + // Name of a Cloud Function. + string display_name = 1; + + // URI of a Cloud Function. + string uri = 2; + + // Location in which the Cloud Function is deployed. + string location = 3; + + // Latest successfully deployed version id of the Cloud Function. + int64 version_id = 4; +} + +// For display only. Metadata associated with a Cloud Run revision. +message CloudRunRevisionInfo { + // Name of a Cloud Run revision. + string display_name = 1; + + // URI of a Cloud Run revision. + string uri = 2; + + // Location in which this revision is deployed. + string location = 4; + + // URI of Cloud Run service this revision belongs to. + string service_uri = 5; +} + +// For display only. Metadata associated with an App Engine version. +message AppEngineVersionInfo { + // Name of an App Engine version. + string display_name = 1; + + // URI of an App Engine version. + string uri = 2; + + // Runtime of the App Engine version. + string runtime = 3; + + // App Engine execution environment for a version. + string environment = 4; +} + +// For display only. Metadata associated with a VPC connector. +message VpcConnectorInfo { + // Name of a VPC connector. + string display_name = 1; + + // URI of a VPC connector. + string uri = 2; + + // Location in which the VPC connector is deployed. + string location = 3; +} + +// For display only. Metadata associated with NAT. +message NatInfo { + // Types of NAT. + enum Type { + // Type is unspecified. + TYPE_UNSPECIFIED = 0; + + // From Compute Engine instance's internal address to external address. + INTERNAL_TO_EXTERNAL = 1; + + // From Compute Engine instance's external address to internal address. + EXTERNAL_TO_INTERNAL = 2; + + // Cloud NAT Gateway. + CLOUD_NAT = 3; + + // Private service connect NAT. + PRIVATE_SERVICE_CONNECT = 4; + } + + // Type of NAT. + Type type = 1; + + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 2; + + // URI of the network where NAT translation takes place. + string network_uri = 3; + + // Source IP address before NAT translation. + string old_source_ip = 4; + + // Source IP address after NAT translation. + string new_source_ip = 5; + + // Destination IP address before NAT translation. + string old_destination_ip = 6; + + // Destination IP address after NAT translation. + string new_destination_ip = 7; + + // Source port before NAT translation. Only valid when protocol is TCP or UDP. + int32 old_source_port = 8; + + // Source port after NAT translation. Only valid when protocol is TCP or UDP. + int32 new_source_port = 9; + + // Destination port before NAT translation. Only valid when protocol is TCP or + // UDP. + int32 old_destination_port = 10; + + // Destination port after NAT translation. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 11; + + // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. + string router_uri = 12; + + // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. + string nat_gateway_name = 13; +} + +// For display only. Metadata associated with ProxyConnection. +message ProxyConnectionInfo { + // IP protocol in string format, for example: "TCP", "UDP", "ICMP". + string protocol = 1; + + // Source IP address of an original connection. + string old_source_ip = 2; + + // Source IP address of a new connection. + string new_source_ip = 3; + + // Destination IP address of an original connection + string old_destination_ip = 4; + + // Destination IP address of a new connection. + string new_destination_ip = 5; + + // Source port of an original connection. Only valid when protocol is TCP or + // UDP. + int32 old_source_port = 6; + + // Source port of a new connection. Only valid when protocol is TCP or UDP. + int32 new_source_port = 7; + + // Destination port of an original connection. Only valid when protocol is TCP + // or UDP. + int32 old_destination_port = 8; + + // Destination port of a new connection. Only valid when protocol is TCP or + // UDP. + int32 new_destination_port = 9; + + // Uri of proxy subnet. + string subnet_uri = 10; + + // URI of the network where connection is proxied. + string network_uri = 11; +} + +// For display only. Metadata associated with the load balancer backend. +message LoadBalancerBackendInfo { + // Health check firewalls configuration state enum. + enum HealthCheckFirewallsConfigState { + // Configuration state unspecified. It usually means that the backend has + // no health check attached, or there was an unexpected configuration error + // preventing Connectivity tests from verifying health check configuration. + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; + + // Firewall rules (policies) allowing health check traffic from all required + // IP ranges to the backend are configured. + FIREWALLS_CONFIGURED = 1; + + // Firewall rules (policies) allow health check traffic only from a part of + // required IP ranges. + FIREWALLS_PARTIALLY_CONFIGURED = 2; + + // Firewall rules (policies) deny health check traffic from all required + // IP ranges to the backend. + FIREWALLS_NOT_CONFIGURED = 3; + + // The network contains firewall rules of unsupported types, so Connectivity + // tests were not able to verify health check configuration status. Please + // refer to the documentation for the list of unsupported configurations: + // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs + FIREWALLS_UNSUPPORTED = 4; + } + + // Display name of the backend. For example, it might be an instance name for + // the instance group backends, or an IP address and port for zonal network + // endpoint group backends. + string name = 1; + + // URI of the backend instance (if applicable). Populated for instance group + // backends, and zonal NEG backends. + string instance_uri = 2; + + // URI of the backend service this backend belongs to (if applicable). + string backend_service_uri = 3; + + // URI of the instance group this backend belongs to (if applicable). + string instance_group_uri = 4; + + // URI of the network endpoint group this backend belongs to (if applicable). + string network_endpoint_group_uri = 5; + + // URI of the backend bucket this backend targets (if applicable). + string backend_bucket_uri = 8; + + // URI of the PSC service attachment this PSC NEG backend targets (if + // applicable). + string psc_service_attachment_uri = 9; + + // PSC Google API target this PSC NEG backend targets (if applicable). + string psc_google_api_target = 10; + + // URI of the health check attached to this backend (if applicable). + string health_check_uri = 6; + + // Output only. Health check firewalls configuration state for the backend. + // This is a result of the static firewall analysis (verifying that health + // check traffic from required IP ranges to the backend is allowed or not). + // The backend might still be unhealthy even if these firewalls are + // configured. Please refer to the documentation for more information: + // https://cloud.google.com/load-balancing/docs/firewall-rules + HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Type of a load balancer. For more information, see [Summary of Google Cloud +// load +// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). +enum LoadBalancerType { + // Forwarding rule points to a different target than a load balancer or a + // load balancer type is unknown. + LOAD_BALANCER_TYPE_UNSPECIFIED = 0; + + // Global external HTTP(S) load balancer. + HTTPS_ADVANCED_LOAD_BALANCER = 1; + + // Global external HTTP(S) load balancer (classic) + HTTPS_LOAD_BALANCER = 2; + + // Regional external HTTP(S) load balancer. + REGIONAL_HTTPS_LOAD_BALANCER = 3; + + // Internal HTTP(S) load balancer. + INTERNAL_HTTPS_LOAD_BALANCER = 4; + + // External SSL proxy load balancer. + SSL_PROXY_LOAD_BALANCER = 5; + + // External TCP proxy load balancer. + TCP_PROXY_LOAD_BALANCER = 6; + + // Internal regional TCP proxy load balancer. + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; + + // External TCP/UDP Network load balancer. + NETWORK_LOAD_BALANCER = 8; + + // Target-pool based external TCP/UDP Network load balancer. + LEGACY_NETWORK_LOAD_BALANCER = 9; + + // Internal TCP/UDP load balancer. + TCP_UDP_INTERNAL_LOAD_BALANCER = 10; +} + +// For display only. Metadata associated with Storage Bucket. +message StorageBucketInfo { + // Cloud Storage Bucket name. + string bucket = 1; +} + +// For display only. Metadata associated with the serverless network endpoint +// group backend. +message ServerlessNegInfo { + // URI of the serverless network endpoint group. + string neg_uri = 1; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto new file mode 100644 index 00000000000..bb6d06d3af6 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto @@ -0,0 +1,228 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networkmanagement/v1beta1/reachability.proto"; +import "google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "VpcFlowLogsProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// The VPC Flow Logs service in the Google Cloud Network Management API provides +// configurations that generate Flow Logs. The service and the configuration +// resources created using this service are global. +service VpcFlowLogsService { + option (google.api.default_host) = "networkmanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists all `VpcFlowLogsConfigs` in a given project. + rpc ListVpcFlowLogsConfigs(ListVpcFlowLogsConfigsRequest) + returns (ListVpcFlowLogsConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the details of a specific `VpcFlowLogsConfig`. + rpc GetVpcFlowLogsConfig(GetVpcFlowLogsConfigRequest) + returns (VpcFlowLogsConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new `VpcFlowLogsConfig`. + // If a configuration with the exact same settings already exists (even if the + // ID is different), the creation fails. + // Notes: + // 1. Creating a configuration with state=DISABLED will fail. + // 2. The following fields are not considrered as `settings` for the purpose + // of the check mentioned above, therefore - creating another configuration + // with the same fields but different values for the following fields will + // fail as well: + // - name + // - create_time + // - update_time + // - labels + // - description + rpc CreateVpcFlowLogsConfig(CreateVpcFlowLogsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" + body: "vpc_flow_logs_config" + }; + option (google.api.method_signature) = + "parent,vpc_flow_logs_config,vpc_flow_logs_config_id"; + option (google.longrunning.operation_info) = { + response_type: "VpcFlowLogsConfig" + metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }; + } + + // Updates an existing `VpcFlowLogsConfig`. + // If a configuration with the exact same settings already exists (even if the + // ID is different), the creation fails. + // Notes: + // 1. The following fields are not considrered as `settings` for the purpose + // of the check mentioned above, therefore - updating another configuration + // with the same fields but different values for the following fields will + // fail as well: + // - name + // - create_time + // - update_time + // - labels + // - description + rpc UpdateVpcFlowLogsConfig(UpdateVpcFlowLogsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + body: "vpc_flow_logs_config" + }; + option (google.api.method_signature) = "vpc_flow_logs_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "VpcFlowLogsConfig" + metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }; + } + + // Deletes a specific `VpcFlowLogsConfig`. + rpc DeleteVpcFlowLogsConfig(DeleteVpcFlowLogsConfigRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }; + } +} + +// Request for the `ListVpcFlowLogsConfigs` method. +message ListVpcFlowLogsConfigsRequest { + // Required. The parent resource of the VpcFlowLogsConfig: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; + + // Optional. Number of `VpcFlowLogsConfigs` to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token from an earlier query, as returned in + // `next_page_token`. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + // A filter expression must use the supported [CEL logic operators] + // (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for the `ListVpcFlowLogsConfigs` method. +message ListVpcFlowLogsConfigsResponse { + // List of VPC Flow Log configurations. + repeated VpcFlowLogsConfig vpc_flow_logs_configs = 1; + + // Page token to fetch the next set of configurations. + string next_page_token = 2; + + // Locations that could not be reached (when querying all locations with `-`). + repeated string unreachable = 3; +} + +// Request for the `GetVpcFlowLogsConfig` method. +message GetVpcFlowLogsConfigRequest { + // Required. `VpcFlowLogsConfig` resource name using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; +} + +// Request for the `CreateVpcFlowLogsConfig` method. +message CreateVpcFlowLogsConfigRequest { + // Required. The parent resource of the VPC Flow Logs configuration to create: + // `projects/{project_id}/locations/global` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; + + // Required. ID of the `VpcFlowLogsConfig`. + string vpc_flow_logs_config_id = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; + + // Required. A `VpcFlowLogsConfig` resource + VpcFlowLogsConfig vpc_flow_logs_config = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `UpdateVpcFlowLogsConfig` method. +message UpdateVpcFlowLogsConfigRequest { + // Required. Mask of fields to update. At least one path must be supplied in + // this field. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in update_mask are updated. + VpcFlowLogsConfig vpc_flow_logs_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request for the `DeleteVpcFlowLogsConfig` method. +message DeleteVpcFlowLogsConfigRequest { + // Required. `VpcFlowLogsConfig` resource name using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + ]; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto new file mode 100644 index 00000000000..03137065ab0 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto @@ -0,0 +1,152 @@ +// 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.networkmanagement.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; +option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; +option java_multiple_files = true; +option java_outer_classname = "VpcFlowLogsConfigProto"; +option java_package = "com.google.cloud.networkmanagement.v1beta1"; +option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; +option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; + +// A configuration to generate VPC Flow Logs. +message VpcFlowLogsConfig { + option (google.api.resource) = { + type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" + pattern: "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}" + plural: "vpcFlowLogsConfigs" + singular: "vpcFlowLogsConfig" + }; + + // Determines whether this configuration will be generating logs. + // Setting state=DISABLED will pause the log generation for this config. + enum State { + // If not specified, will default to ENABLED. + STATE_UNSPECIFIED = 0; + + // When ENABLED, this configuration will generate logs. + ENABLED = 1; + + // When DISABLED, this configuration will not generate logs. + DISABLED = 2; + } + + // Toggles the aggregation interval for collecting flow logs by 5-tuple. + enum AggregationInterval { + // If not specified, will default to INTERVAL_5_SEC. + AGGREGATION_INTERVAL_UNSPECIFIED = 0; + + // Aggregate logs in 5s intervals. + INTERVAL_5_SEC = 1; + + // Aggregate logs in 30s intervals. + INTERVAL_30_SEC = 2; + + // Aggregate logs in 1m intervals. + INTERVAL_1_MIN = 3; + + // Aggregate logs in 5m intervals. + INTERVAL_5_MIN = 4; + + // Aggregate logs in 10m intervals. + INTERVAL_10_MIN = 5; + + // Aggregate logs in 15m intervals. + INTERVAL_15_MIN = 6; + } + + // Configures which log fields would be included. + enum Metadata { + // If not specified, will default to INCLUDE_ALL_METADATA. + METADATA_UNSPECIFIED = 0; + + // Include all metadata fields. + INCLUDE_ALL_METADATA = 1; + + // Exclude all metadata fields. + EXCLUDE_ALL_METADATA = 2; + + // Include only custom fields (specified in metadata_fields). + CUSTOM_METADATA = 3; + } + + // Identifier. Unique name of the configuration using the form: + // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The user-supplied description of the VPC Flow Logs configuration. + // Maximum of 512 characters. + optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The state of the VPC Flow Log configuration. Default value is + // ENABLED. When creating a new configuration, it must be enabled. + optional State state = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The aggregation interval for the logs. Default value is + // INTERVAL_5_SEC. + optional AggregationInterval aggregation_interval = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The value of the field must be in (0, 1]. The sampling rate of + // VPC Flow Logs where 1.0 means all collected logs are reported. Setting the + // sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, + // use the state field instead. Default value is 1.0. + optional float flow_sampling = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configures whether all, none or a subset of metadata fields + // should be added to the reported VPC flow logs. Default value is + // INCLUDE_ALL_METADATA. + optional Metadata metadata = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom metadata fields to include in the reported VPC flow logs. + // Can only be specified if "metadata" was set to CUSTOM_METADATA. + repeated string metadata_fields = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Export filter used to define which VPC Flow Logs should be + // logged. + optional string filter_expr = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Reference to the resource of the config scope. That is, the scope from + // which traffic is logged. The target resource must belong to the same + // project as the configuration. + oneof target_resource { + // Traffic will be logged from the Interconnect Attachment. + // Format: + // projects/{project_id}/regions/{region}/interconnectAttachments/{name} + string interconnect_attachment = 102; + + // Traffic will be logged from the VPN Tunnel. + // Format: projects/{project_id}/regions/{region}/vpnTunnels/{name} + string vpn_tunnel = 103; + } + + // Optional. Resource labels to represent user-provided metadata. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time the config was created. + google.protobuf.Timestamp create_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the config was updated. + google.protobuf.Timestamp update_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts new file mode 100644 index 00000000000..e4ee0905dff --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts @@ -0,0 +1,15637 @@ +// 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 networkmanagement. */ + namespace networkmanagement { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Properties of a ConnectivityTest. */ + interface IConnectivityTest { + + /** ConnectivityTest name */ + name?: (string|null); + + /** ConnectivityTest description */ + description?: (string|null); + + /** ConnectivityTest source */ + source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest destination */ + destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest protocol */ + protocol?: (string|null); + + /** ConnectivityTest relatedProjects */ + relatedProjects?: (string[]|null); + + /** ConnectivityTest displayName */ + displayName?: (string|null); + + /** ConnectivityTest labels */ + labels?: ({ [k: string]: string }|null); + + /** ConnectivityTest createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails */ + reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails */ + probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks */ + bypassFirewallChecks?: (boolean|null); + } + + /** Represents a ConnectivityTest. */ + class ConnectivityTest implements IConnectivityTest { + + /** + * Constructs a new ConnectivityTest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest); + + /** ConnectivityTest name. */ + public name: string; + + /** ConnectivityTest description. */ + public description: string; + + /** ConnectivityTest source. */ + public source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest destination. */ + public destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); + + /** ConnectivityTest protocol. */ + public protocol: string; + + /** ConnectivityTest relatedProjects. */ + public relatedProjects: string[]; + + /** ConnectivityTest displayName. */ + public displayName: string; + + /** ConnectivityTest labels. */ + public labels: { [k: string]: string }; + + /** ConnectivityTest createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ConnectivityTest reachabilityDetails. */ + public reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); + + /** ConnectivityTest probingDetails. */ + public probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); + + /** ConnectivityTest bypassFirewallChecks. */ + public bypassFirewallChecks: boolean; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectivityTest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @param message ConnectivityTest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Verifies a ConnectivityTest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectivityTest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ConnectivityTest; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @param message ConnectivityTest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectivityTest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConnectivityTest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Endpoint. */ + interface IEndpoint { + + /** Endpoint ipAddress */ + ipAddress?: (string|null); + + /** Endpoint port */ + port?: (number|null); + + /** Endpoint instance */ + instance?: (string|null); + + /** Endpoint forwardingRule */ + forwardingRule?: (string|null); + + /** Endpoint forwardingRuleTarget */ + forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId */ + loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster */ + gkeMasterCluster?: (string|null); + + /** Endpoint fqdn */ + fqdn?: (string|null); + + /** Endpoint cloudSqlInstance */ + cloudSqlInstance?: (string|null); + + /** Endpoint redisInstance */ + redisInstance?: (string|null); + + /** Endpoint redisCluster */ + redisCluster?: (string|null); + + /** Endpoint cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network */ + network?: (string|null); + + /** Endpoint networkType */ + networkType?: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null); + + /** Endpoint projectId */ + projectId?: (string|null); + } + + /** Represents an Endpoint. */ + class Endpoint implements IEndpoint { + + /** + * Constructs a new Endpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint); + + /** Endpoint ipAddress. */ + public ipAddress: string; + + /** Endpoint port. */ + public port: number; + + /** Endpoint instance. */ + public instance: string; + + /** Endpoint forwardingRule. */ + public forwardingRule: string; + + /** Endpoint forwardingRuleTarget. */ + public forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); + + /** Endpoint loadBalancerId. */ + public loadBalancerId?: (string|null); + + /** Endpoint loadBalancerType. */ + public loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); + + /** Endpoint gkeMasterCluster. */ + public gkeMasterCluster: string; + + /** Endpoint fqdn. */ + public fqdn: string; + + /** Endpoint cloudSqlInstance. */ + public cloudSqlInstance: string; + + /** Endpoint redisInstance. */ + public redisInstance: string; + + /** Endpoint redisCluster. */ + public redisCluster: string; + + /** Endpoint cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); + + /** Endpoint appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); + + /** Endpoint cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); + + /** Endpoint network. */ + public network: string; + + /** Endpoint networkType. */ + public networkType: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType); + + /** Endpoint projectId. */ + public projectId: string; + + /** Endpoint _forwardingRuleTarget. */ + public _forwardingRuleTarget?: "forwardingRuleTarget"; + + /** Endpoint _loadBalancerId. */ + public _loadBalancerId?: "loadBalancerId"; + + /** Endpoint _loadBalancerType. */ + public _loadBalancerType?: "loadBalancerType"; + + /** + * Creates a new Endpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns Endpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @param message Endpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Verifies an Endpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Endpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @param message Endpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Endpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Endpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Endpoint { + + /** NetworkType enum. */ + enum NetworkType { + NETWORK_TYPE_UNSPECIFIED = 0, + GCP_NETWORK = 1, + NON_GCP_NETWORK = 2 + } + + /** ForwardingRuleTarget enum. */ + enum ForwardingRuleTarget { + FORWARDING_RULE_TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + LOAD_BALANCER = 2, + VPN_GATEWAY = 3, + PSC = 4 + } + + /** Properties of a CloudFunctionEndpoint. */ + interface ICloudFunctionEndpoint { + + /** CloudFunctionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudFunctionEndpoint. */ + class CloudFunctionEndpoint implements ICloudFunctionEndpoint { + + /** + * Constructs a new CloudFunctionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint); + + /** CloudFunctionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @param message CloudFunctionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Verifies a CloudFunctionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @param message CloudFunctionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionEndpoint. */ + interface IAppEngineVersionEndpoint { + + /** AppEngineVersionEndpoint uri */ + uri?: (string|null); + } + + /** Represents an AppEngineVersionEndpoint. */ + class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { + + /** + * Constructs a new AppEngineVersionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint); + + /** AppEngineVersionEndpoint uri. */ + public uri: string; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @param message AppEngineVersionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @param message AppEngineVersionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionEndpoint. */ + interface ICloudRunRevisionEndpoint { + + /** CloudRunRevisionEndpoint uri */ + uri?: (string|null); + } + + /** Represents a CloudRunRevisionEndpoint. */ + class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint); + + /** CloudRunRevisionEndpoint uri. */ + public uri: string; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionEndpoint instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @param message CloudRunRevisionEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @param message CloudRunRevisionEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ReachabilityDetails. */ + interface IReachabilityDetails { + + /** ReachabilityDetails result */ + result?: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null); + + /** ReachabilityDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error */ + error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces */ + traces?: (google.cloud.networkmanagement.v1beta1.ITrace[]|null); + } + + /** Represents a ReachabilityDetails. */ + class ReachabilityDetails implements IReachabilityDetails { + + /** + * Constructs a new ReachabilityDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails); + + /** ReachabilityDetails result. */ + public result: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result); + + /** ReachabilityDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ReachabilityDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ReachabilityDetails traces. */ + public traces: google.cloud.networkmanagement.v1beta1.ITrace[]; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ReachabilityDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @param message ReachabilityDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Verifies a ReachabilityDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReachabilityDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @param message ReachabilityDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReachabilityDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReachabilityDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ReachabilityDetails { + + /** Result enum. */ + enum Result { + RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + AMBIGUOUS = 4, + UNDETERMINED = 5 + } + } + + /** Properties of a LatencyPercentile. */ + interface ILatencyPercentile { + + /** LatencyPercentile percent */ + percent?: (number|null); + + /** LatencyPercentile latencyMicros */ + latencyMicros?: (number|Long|string|null); + } + + /** Represents a LatencyPercentile. */ + class LatencyPercentile implements ILatencyPercentile { + + /** + * Constructs a new LatencyPercentile. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile); + + /** LatencyPercentile percent. */ + public percent: number; + + /** LatencyPercentile latencyMicros. */ + public latencyMicros: (number|Long|string); + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyPercentile instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @param message LatencyPercentile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Verifies a LatencyPercentile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyPercentile + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyPercentile; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @param message LatencyPercentile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyPercentile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyPercentile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LatencyDistribution. */ + interface ILatencyDistribution { + + /** LatencyDistribution latencyPercentiles */ + latencyPercentiles?: (google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]|null); + } + + /** Represents a LatencyDistribution. */ + class LatencyDistribution implements ILatencyDistribution { + + /** + * Constructs a new LatencyDistribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution); + + /** LatencyDistribution latencyPercentiles. */ + public latencyPercentiles: google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @param [properties] Properties to set + * @returns LatencyDistribution instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @param message LatencyDistribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Verifies a LatencyDistribution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatencyDistribution + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyDistribution; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @param message LatencyDistribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatencyDistribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatencyDistribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProbingDetails. */ + interface IProbingDetails { + + /** ProbingDetails result */ + result?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null); + + /** ProbingDetails verifyTime */ + verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error */ + error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause */ + abortCause?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null); + + /** ProbingDetails sentProbeCount */ + sentProbeCount?: (number|null); + + /** ProbingDetails successfulProbeCount */ + successfulProbeCount?: (number|null); + + /** ProbingDetails endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** ProbingDetails probingLatency */ + probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation */ + destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); + } + + /** Represents a ProbingDetails. */ + class ProbingDetails implements IProbingDetails { + + /** + * Constructs a new ProbingDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails); + + /** ProbingDetails result. */ + public result: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult); + + /** ProbingDetails verifyTime. */ + public verifyTime?: (google.protobuf.ITimestamp|null); + + /** ProbingDetails error. */ + public error?: (google.rpc.IStatus|null); + + /** ProbingDetails abortCause. */ + public abortCause: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause); + + /** ProbingDetails sentProbeCount. */ + public sentProbeCount: number; + + /** ProbingDetails successfulProbeCount. */ + public successfulProbeCount: number; + + /** ProbingDetails endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** ProbingDetails probingLatency. */ + public probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); + + /** ProbingDetails destinationEgressLocation. */ + public destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ProbingDetails instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @param message ProbingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Verifies a ProbingDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProbingDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @param message ProbingDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProbingDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProbingDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProbingDetails { + + /** ProbingResult enum. */ + enum ProbingResult { + PROBING_RESULT_UNSPECIFIED = 0, + REACHABLE = 1, + UNREACHABLE = 2, + REACHABILITY_INCONSISTENT = 3, + UNDETERMINED = 4 + } + + /** ProbingAbortCause enum. */ + enum ProbingAbortCause { + PROBING_ABORT_CAUSE_UNSPECIFIED = 0, + PERMISSION_DENIED = 1, + NO_SOURCE_LOCATION = 2 + } + + /** Properties of an EdgeLocation. */ + interface IEdgeLocation { + + /** EdgeLocation metropolitanArea */ + metropolitanArea?: (string|null); + } + + /** Represents an EdgeLocation. */ + class EdgeLocation implements IEdgeLocation { + + /** + * Constructs a new EdgeLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation); + + /** EdgeLocation metropolitanArea. */ + public metropolitanArea: string; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns EdgeLocation instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @param message EdgeLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Verifies an EdgeLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EdgeLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @param message EdgeLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EdgeLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EdgeLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Trace. */ + interface ITrace { + + /** Trace endpointInfo */ + endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Trace steps */ + steps?: (google.cloud.networkmanagement.v1beta1.IStep[]|null); + + /** Trace forwardTraceId */ + forwardTraceId?: (number|null); + } + + /** Represents a Trace. */ + class Trace implements ITrace { + + /** + * Constructs a new Trace. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ITrace); + + /** Trace endpointInfo. */ + public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Trace steps. */ + public steps: google.cloud.networkmanagement.v1beta1.IStep[]; + + /** Trace forwardTraceId. */ + public forwardTraceId: number; + + /** + * Creates a new Trace instance using the specified properties. + * @param [properties] Properties to set + * @returns Trace instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ITrace): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @param message Trace message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Verifies a Trace message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trace + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Trace; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @param message Trace + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trace to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trace + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Step. */ + interface IStep { + + /** Step description */ + description?: (string|null); + + /** Step state */ + state?: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State|null); + + /** Step causesDrop */ + causesDrop?: (boolean|null); + + /** Step projectId */ + projectId?: (string|null); + + /** Step instance */ + instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); + + /** Step firewall */ + firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); + + /** Step route */ + route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); + + /** Step endpoint */ + endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Step googleService */ + googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); + + /** Step forwardingRule */ + forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); + + /** Step vpnGateway */ + vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); + + /** Step vpnTunnel */ + vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); + + /** Step vpcConnector */ + vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); + + /** Step deliver */ + deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); + + /** Step forward */ + forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); + + /** Step abort */ + abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); + + /** Step drop */ + drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); + + /** Step loadBalancer */ + loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); + + /** Step network */ + network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); + + /** Step gkeMaster */ + gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance */ + cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance */ + redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); + + /** Step redisCluster */ + redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); + + /** Step cloudFunction */ + cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); + + /** Step appEngineVersion */ + appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision */ + cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); + + /** Step nat */ + nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); + + /** Step proxyConnection */ + proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo */ + loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket */ + storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); + + /** Step serverlessNeg */ + serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); + } + + /** Represents a Step. */ + class Step implements IStep { + + /** + * Constructs a new Step. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IStep); + + /** Step description. */ + public description: string; + + /** Step state. */ + public state: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State); + + /** Step causesDrop. */ + public causesDrop: boolean; + + /** Step projectId. */ + public projectId: string; + + /** Step instance. */ + public instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); + + /** Step firewall. */ + public firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); + + /** Step route. */ + public route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); + + /** Step endpoint. */ + public endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); + + /** Step googleService. */ + public googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); + + /** Step forwardingRule. */ + public forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); + + /** Step vpnGateway. */ + public vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); + + /** Step vpnTunnel. */ + public vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); + + /** Step vpcConnector. */ + public vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); + + /** Step deliver. */ + public deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); + + /** Step forward. */ + public forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); + + /** Step abort. */ + public abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); + + /** Step drop. */ + public drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); + + /** Step loadBalancer. */ + public loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); + + /** Step network. */ + public network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); + + /** Step gkeMaster. */ + public gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); + + /** Step cloudSqlInstance. */ + public cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); + + /** Step redisInstance. */ + public redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); + + /** Step redisCluster. */ + public redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); + + /** Step cloudFunction. */ + public cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); + + /** Step appEngineVersion. */ + public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); + + /** Step cloudRunRevision. */ + public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); + + /** Step nat. */ + public nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); + + /** Step proxyConnection. */ + public proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); + + /** Step loadBalancerBackendInfo. */ + public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); + + /** Step storageBucket. */ + public storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); + + /** Step serverlessNeg. */ + public serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); + + /** Step stepInfo. */ + public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); + + /** + * Creates a new Step instance using the specified properties. + * @param [properties] Properties to set + * @returns Step instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IStep): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @param message Step message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Step message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Verifies a Step message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Step + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Step; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @param message Step + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Step to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Step + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Step { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + START_FROM_INSTANCE = 1, + START_FROM_INTERNET = 2, + START_FROM_GOOGLE_SERVICE = 27, + START_FROM_PRIVATE_NETWORK = 3, + START_FROM_GKE_MASTER = 21, + START_FROM_CLOUD_SQL_INSTANCE = 22, + START_FROM_REDIS_INSTANCE = 32, + START_FROM_REDIS_CLUSTER = 33, + START_FROM_CLOUD_FUNCTION = 23, + START_FROM_APP_ENGINE_VERSION = 25, + START_FROM_CLOUD_RUN_REVISION = 26, + START_FROM_STORAGE_BUCKET = 29, + START_FROM_PSC_PUBLISHED_SERVICE = 30, + START_FROM_SERVERLESS_NEG = 31, + APPLY_INGRESS_FIREWALL_RULE = 4, + APPLY_EGRESS_FIREWALL_RULE = 5, + APPLY_ROUTE = 6, + APPLY_FORWARDING_RULE = 7, + ANALYZE_LOAD_BALANCER_BACKEND = 28, + SPOOFING_APPROVED = 8, + ARRIVE_AT_INSTANCE = 9, + ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, + ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, + ARRIVE_AT_VPN_GATEWAY = 12, + ARRIVE_AT_VPN_TUNNEL = 13, + ARRIVE_AT_VPC_CONNECTOR = 24, + NAT = 14, + PROXY_CONNECTION = 15, + DELIVER = 16, + DROP = 17, + FORWARD = 18, + ABORT = 19, + VIEWER_PERMISSION_MISSING = 20 + } + } + + /** Properties of an InstanceInfo. */ + interface IInstanceInfo { + + /** InstanceInfo displayName */ + displayName?: (string|null); + + /** InstanceInfo uri */ + uri?: (string|null); + + /** InstanceInfo interface */ + "interface"?: (string|null); + + /** InstanceInfo networkUri */ + networkUri?: (string|null); + + /** InstanceInfo internalIp */ + internalIp?: (string|null); + + /** InstanceInfo externalIp */ + externalIp?: (string|null); + + /** InstanceInfo networkTags */ + networkTags?: (string[]|null); + + /** InstanceInfo serviceAccount */ + serviceAccount?: (string|null); + + /** InstanceInfo pscNetworkAttachmentUri */ + pscNetworkAttachmentUri?: (string|null); + } + + /** Represents an InstanceInfo. */ + class InstanceInfo implements IInstanceInfo { + + /** + * Constructs a new InstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo); + + /** InstanceInfo displayName. */ + public displayName: string; + + /** InstanceInfo uri. */ + public uri: string; + + /** InstanceInfo interface. */ + public interface: string; + + /** InstanceInfo networkUri. */ + public networkUri: string; + + /** InstanceInfo internalIp. */ + public internalIp: string; + + /** InstanceInfo externalIp. */ + public externalIp: string; + + /** InstanceInfo networkTags. */ + public networkTags: string[]; + + /** InstanceInfo serviceAccount. */ + public serviceAccount: string; + + /** InstanceInfo pscNetworkAttachmentUri. */ + public pscNetworkAttachmentUri: string; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns InstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @param message InstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Verifies an InstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.InstanceInfo; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @param message InstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkInfo. */ + interface INetworkInfo { + + /** NetworkInfo displayName */ + displayName?: (string|null); + + /** NetworkInfo uri */ + uri?: (string|null); + + /** NetworkInfo matchedSubnetUri */ + matchedSubnetUri?: (string|null); + + /** NetworkInfo matchedIpRange */ + matchedIpRange?: (string|null); + + /** NetworkInfo region */ + region?: (string|null); + } + + /** Represents a NetworkInfo. */ + class NetworkInfo implements INetworkInfo { + + /** + * Constructs a new NetworkInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo); + + /** NetworkInfo displayName. */ + public displayName: string; + + /** NetworkInfo uri. */ + public uri: string; + + /** NetworkInfo matchedSubnetUri. */ + public matchedSubnetUri: string; + + /** NetworkInfo matchedIpRange. */ + public matchedIpRange: string; + + /** NetworkInfo region. */ + public region: string; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @param message NetworkInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Verifies a NetworkInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NetworkInfo; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @param message NetworkInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FirewallInfo. */ + interface IFirewallInfo { + + /** FirewallInfo displayName */ + displayName?: (string|null); + + /** FirewallInfo uri */ + uri?: (string|null); + + /** FirewallInfo direction */ + direction?: (string|null); + + /** FirewallInfo action */ + action?: (string|null); + + /** FirewallInfo priority */ + priority?: (number|null); + + /** FirewallInfo networkUri */ + networkUri?: (string|null); + + /** FirewallInfo targetTags */ + targetTags?: (string[]|null); + + /** FirewallInfo targetServiceAccounts */ + targetServiceAccounts?: (string[]|null); + + /** FirewallInfo policy */ + policy?: (string|null); + + /** FirewallInfo policyUri */ + policyUri?: (string|null); + + /** FirewallInfo firewallRuleType */ + firewallRuleType?: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null); + } + + /** Represents a FirewallInfo. */ + class FirewallInfo implements IFirewallInfo { + + /** + * Constructs a new FirewallInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo); + + /** FirewallInfo displayName. */ + public displayName: string; + + /** FirewallInfo uri. */ + public uri: string; + + /** FirewallInfo direction. */ + public direction: string; + + /** FirewallInfo action. */ + public action: string; + + /** FirewallInfo priority. */ + public priority: number; + + /** FirewallInfo networkUri. */ + public networkUri: string; + + /** FirewallInfo targetTags. */ + public targetTags: string[]; + + /** FirewallInfo targetServiceAccounts. */ + public targetServiceAccounts: string[]; + + /** FirewallInfo policy. */ + public policy: string; + + /** FirewallInfo policyUri. */ + public policyUri: string; + + /** FirewallInfo firewallRuleType. */ + public firewallRuleType: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType); + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FirewallInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @param message FirewallInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Verifies a FirewallInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirewallInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.FirewallInfo; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @param message FirewallInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirewallInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirewallInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FirewallInfo { + + /** FirewallRuleType enum. */ + enum FirewallRuleType { + FIREWALL_RULE_TYPE_UNSPECIFIED = 0, + HIERARCHICAL_FIREWALL_POLICY_RULE = 1, + VPC_FIREWALL_RULE = 2, + IMPLIED_VPC_FIREWALL_RULE = 3, + SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, + NETWORK_FIREWALL_POLICY_RULE = 5, + NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, + UNSUPPORTED_FIREWALL_POLICY_RULE = 100, + TRACKING_STATE = 101 + } + } + + /** Properties of a RouteInfo. */ + interface IRouteInfo { + + /** RouteInfo routeType */ + routeType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null); + + /** RouteInfo nextHopType */ + nextHopType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null); + + /** RouteInfo routeScope */ + routeScope?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null); + + /** RouteInfo displayName */ + displayName?: (string|null); + + /** RouteInfo uri */ + uri?: (string|null); + + /** RouteInfo region */ + region?: (string|null); + + /** RouteInfo destIpRange */ + destIpRange?: (string|null); + + /** RouteInfo nextHop */ + nextHop?: (string|null); + + /** RouteInfo networkUri */ + networkUri?: (string|null); + + /** RouteInfo priority */ + priority?: (number|null); + + /** RouteInfo instanceTags */ + instanceTags?: (string[]|null); + + /** RouteInfo srcIpRange */ + srcIpRange?: (string|null); + + /** RouteInfo destPortRanges */ + destPortRanges?: (string[]|null); + + /** RouteInfo srcPortRanges */ + srcPortRanges?: (string[]|null); + + /** RouteInfo protocols */ + protocols?: (string[]|null); + + /** RouteInfo nccHubUri */ + nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri */ + nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri */ + advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri */ + advertisedRouteNextHopUri?: (string|null); + } + + /** Represents a RouteInfo. */ + class RouteInfo implements IRouteInfo { + + /** + * Constructs a new RouteInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo); + + /** RouteInfo routeType. */ + public routeType: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType); + + /** RouteInfo nextHopType. */ + public nextHopType: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType); + + /** RouteInfo routeScope. */ + public routeScope: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope); + + /** RouteInfo displayName. */ + public displayName: string; + + /** RouteInfo uri. */ + public uri: string; + + /** RouteInfo region. */ + public region: string; + + /** RouteInfo destIpRange. */ + public destIpRange: string; + + /** RouteInfo nextHop. */ + public nextHop: string; + + /** RouteInfo networkUri. */ + public networkUri: string; + + /** RouteInfo priority. */ + public priority: number; + + /** RouteInfo instanceTags. */ + public instanceTags: string[]; + + /** RouteInfo srcIpRange. */ + public srcIpRange: string; + + /** RouteInfo destPortRanges. */ + public destPortRanges: string[]; + + /** RouteInfo srcPortRanges. */ + public srcPortRanges: string[]; + + /** RouteInfo protocols. */ + public protocols: string[]; + + /** RouteInfo nccHubUri. */ + public nccHubUri?: (string|null); + + /** RouteInfo nccSpokeUri. */ + public nccSpokeUri?: (string|null); + + /** RouteInfo advertisedRouteSourceRouterUri. */ + public advertisedRouteSourceRouterUri?: (string|null); + + /** RouteInfo advertisedRouteNextHopUri. */ + public advertisedRouteNextHopUri?: (string|null); + + /** RouteInfo _nccHubUri. */ + public _nccHubUri?: "nccHubUri"; + + /** RouteInfo _nccSpokeUri. */ + public _nccSpokeUri?: "nccSpokeUri"; + + /** RouteInfo _advertisedRouteSourceRouterUri. */ + public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; + + /** RouteInfo _advertisedRouteNextHopUri. */ + public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; + + /** + * Creates a new RouteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RouteInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @param message RouteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Verifies a RouteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RouteInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RouteInfo; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @param message RouteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RouteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RouteInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RouteInfo { + + /** RouteType enum. */ + enum RouteType { + ROUTE_TYPE_UNSPECIFIED = 0, + SUBNET = 1, + STATIC = 2, + DYNAMIC = 3, + PEERING_SUBNET = 4, + PEERING_STATIC = 5, + PEERING_DYNAMIC = 6, + POLICY_BASED = 7, + ADVERTISED = 101 + } + + /** NextHopType enum. */ + enum NextHopType { + NEXT_HOP_TYPE_UNSPECIFIED = 0, + NEXT_HOP_IP = 1, + NEXT_HOP_INSTANCE = 2, + NEXT_HOP_NETWORK = 3, + NEXT_HOP_PEERING = 4, + NEXT_HOP_INTERCONNECT = 5, + NEXT_HOP_VPN_TUNNEL = 6, + NEXT_HOP_VPN_GATEWAY = 7, + NEXT_HOP_INTERNET_GATEWAY = 8, + NEXT_HOP_BLACKHOLE = 9, + NEXT_HOP_ILB = 10, + NEXT_HOP_ROUTER_APPLIANCE = 11, + NEXT_HOP_NCC_HUB = 12 + } + + /** RouteScope enum. */ + enum RouteScope { + ROUTE_SCOPE_UNSPECIFIED = 0, + NETWORK = 1, + NCC_HUB = 2 + } + } + + /** Properties of a GoogleServiceInfo. */ + interface IGoogleServiceInfo { + + /** GoogleServiceInfo sourceIp */ + sourceIp?: (string|null); + + /** GoogleServiceInfo googleServiceType */ + googleServiceType?: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null); + } + + /** Represents a GoogleServiceInfo. */ + class GoogleServiceInfo implements IGoogleServiceInfo { + + /** + * Constructs a new GoogleServiceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo); + + /** GoogleServiceInfo sourceIp. */ + public sourceIp: string; + + /** GoogleServiceInfo googleServiceType. */ + public googleServiceType: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType); + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleServiceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @param message GoogleServiceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Verifies a GoogleServiceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleServiceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @param message GoogleServiceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleServiceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GoogleServiceInfo { + + /** GoogleServiceType enum. */ + enum GoogleServiceType { + GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, + IAP = 1, + GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, + CLOUD_DNS = 3, + GOOGLE_API = 4, + GOOGLE_API_PSC = 5, + GOOGLE_API_VPC_SC = 6 + } + } + + /** Properties of a ForwardingRuleInfo. */ + interface IForwardingRuleInfo { + + /** ForwardingRuleInfo displayName */ + displayName?: (string|null); + + /** ForwardingRuleInfo uri */ + uri?: (string|null); + + /** ForwardingRuleInfo matchedProtocol */ + matchedProtocol?: (string|null); + + /** ForwardingRuleInfo matchedPortRange */ + matchedPortRange?: (string|null); + + /** ForwardingRuleInfo vip */ + vip?: (string|null); + + /** ForwardingRuleInfo target */ + target?: (string|null); + + /** ForwardingRuleInfo networkUri */ + networkUri?: (string|null); + + /** ForwardingRuleInfo region */ + region?: (string|null); + + /** ForwardingRuleInfo loadBalancerName */ + loadBalancerName?: (string|null); + + /** ForwardingRuleInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** ForwardingRuleInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a ForwardingRuleInfo. */ + class ForwardingRuleInfo implements IForwardingRuleInfo { + + /** + * Constructs a new ForwardingRuleInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo); + + /** ForwardingRuleInfo displayName. */ + public displayName: string; + + /** ForwardingRuleInfo uri. */ + public uri: string; + + /** ForwardingRuleInfo matchedProtocol. */ + public matchedProtocol: string; + + /** ForwardingRuleInfo matchedPortRange. */ + public matchedPortRange: string; + + /** ForwardingRuleInfo vip. */ + public vip: string; + + /** ForwardingRuleInfo target. */ + public target: string; + + /** ForwardingRuleInfo networkUri. */ + public networkUri: string; + + /** ForwardingRuleInfo region. */ + public region: string; + + /** ForwardingRuleInfo loadBalancerName. */ + public loadBalancerName: string; + + /** ForwardingRuleInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** ForwardingRuleInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardingRuleInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @param message ForwardingRuleInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Verifies a ForwardingRuleInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardingRuleInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @param message ForwardingRuleInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerInfo. */ + interface ILoadBalancerInfo { + + /** LoadBalancerInfo loadBalancerType */ + loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null); + + /** LoadBalancerInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerInfo backends */ + backends?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]|null); + + /** LoadBalancerInfo backendType */ + backendType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null); + + /** LoadBalancerInfo backendUri */ + backendUri?: (string|null); + } + + /** Represents a LoadBalancerInfo. */ + class LoadBalancerInfo implements ILoadBalancerInfo { + + /** + * Constructs a new LoadBalancerInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo); + + /** LoadBalancerInfo loadBalancerType. */ + public loadBalancerType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType); + + /** LoadBalancerInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerInfo backends. */ + public backends: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]; + + /** LoadBalancerInfo backendType. */ + public backendType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType); + + /** LoadBalancerInfo backendUri. */ + public backendUri: string; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @param message LoadBalancerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Verifies a LoadBalancerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @param message LoadBalancerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerInfo { + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + INTERNAL_TCP_UDP = 1, + NETWORK_TCP_UDP = 2, + HTTP_PROXY = 3, + TCP_PROXY = 4, + SSL_PROXY = 5 + } + + /** BackendType enum. */ + enum BackendType { + BACKEND_TYPE_UNSPECIFIED = 0, + BACKEND_SERVICE = 1, + TARGET_POOL = 2, + TARGET_INSTANCE = 3 + } + } + + /** Properties of a LoadBalancerBackend. */ + interface ILoadBalancerBackend { + + /** LoadBalancerBackend displayName */ + displayName?: (string|null); + + /** LoadBalancerBackend uri */ + uri?: (string|null); + + /** LoadBalancerBackend healthCheckFirewallState */ + healthCheckFirewallState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules */ + healthCheckAllowingFirewallRules?: (string[]|null); + + /** LoadBalancerBackend healthCheckBlockingFirewallRules */ + healthCheckBlockingFirewallRules?: (string[]|null); + } + + /** Represents a LoadBalancerBackend. */ + class LoadBalancerBackend implements ILoadBalancerBackend { + + /** + * Constructs a new LoadBalancerBackend. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend); + + /** LoadBalancerBackend displayName. */ + public displayName: string; + + /** LoadBalancerBackend uri. */ + public uri: string; + + /** LoadBalancerBackend healthCheckFirewallState. */ + public healthCheckFirewallState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState); + + /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ + public healthCheckAllowingFirewallRules: string[]; + + /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ + public healthCheckBlockingFirewallRules: string[]; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackend instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @param message LoadBalancerBackend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Verifies a LoadBalancerBackend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackend + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @param message LoadBalancerBackend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackend + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackend { + + /** HealthCheckFirewallState enum. */ + enum HealthCheckFirewallState { + HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, + CONFIGURED = 1, + MISCONFIGURED = 2 + } + } + + /** Properties of a VpnGatewayInfo. */ + interface IVpnGatewayInfo { + + /** VpnGatewayInfo displayName */ + displayName?: (string|null); + + /** VpnGatewayInfo uri */ + uri?: (string|null); + + /** VpnGatewayInfo networkUri */ + networkUri?: (string|null); + + /** VpnGatewayInfo ipAddress */ + ipAddress?: (string|null); + + /** VpnGatewayInfo vpnTunnelUri */ + vpnTunnelUri?: (string|null); + + /** VpnGatewayInfo region */ + region?: (string|null); + } + + /** Represents a VpnGatewayInfo. */ + class VpnGatewayInfo implements IVpnGatewayInfo { + + /** + * Constructs a new VpnGatewayInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo); + + /** VpnGatewayInfo displayName. */ + public displayName: string; + + /** VpnGatewayInfo uri. */ + public uri: string; + + /** VpnGatewayInfo networkUri. */ + public networkUri: string; + + /** VpnGatewayInfo ipAddress. */ + public ipAddress: string; + + /** VpnGatewayInfo vpnTunnelUri. */ + public vpnTunnelUri: string; + + /** VpnGatewayInfo region. */ + public region: string; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnGatewayInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @param message VpnGatewayInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Verifies a VpnGatewayInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnGatewayInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @param message VpnGatewayInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnGatewayInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpnTunnelInfo. */ + interface IVpnTunnelInfo { + + /** VpnTunnelInfo displayName */ + displayName?: (string|null); + + /** VpnTunnelInfo uri */ + uri?: (string|null); + + /** VpnTunnelInfo sourceGateway */ + sourceGateway?: (string|null); + + /** VpnTunnelInfo remoteGateway */ + remoteGateway?: (string|null); + + /** VpnTunnelInfo remoteGatewayIp */ + remoteGatewayIp?: (string|null); + + /** VpnTunnelInfo sourceGatewayIp */ + sourceGatewayIp?: (string|null); + + /** VpnTunnelInfo networkUri */ + networkUri?: (string|null); + + /** VpnTunnelInfo region */ + region?: (string|null); + + /** VpnTunnelInfo routingType */ + routingType?: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null); + } + + /** Represents a VpnTunnelInfo. */ + class VpnTunnelInfo implements IVpnTunnelInfo { + + /** + * Constructs a new VpnTunnelInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo); + + /** VpnTunnelInfo displayName. */ + public displayName: string; + + /** VpnTunnelInfo uri. */ + public uri: string; + + /** VpnTunnelInfo sourceGateway. */ + public sourceGateway: string; + + /** VpnTunnelInfo remoteGateway. */ + public remoteGateway: string; + + /** VpnTunnelInfo remoteGatewayIp. */ + public remoteGatewayIp: string; + + /** VpnTunnelInfo sourceGatewayIp. */ + public sourceGatewayIp: string; + + /** VpnTunnelInfo networkUri. */ + public networkUri: string; + + /** VpnTunnelInfo region. */ + public region: string; + + /** VpnTunnelInfo routingType. */ + public routingType: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType); + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpnTunnelInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @param message VpnTunnelInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Verifies a VpnTunnelInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpnTunnelInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @param message VpnTunnelInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpnTunnelInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VpnTunnelInfo { + + /** RoutingType enum. */ + enum RoutingType { + ROUTING_TYPE_UNSPECIFIED = 0, + ROUTE_BASED = 1, + POLICY_BASED = 2, + DYNAMIC = 3 + } + } + + /** Properties of an EndpointInfo. */ + interface IEndpointInfo { + + /** EndpointInfo sourceIp */ + sourceIp?: (string|null); + + /** EndpointInfo destinationIp */ + destinationIp?: (string|null); + + /** EndpointInfo protocol */ + protocol?: (string|null); + + /** EndpointInfo sourcePort */ + sourcePort?: (number|null); + + /** EndpointInfo destinationPort */ + destinationPort?: (number|null); + + /** EndpointInfo sourceNetworkUri */ + sourceNetworkUri?: (string|null); + + /** EndpointInfo destinationNetworkUri */ + destinationNetworkUri?: (string|null); + + /** EndpointInfo sourceAgentUri */ + sourceAgentUri?: (string|null); + } + + /** Represents an EndpointInfo. */ + class EndpointInfo implements IEndpointInfo { + + /** + * Constructs a new EndpointInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo); + + /** EndpointInfo sourceIp. */ + public sourceIp: string; + + /** EndpointInfo destinationIp. */ + public destinationIp: string; + + /** EndpointInfo protocol. */ + public protocol: string; + + /** EndpointInfo sourcePort. */ + public sourcePort: number; + + /** EndpointInfo destinationPort. */ + public destinationPort: number; + + /** EndpointInfo sourceNetworkUri. */ + public sourceNetworkUri: string; + + /** EndpointInfo destinationNetworkUri. */ + public destinationNetworkUri: string; + + /** EndpointInfo sourceAgentUri. */ + public sourceAgentUri: string; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns EndpointInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @param message EndpointInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Verifies an EndpointInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EndpointInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.EndpointInfo; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @param message EndpointInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EndpointInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EndpointInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeliverInfo. */ + interface IDeliverInfo { + + /** DeliverInfo target */ + target?: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null); + + /** DeliverInfo resourceUri */ + resourceUri?: (string|null); + + /** DeliverInfo ipAddress */ + ipAddress?: (string|null); + + /** DeliverInfo storageBucket */ + storageBucket?: (string|null); + + /** DeliverInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + } + + /** Represents a DeliverInfo. */ + class DeliverInfo implements IDeliverInfo { + + /** + * Constructs a new DeliverInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo); + + /** DeliverInfo target. */ + public target: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target); + + /** DeliverInfo resourceUri. */ + public resourceUri: string; + + /** DeliverInfo ipAddress. */ + public ipAddress: string; + + /** DeliverInfo storageBucket. */ + public storageBucket: string; + + /** DeliverInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DeliverInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @param message DeliverInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Verifies a DeliverInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeliverInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeliverInfo; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @param message DeliverInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeliverInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeliverInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeliverInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + INSTANCE = 1, + INTERNET = 2, + GOOGLE_API = 3, + GKE_MASTER = 4, + CLOUD_SQL_INSTANCE = 5, + PSC_PUBLISHED_SERVICE = 6, + PSC_GOOGLE_API = 7, + PSC_VPC_SC = 8, + SERVERLESS_NEG = 9, + STORAGE_BUCKET = 10, + PRIVATE_NETWORK = 11, + CLOUD_FUNCTION = 12, + APP_ENGINE_VERSION = 13, + CLOUD_RUN_REVISION = 14, + GOOGLE_MANAGED_SERVICE = 15, + REDIS_INSTANCE = 16, + REDIS_CLUSTER = 17 + } + } + + /** Properties of a ForwardInfo. */ + interface IForwardInfo { + + /** ForwardInfo target */ + target?: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null); + + /** ForwardInfo resourceUri */ + resourceUri?: (string|null); + + /** ForwardInfo ipAddress */ + ipAddress?: (string|null); + } + + /** Represents a ForwardInfo. */ + class ForwardInfo implements IForwardInfo { + + /** + * Constructs a new ForwardInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo); + + /** ForwardInfo target. */ + public target: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target); + + /** ForwardInfo resourceUri. */ + public resourceUri: string; + + /** ForwardInfo ipAddress. */ + public ipAddress: string; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ForwardInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @param message ForwardInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Verifies a ForwardInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ForwardInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardInfo; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @param message ForwardInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ForwardInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ForwardInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ForwardInfo { + + /** Target enum. */ + enum Target { + TARGET_UNSPECIFIED = 0, + PEERING_VPC = 1, + VPN_GATEWAY = 2, + INTERCONNECT = 3, + GKE_MASTER = 4, + IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, + CLOUD_SQL_INSTANCE = 6, + ANOTHER_PROJECT = 7, + NCC_HUB = 8, + ROUTER_APPLIANCE = 9 + } + } + + /** Properties of an AbortInfo. */ + interface IAbortInfo { + + /** AbortInfo cause */ + cause?: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null); + + /** AbortInfo resourceUri */ + resourceUri?: (string|null); + + /** AbortInfo ipAddress */ + ipAddress?: (string|null); + + /** AbortInfo projectsMissingPermission */ + projectsMissingPermission?: (string[]|null); + } + + /** Represents an AbortInfo. */ + class AbortInfo implements IAbortInfo { + + /** + * Constructs a new AbortInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo); + + /** AbortInfo cause. */ + public cause: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause); + + /** AbortInfo resourceUri. */ + public resourceUri: string; + + /** AbortInfo ipAddress. */ + public ipAddress: string; + + /** AbortInfo projectsMissingPermission. */ + public projectsMissingPermission: string[]; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AbortInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @param message AbortInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Verifies an AbortInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AbortInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AbortInfo; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @param message AbortInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AbortInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AbortInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AbortInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_NETWORK = 1, + UNKNOWN_PROJECT = 3, + NO_EXTERNAL_IP = 7, + UNINTENDED_DESTINATION = 8, + SOURCE_ENDPOINT_NOT_FOUND = 11, + MISMATCHED_SOURCE_NETWORK = 12, + DESTINATION_ENDPOINT_NOT_FOUND = 13, + MISMATCHED_DESTINATION_NETWORK = 14, + UNKNOWN_IP = 2, + GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, + SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, + PERMISSION_DENIED = 4, + PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, + PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, + PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, + NO_SOURCE_LOCATION = 5, + INVALID_ARGUMENT = 6, + TRACE_TOO_LONG = 9, + INTERNAL_ERROR = 10, + UNSUPPORTED = 15, + MISMATCHED_IP_VERSION = 16, + GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, + RESOURCE_CONFIG_NOT_FOUND = 18, + VM_INSTANCE_CONFIG_NOT_FOUND = 24, + NETWORK_CONFIG_NOT_FOUND = 25, + FIREWALL_CONFIG_NOT_FOUND = 26, + ROUTE_CONFIG_NOT_FOUND = 27, + GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, + SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, + SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, + SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, + SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, + NON_ROUTABLE_IP_ADDRESS = 22, + UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, + UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 + } + } + + /** Properties of a DropInfo. */ + interface IDropInfo { + + /** DropInfo cause */ + cause?: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null); + + /** DropInfo resourceUri */ + resourceUri?: (string|null); + + /** DropInfo sourceIp */ + sourceIp?: (string|null); + + /** DropInfo destinationIp */ + destinationIp?: (string|null); + + /** DropInfo region */ + region?: (string|null); + } + + /** Represents a DropInfo. */ + class DropInfo implements IDropInfo { + + /** + * Constructs a new DropInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo); + + /** DropInfo cause. */ + public cause: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause); + + /** DropInfo resourceUri. */ + public resourceUri: string; + + /** DropInfo sourceIp. */ + public sourceIp: string; + + /** DropInfo destinationIp. */ + public destinationIp: string; + + /** DropInfo region. */ + public region: string; + + /** + * Creates a new DropInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DropInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @param message DropInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Verifies a DropInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DropInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DropInfo; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @param message DropInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DropInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DropInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DropInfo { + + /** Cause enum. */ + enum Cause { + CAUSE_UNSPECIFIED = 0, + UNKNOWN_EXTERNAL_ADDRESS = 1, + FOREIGN_IP_DISALLOWED = 2, + FIREWALL_RULE = 3, + NO_ROUTE = 4, + ROUTE_BLACKHOLE = 5, + ROUTE_WRONG_NETWORK = 6, + ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, + ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, + ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, + ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, + ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, + ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, + ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, + NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, + VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, + VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, + PRIVATE_TRAFFIC_TO_INTERNET = 7, + PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, + PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, + NO_EXTERNAL_ADDRESS = 9, + UNKNOWN_INTERNAL_ADDRESS = 10, + FORWARDING_RULE_MISMATCH = 11, + FORWARDING_RULE_NO_INSTANCES = 12, + FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, + INSTANCE_NOT_RUNNING = 14, + GKE_CLUSTER_NOT_RUNNING = 27, + CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, + REDIS_INSTANCE_NOT_RUNNING = 68, + REDIS_CLUSTER_NOT_RUNNING = 69, + TRAFFIC_TYPE_BLOCKED = 15, + GKE_MASTER_UNAUTHORIZED_ACCESS = 16, + CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, + DROPPED_INSIDE_GKE_SERVICE = 18, + DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, + GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, + GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, + GKE_PSC_ENDPOINT_MISSING = 36, + CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, + GKE_CONTROL_PLANE_REGION_MISMATCH = 30, + PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, + GKE_CONTROL_PLANE_NO_ROUTE = 32, + CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, + PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, + CLOUD_SQL_INSTANCE_NO_ROUTE = 35, + CLOUD_SQL_CONNECTOR_REQUIRED = 63, + CLOUD_FUNCTION_NOT_ACTIVE = 22, + VPC_CONNECTOR_NOT_SET = 23, + VPC_CONNECTOR_NOT_RUNNING = 24, + VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, + VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, + FORWARDING_RULE_REGION_MISMATCH = 25, + PSC_CONNECTION_NOT_ACCEPTED = 26, + PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, + PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, + PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, + CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, + NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, + PSC_TRANSITIVITY_NOT_PROPAGATED = 64, + HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, + HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, + CLOUD_RUN_REVISION_NOT_READY = 29, + DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, + LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, + CLOUD_NAT_NO_ADDRESSES = 40, + ROUTING_LOOP = 59, + DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, + LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, + BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, + DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, + DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, + REDIS_INSTANCE_UNSUPPORTED_PORT = 71, + REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, + REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, + REDIS_INSTANCE_NO_EXTERNAL_IP = 74, + REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, + DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, + REDIS_CLUSTER_UNSUPPORTED_PORT = 76, + REDIS_CLUSTER_NO_EXTERNAL_IP = 77, + REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, + NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, + NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 + } + } + + /** Properties of a GKEMasterInfo. */ + interface IGKEMasterInfo { + + /** GKEMasterInfo clusterUri */ + clusterUri?: (string|null); + + /** GKEMasterInfo clusterNetworkUri */ + clusterNetworkUri?: (string|null); + + /** GKEMasterInfo internalIp */ + internalIp?: (string|null); + + /** GKEMasterInfo externalIp */ + externalIp?: (string|null); + + /** GKEMasterInfo dnsEndpoint */ + dnsEndpoint?: (string|null); + } + + /** Represents a GKEMasterInfo. */ + class GKEMasterInfo implements IGKEMasterInfo { + + /** + * Constructs a new GKEMasterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo); + + /** GKEMasterInfo clusterUri. */ + public clusterUri: string; + + /** GKEMasterInfo clusterNetworkUri. */ + public clusterNetworkUri: string; + + /** GKEMasterInfo internalIp. */ + public internalIp: string; + + /** GKEMasterInfo externalIp. */ + public externalIp: string; + + /** GKEMasterInfo dnsEndpoint. */ + public dnsEndpoint: string; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GKEMasterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @param message GKEMasterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Verifies a GKEMasterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GKEMasterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @param message GKEMasterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GKEMasterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GKEMasterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSQLInstanceInfo. */ + interface ICloudSQLInstanceInfo { + + /** CloudSQLInstanceInfo displayName */ + displayName?: (string|null); + + /** CloudSQLInstanceInfo uri */ + uri?: (string|null); + + /** CloudSQLInstanceInfo networkUri */ + networkUri?: (string|null); + + /** CloudSQLInstanceInfo internalIp */ + internalIp?: (string|null); + + /** CloudSQLInstanceInfo externalIp */ + externalIp?: (string|null); + + /** CloudSQLInstanceInfo region */ + region?: (string|null); + } + + /** Represents a CloudSQLInstanceInfo. */ + class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { + + /** + * Constructs a new CloudSQLInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo); + + /** CloudSQLInstanceInfo displayName. */ + public displayName: string; + + /** CloudSQLInstanceInfo uri. */ + public uri: string; + + /** CloudSQLInstanceInfo networkUri. */ + public networkUri: string; + + /** CloudSQLInstanceInfo internalIp. */ + public internalIp: string; + + /** CloudSQLInstanceInfo externalIp. */ + public externalIp: string; + + /** CloudSQLInstanceInfo region. */ + public region: string; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSQLInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @param message CloudSQLInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSQLInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @param message CloudSQLInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisInstanceInfo. */ + interface IRedisInstanceInfo { + + /** RedisInstanceInfo displayName */ + displayName?: (string|null); + + /** RedisInstanceInfo uri */ + uri?: (string|null); + + /** RedisInstanceInfo networkUri */ + networkUri?: (string|null); + + /** RedisInstanceInfo primaryEndpointIp */ + primaryEndpointIp?: (string|null); + + /** RedisInstanceInfo readEndpointIp */ + readEndpointIp?: (string|null); + + /** RedisInstanceInfo region */ + region?: (string|null); + } + + /** Represents a RedisInstanceInfo. */ + class RedisInstanceInfo implements IRedisInstanceInfo { + + /** + * Constructs a new RedisInstanceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo); + + /** RedisInstanceInfo displayName. */ + public displayName: string; + + /** RedisInstanceInfo uri. */ + public uri: string; + + /** RedisInstanceInfo networkUri. */ + public networkUri: string; + + /** RedisInstanceInfo primaryEndpointIp. */ + public primaryEndpointIp: string; + + /** RedisInstanceInfo readEndpointIp. */ + public readEndpointIp: string; + + /** RedisInstanceInfo region. */ + public region: string; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisInstanceInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @param message RedisInstanceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Verifies a RedisInstanceInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisInstanceInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @param message RedisInstanceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisInstanceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedisClusterInfo. */ + interface IRedisClusterInfo { + + /** RedisClusterInfo displayName */ + displayName?: (string|null); + + /** RedisClusterInfo uri */ + uri?: (string|null); + + /** RedisClusterInfo networkUri */ + networkUri?: (string|null); + + /** RedisClusterInfo discoveryEndpointIpAddress */ + discoveryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo secondaryEndpointIpAddress */ + secondaryEndpointIpAddress?: (string|null); + + /** RedisClusterInfo location */ + location?: (string|null); + } + + /** Represents a RedisClusterInfo. */ + class RedisClusterInfo implements IRedisClusterInfo { + + /** + * Constructs a new RedisClusterInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo); + + /** RedisClusterInfo displayName. */ + public displayName: string; + + /** RedisClusterInfo uri. */ + public uri: string; + + /** RedisClusterInfo networkUri. */ + public networkUri: string; + + /** RedisClusterInfo discoveryEndpointIpAddress. */ + public discoveryEndpointIpAddress: string; + + /** RedisClusterInfo secondaryEndpointIpAddress. */ + public secondaryEndpointIpAddress: string; + + /** RedisClusterInfo location. */ + public location: string; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RedisClusterInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @param message RedisClusterInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Verifies a RedisClusterInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedisClusterInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @param message RedisClusterInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedisClusterInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedisClusterInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudFunctionInfo. */ + interface ICloudFunctionInfo { + + /** CloudFunctionInfo displayName */ + displayName?: (string|null); + + /** CloudFunctionInfo uri */ + uri?: (string|null); + + /** CloudFunctionInfo location */ + location?: (string|null); + + /** CloudFunctionInfo versionId */ + versionId?: (number|Long|string|null); + } + + /** Represents a CloudFunctionInfo. */ + class CloudFunctionInfo implements ICloudFunctionInfo { + + /** + * Constructs a new CloudFunctionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo); + + /** CloudFunctionInfo displayName. */ + public displayName: string; + + /** CloudFunctionInfo uri. */ + public uri: string; + + /** CloudFunctionInfo location. */ + public location: string; + + /** CloudFunctionInfo versionId. */ + public versionId: (number|Long|string); + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudFunctionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @param message CloudFunctionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Verifies a CloudFunctionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudFunctionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @param message CloudFunctionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudFunctionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudRunRevisionInfo. */ + interface ICloudRunRevisionInfo { + + /** CloudRunRevisionInfo displayName */ + displayName?: (string|null); + + /** CloudRunRevisionInfo uri */ + uri?: (string|null); + + /** CloudRunRevisionInfo location */ + location?: (string|null); + + /** CloudRunRevisionInfo serviceUri */ + serviceUri?: (string|null); + } + + /** Represents a CloudRunRevisionInfo. */ + class CloudRunRevisionInfo implements ICloudRunRevisionInfo { + + /** + * Constructs a new CloudRunRevisionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo); + + /** CloudRunRevisionInfo displayName. */ + public displayName: string; + + /** CloudRunRevisionInfo uri. */ + public uri: string; + + /** CloudRunRevisionInfo location. */ + public location: string; + + /** CloudRunRevisionInfo serviceUri. */ + public serviceUri: string; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudRunRevisionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @param message CloudRunRevisionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Verifies a CloudRunRevisionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudRunRevisionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @param message CloudRunRevisionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AppEngineVersionInfo. */ + interface IAppEngineVersionInfo { + + /** AppEngineVersionInfo displayName */ + displayName?: (string|null); + + /** AppEngineVersionInfo uri */ + uri?: (string|null); + + /** AppEngineVersionInfo runtime */ + runtime?: (string|null); + + /** AppEngineVersionInfo environment */ + environment?: (string|null); + } + + /** Represents an AppEngineVersionInfo. */ + class AppEngineVersionInfo implements IAppEngineVersionInfo { + + /** + * Constructs a new AppEngineVersionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo); + + /** AppEngineVersionInfo displayName. */ + public displayName: string; + + /** AppEngineVersionInfo uri. */ + public uri: string; + + /** AppEngineVersionInfo runtime. */ + public runtime: string; + + /** AppEngineVersionInfo environment. */ + public environment: string; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns AppEngineVersionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @param message AppEngineVersionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Verifies an AppEngineVersionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AppEngineVersionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @param message AppEngineVersionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcConnectorInfo. */ + interface IVpcConnectorInfo { + + /** VpcConnectorInfo displayName */ + displayName?: (string|null); + + /** VpcConnectorInfo uri */ + uri?: (string|null); + + /** VpcConnectorInfo location */ + location?: (string|null); + } + + /** Represents a VpcConnectorInfo. */ + class VpcConnectorInfo implements IVpcConnectorInfo { + + /** + * Constructs a new VpcConnectorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo); + + /** VpcConnectorInfo displayName. */ + public displayName: string; + + /** VpcConnectorInfo uri. */ + public uri: string; + + /** VpcConnectorInfo location. */ + public location: string; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcConnectorInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @param message VpcConnectorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Verifies a VpcConnectorInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcConnectorInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @param message VpcConnectorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcConnectorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NatInfo. */ + interface INatInfo { + + /** NatInfo type */ + type?: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type|null); + + /** NatInfo protocol */ + protocol?: (string|null); + + /** NatInfo networkUri */ + networkUri?: (string|null); + + /** NatInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** NatInfo newSourceIp */ + newSourceIp?: (string|null); + + /** NatInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** NatInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** NatInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** NatInfo newSourcePort */ + newSourcePort?: (number|null); + + /** NatInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** NatInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** NatInfo routerUri */ + routerUri?: (string|null); + + /** NatInfo natGatewayName */ + natGatewayName?: (string|null); + } + + /** Represents a NatInfo. */ + class NatInfo implements INatInfo { + + /** + * Constructs a new NatInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.INatInfo); + + /** NatInfo type. */ + public type: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type); + + /** NatInfo protocol. */ + public protocol: string; + + /** NatInfo networkUri. */ + public networkUri: string; + + /** NatInfo oldSourceIp. */ + public oldSourceIp: string; + + /** NatInfo newSourceIp. */ + public newSourceIp: string; + + /** NatInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** NatInfo newDestinationIp. */ + public newDestinationIp: string; + + /** NatInfo oldSourcePort. */ + public oldSourcePort: number; + + /** NatInfo newSourcePort. */ + public newSourcePort: number; + + /** NatInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** NatInfo newDestinationPort. */ + public newDestinationPort: number; + + /** NatInfo routerUri. */ + public routerUri: string; + + /** NatInfo natGatewayName. */ + public natGatewayName: string; + + /** + * Creates a new NatInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns NatInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.INatInfo): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @param message NatInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Verifies a NatInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NatInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NatInfo; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @param message NatInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NatInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NatInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NatInfo { + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + INTERNAL_TO_EXTERNAL = 1, + EXTERNAL_TO_INTERNAL = 2, + CLOUD_NAT = 3, + PRIVATE_SERVICE_CONNECT = 4 + } + } + + /** Properties of a ProxyConnectionInfo. */ + interface IProxyConnectionInfo { + + /** ProxyConnectionInfo protocol */ + protocol?: (string|null); + + /** ProxyConnectionInfo oldSourceIp */ + oldSourceIp?: (string|null); + + /** ProxyConnectionInfo newSourceIp */ + newSourceIp?: (string|null); + + /** ProxyConnectionInfo oldDestinationIp */ + oldDestinationIp?: (string|null); + + /** ProxyConnectionInfo newDestinationIp */ + newDestinationIp?: (string|null); + + /** ProxyConnectionInfo oldSourcePort */ + oldSourcePort?: (number|null); + + /** ProxyConnectionInfo newSourcePort */ + newSourcePort?: (number|null); + + /** ProxyConnectionInfo oldDestinationPort */ + oldDestinationPort?: (number|null); + + /** ProxyConnectionInfo newDestinationPort */ + newDestinationPort?: (number|null); + + /** ProxyConnectionInfo subnetUri */ + subnetUri?: (string|null); + + /** ProxyConnectionInfo networkUri */ + networkUri?: (string|null); + } + + /** Represents a ProxyConnectionInfo. */ + class ProxyConnectionInfo implements IProxyConnectionInfo { + + /** + * Constructs a new ProxyConnectionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo); + + /** ProxyConnectionInfo protocol. */ + public protocol: string; + + /** ProxyConnectionInfo oldSourceIp. */ + public oldSourceIp: string; + + /** ProxyConnectionInfo newSourceIp. */ + public newSourceIp: string; + + /** ProxyConnectionInfo oldDestinationIp. */ + public oldDestinationIp: string; + + /** ProxyConnectionInfo newDestinationIp. */ + public newDestinationIp: string; + + /** ProxyConnectionInfo oldSourcePort. */ + public oldSourcePort: number; + + /** ProxyConnectionInfo newSourcePort. */ + public newSourcePort: number; + + /** ProxyConnectionInfo oldDestinationPort. */ + public oldDestinationPort: number; + + /** ProxyConnectionInfo newDestinationPort. */ + public newDestinationPort: number; + + /** ProxyConnectionInfo subnetUri. */ + public subnetUri: string; + + /** ProxyConnectionInfo networkUri. */ + public networkUri: string; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ProxyConnectionInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @param message ProxyConnectionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Verifies a ProxyConnectionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProxyConnectionInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @param message ProxyConnectionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadBalancerBackendInfo. */ + interface ILoadBalancerBackendInfo { + + /** LoadBalancerBackendInfo name */ + name?: (string|null); + + /** LoadBalancerBackendInfo instanceUri */ + instanceUri?: (string|null); + + /** LoadBalancerBackendInfo backendServiceUri */ + backendServiceUri?: (string|null); + + /** LoadBalancerBackendInfo instanceGroupUri */ + instanceGroupUri?: (string|null); + + /** LoadBalancerBackendInfo networkEndpointGroupUri */ + networkEndpointGroupUri?: (string|null); + + /** LoadBalancerBackendInfo backendBucketUri */ + backendBucketUri?: (string|null); + + /** LoadBalancerBackendInfo pscServiceAttachmentUri */ + pscServiceAttachmentUri?: (string|null); + + /** LoadBalancerBackendInfo pscGoogleApiTarget */ + pscGoogleApiTarget?: (string|null); + + /** LoadBalancerBackendInfo healthCheckUri */ + healthCheckUri?: (string|null); + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ + healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); + } + + /** Represents a LoadBalancerBackendInfo. */ + class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { + + /** + * Constructs a new LoadBalancerBackendInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo); + + /** LoadBalancerBackendInfo name. */ + public name: string; + + /** LoadBalancerBackendInfo instanceUri. */ + public instanceUri: string; + + /** LoadBalancerBackendInfo backendServiceUri. */ + public backendServiceUri: string; + + /** LoadBalancerBackendInfo instanceGroupUri. */ + public instanceGroupUri: string; + + /** LoadBalancerBackendInfo networkEndpointGroupUri. */ + public networkEndpointGroupUri: string; + + /** LoadBalancerBackendInfo backendBucketUri. */ + public backendBucketUri: string; + + /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ + public pscServiceAttachmentUri: string; + + /** LoadBalancerBackendInfo pscGoogleApiTarget. */ + public pscGoogleApiTarget: string; + + /** LoadBalancerBackendInfo healthCheckUri. */ + public healthCheckUri: string; + + /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ + public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadBalancerBackendInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @param message LoadBalancerBackendInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadBalancerBackendInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @param message LoadBalancerBackendInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LoadBalancerBackendInfo { + + /** HealthCheckFirewallsConfigState enum. */ + enum HealthCheckFirewallsConfigState { + HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, + FIREWALLS_CONFIGURED = 1, + FIREWALLS_PARTIALLY_CONFIGURED = 2, + FIREWALLS_NOT_CONFIGURED = 3, + FIREWALLS_UNSUPPORTED = 4 + } + } + + /** LoadBalancerType enum. */ + enum LoadBalancerType { + LOAD_BALANCER_TYPE_UNSPECIFIED = 0, + HTTPS_ADVANCED_LOAD_BALANCER = 1, + HTTPS_LOAD_BALANCER = 2, + REGIONAL_HTTPS_LOAD_BALANCER = 3, + INTERNAL_HTTPS_LOAD_BALANCER = 4, + SSL_PROXY_LOAD_BALANCER = 5, + TCP_PROXY_LOAD_BALANCER = 6, + INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, + NETWORK_LOAD_BALANCER = 8, + LEGACY_NETWORK_LOAD_BALANCER = 9, + TCP_UDP_INTERNAL_LOAD_BALANCER = 10 + } + + /** Properties of a StorageBucketInfo. */ + interface IStorageBucketInfo { + + /** StorageBucketInfo bucket */ + bucket?: (string|null); + } + + /** Represents a StorageBucketInfo. */ + class StorageBucketInfo implements IStorageBucketInfo { + + /** + * Constructs a new StorageBucketInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo); + + /** StorageBucketInfo bucket. */ + public bucket: string; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageBucketInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @param message StorageBucketInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Verifies a StorageBucketInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageBucketInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @param message StorageBucketInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageBucketInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageBucketInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServerlessNegInfo. */ + interface IServerlessNegInfo { + + /** ServerlessNegInfo negUri */ + negUri?: (string|null); + } + + /** Represents a ServerlessNegInfo. */ + class ServerlessNegInfo implements IServerlessNegInfo { + + /** + * Constructs a new ServerlessNegInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo); + + /** ServerlessNegInfo negUri. */ + public negUri: string; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ServerlessNegInfo instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @param message ServerlessNegInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Verifies a ServerlessNegInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServerlessNegInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @param message ServerlessNegInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServerlessNegInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ReachabilityService */ + class ReachabilityService extends $protobuf.rpc.Service { + + /** + * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback): void; + + /** + * Calls ListConnectivityTests. + * @param request ListConnectivityTestsRequest message or plain object + * @returns Promise + */ + public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): Promise; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConnectivityTest + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback): void; + + /** + * Calls GetConnectivityTest. + * @param request GetConnectivityTestRequest message or plain object + * @returns Promise + */ + public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): Promise; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback): void; + + /** + * Calls CreateConnectivityTest. + * @param request CreateConnectivityTestRequest message or plain object + * @returns Promise + */ + public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): Promise; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback): void; + + /** + * Calls UpdateConnectivityTest. + * @param request UpdateConnectivityTestRequest message or plain object + * @returns Promise + */ + public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): Promise; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback): void; + + /** + * Calls RerunConnectivityTest. + * @param request RerunConnectivityTestRequest message or plain object + * @returns Promise + */ + public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): Promise; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback): void; + + /** + * Calls DeleteConnectivityTest. + * @param request DeleteConnectivityTestRequest message or plain object + * @returns Promise + */ + public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): Promise; + } + + namespace ReachabilityService { + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. + * @param error Error, if any + * @param [response] ListConnectivityTestsResponse + */ + type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. + * @param error Error, if any + * @param [response] ConnectivityTest + */ + type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ConnectivityTest) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListConnectivityTestsRequest. */ + interface IListConnectivityTestsRequest { + + /** ListConnectivityTestsRequest parent */ + parent?: (string|null); + + /** ListConnectivityTestsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectivityTestsRequest pageToken */ + pageToken?: (string|null); + + /** ListConnectivityTestsRequest filter */ + filter?: (string|null); + + /** ListConnectivityTestsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListConnectivityTestsRequest. */ + class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { + + /** + * Constructs a new ListConnectivityTestsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest); + + /** ListConnectivityTestsRequest parent. */ + public parent: string; + + /** ListConnectivityTestsRequest pageSize. */ + public pageSize: number; + + /** ListConnectivityTestsRequest pageToken. */ + public pageToken: string; + + /** ListConnectivityTestsRequest filter. */ + public filter: string; + + /** ListConnectivityTestsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @param message ListConnectivityTestsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; + + /** + * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @param message ListConnectivityTestsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectivityTestsResponse. */ + interface IListConnectivityTestsResponse { + + /** ListConnectivityTestsResponse resources */ + resources?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null); + + /** ListConnectivityTestsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListConnectivityTestsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListConnectivityTestsResponse. */ + class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { + + /** + * Constructs a new ListConnectivityTestsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse); + + /** ListConnectivityTestsResponse resources. */ + public resources: google.cloud.networkmanagement.v1beta1.IConnectivityTest[]; + + /** ListConnectivityTestsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListConnectivityTestsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectivityTestsResponse instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @param message ListConnectivityTestsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectivityTestsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; + + /** + * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @param message ListConnectivityTestsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectivityTestsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectivityTestRequest. */ + interface IGetConnectivityTestRequest { + + /** GetConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectivityTestRequest. */ + class GetConnectivityTestRequest implements IGetConnectivityTestRequest { + + /** + * Constructs a new GetConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest); + + /** GetConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @param message GetConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Verifies a GetConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @param message GetConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectivityTestRequest. */ + interface ICreateConnectivityTestRequest { + + /** CreateConnectivityTestRequest parent */ + parent?: (string|null); + + /** CreateConnectivityTestRequest testId */ + testId?: (string|null); + + /** CreateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + } + + /** Represents a CreateConnectivityTestRequest. */ + class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { + + /** + * Constructs a new CreateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest); + + /** CreateConnectivityTestRequest parent. */ + public parent: string; + + /** CreateConnectivityTestRequest testId. */ + public testId: string; + + /** CreateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @param message CreateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message CreateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectivityTestRequest. */ + interface IUpdateConnectivityTestRequest { + + /** UpdateConnectivityTestRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource */ + resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + } + + /** Represents an UpdateConnectivityTestRequest. */ + class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest); + + /** UpdateConnectivityTestRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConnectivityTestRequest resource. */ + public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @param message UpdateConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @param message UpdateConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectivityTestRequest. */ + interface IDeleteConnectivityTestRequest { + + /** DeleteConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConnectivityTestRequest. */ + class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest); + + /** DeleteConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @param message DeleteConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @param message DeleteConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RerunConnectivityTestRequest. */ + interface IRerunConnectivityTestRequest { + + /** RerunConnectivityTestRequest name */ + name?: (string|null); + } + + /** Represents a RerunConnectivityTestRequest. */ + class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { + + /** + * Constructs a new RerunConnectivityTestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest); + + /** RerunConnectivityTestRequest name. */ + public name: string; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RerunConnectivityTestRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @param message RerunConnectivityTestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RerunConnectivityTestRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @param message RerunConnectivityTestRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RerunConnectivityTestRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @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 statusDetail */ + statusDetail?: (string|null); + + /** OperationMetadata cancelRequested */ + cancelRequested?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.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 statusDetail. */ + public statusDetail: string; + + /** OperationMetadata cancelRequested. */ + public cancelRequested: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IOperationMetadata): google.cloud.networkmanagement.v1beta1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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; + } + + /** Represents a VpcFlowLogsService */ + class VpcFlowLogsService extends $protobuf.rpc.Service { + + /** + * Constructs a new VpcFlowLogsService 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 VpcFlowLogsService 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): VpcFlowLogsService; + + /** + * Calls ListVpcFlowLogsConfigs. + * @param request ListVpcFlowLogsConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse + */ + public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback): void; + + /** + * Calls ListVpcFlowLogsConfigs. + * @param request ListVpcFlowLogsConfigsRequest message or plain object + * @returns Promise + */ + public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): Promise; + + /** + * Calls GetVpcFlowLogsConfig. + * @param request GetVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and VpcFlowLogsConfig + */ + public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback): void; + + /** + * Calls GetVpcFlowLogsConfig. + * @param request GetVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): Promise; + + /** + * Calls CreateVpcFlowLogsConfig. + * @param request CreateVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback): void; + + /** + * Calls CreateVpcFlowLogsConfig. + * @param request CreateVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): Promise; + + /** + * Calls UpdateVpcFlowLogsConfig. + * @param request UpdateVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback): void; + + /** + * Calls UpdateVpcFlowLogsConfig. + * @param request UpdateVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): Promise; + + /** + * Calls DeleteVpcFlowLogsConfig. + * @param request DeleteVpcFlowLogsConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback): void; + + /** + * Calls DeleteVpcFlowLogsConfig. + * @param request DeleteVpcFlowLogsConfigRequest message or plain object + * @returns Promise + */ + public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): Promise; + } + + namespace VpcFlowLogsService { + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. + * @param error Error, if any + * @param [response] ListVpcFlowLogsConfigsResponse + */ + type ListVpcFlowLogsConfigsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] VpcFlowLogsConfig + */ + type GetVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListVpcFlowLogsConfigsRequest. */ + interface IListVpcFlowLogsConfigsRequest { + + /** ListVpcFlowLogsConfigsRequest parent */ + parent?: (string|null); + + /** ListVpcFlowLogsConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListVpcFlowLogsConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListVpcFlowLogsConfigsRequest filter */ + filter?: (string|null); + + /** ListVpcFlowLogsConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListVpcFlowLogsConfigsRequest. */ + class ListVpcFlowLogsConfigsRequest implements IListVpcFlowLogsConfigsRequest { + + /** + * Constructs a new ListVpcFlowLogsConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest); + + /** ListVpcFlowLogsConfigsRequest parent. */ + public parent: string; + + /** ListVpcFlowLogsConfigsRequest pageSize. */ + public pageSize: number; + + /** ListVpcFlowLogsConfigsRequest pageToken. */ + public pageToken: string; + + /** ListVpcFlowLogsConfigsRequest filter. */ + public filter: string; + + /** ListVpcFlowLogsConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVpcFlowLogsConfigsRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Verifies a ListVpcFlowLogsConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVpcFlowLogsConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; + + /** + * Creates a plain object from a ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. + * @param message ListVpcFlowLogsConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVpcFlowLogsConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVpcFlowLogsConfigsResponse. */ + interface IListVpcFlowLogsConfigsResponse { + + /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs */ + vpcFlowLogsConfigs?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null); + + /** ListVpcFlowLogsConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListVpcFlowLogsConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListVpcFlowLogsConfigsResponse. */ + class ListVpcFlowLogsConfigsResponse implements IListVpcFlowLogsConfigsResponse { + + /** + * Constructs a new ListVpcFlowLogsConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse); + + /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. */ + public vpcFlowLogsConfigs: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]; + + /** ListVpcFlowLogsConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListVpcFlowLogsConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVpcFlowLogsConfigsResponse instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Verifies a ListVpcFlowLogsConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVpcFlowLogsConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; + + /** + * Creates a plain object from a ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. + * @param message ListVpcFlowLogsConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVpcFlowLogsConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVpcFlowLogsConfigRequest. */ + interface IGetVpcFlowLogsConfigRequest { + + /** GetVpcFlowLogsConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetVpcFlowLogsConfigRequest. */ + class GetVpcFlowLogsConfigRequest implements IGetVpcFlowLogsConfigRequest { + + /** + * Constructs a new GetVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest); + + /** GetVpcFlowLogsConfigRequest name. */ + public name: string; + + /** + * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Verifies a GetVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message GetVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVpcFlowLogsConfigRequest. */ + interface ICreateVpcFlowLogsConfigRequest { + + /** CreateVpcFlowLogsConfigRequest parent */ + parent?: (string|null); + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId */ + vpcFlowLogsConfigId?: (string|null); + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ + vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + } + + /** Represents a CreateVpcFlowLogsConfigRequest. */ + class CreateVpcFlowLogsConfigRequest implements ICreateVpcFlowLogsConfigRequest { + + /** + * Constructs a new CreateVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest); + + /** CreateVpcFlowLogsConfigRequest parent. */ + public parent: string; + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. */ + public vpcFlowLogsConfigId: string; + + /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ + public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + + /** + * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Verifies a CreateVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message CreateVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateVpcFlowLogsConfigRequest. */ + interface IUpdateVpcFlowLogsConfigRequest { + + /** UpdateVpcFlowLogsConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ + vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + } + + /** Represents an UpdateVpcFlowLogsConfigRequest. */ + class UpdateVpcFlowLogsConfigRequest implements IUpdateVpcFlowLogsConfigRequest { + + /** + * Constructs a new UpdateVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest); + + /** UpdateVpcFlowLogsConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ + public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); + + /** + * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Verifies an UpdateVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message UpdateVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVpcFlowLogsConfigRequest. */ + interface IDeleteVpcFlowLogsConfigRequest { + + /** DeleteVpcFlowLogsConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteVpcFlowLogsConfigRequest. */ + class DeleteVpcFlowLogsConfigRequest implements IDeleteVpcFlowLogsConfigRequest { + + /** + * Constructs a new DeleteVpcFlowLogsConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest); + + /** DeleteVpcFlowLogsConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVpcFlowLogsConfigRequest instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Verifies a DeleteVpcFlowLogsConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVpcFlowLogsConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; + + /** + * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @param message DeleteVpcFlowLogsConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVpcFlowLogsConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVpcFlowLogsConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VpcFlowLogsConfig. */ + interface IVpcFlowLogsConfig { + + /** VpcFlowLogsConfig name */ + name?: (string|null); + + /** VpcFlowLogsConfig description */ + description?: (string|null); + + /** VpcFlowLogsConfig state */ + state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); + + /** VpcFlowLogsConfig aggregationInterval */ + aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); + + /** VpcFlowLogsConfig flowSampling */ + flowSampling?: (number|null); + + /** VpcFlowLogsConfig metadata */ + metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); + + /** VpcFlowLogsConfig metadataFields */ + metadataFields?: (string[]|null); + + /** VpcFlowLogsConfig filterExpr */ + filterExpr?: (string|null); + + /** VpcFlowLogsConfig interconnectAttachment */ + interconnectAttachment?: (string|null); + + /** VpcFlowLogsConfig vpnTunnel */ + vpnTunnel?: (string|null); + + /** VpcFlowLogsConfig labels */ + labels?: ({ [k: string]: string }|null); + + /** VpcFlowLogsConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** VpcFlowLogsConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a VpcFlowLogsConfig. */ + class VpcFlowLogsConfig implements IVpcFlowLogsConfig { + + /** + * Constructs a new VpcFlowLogsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig); + + /** VpcFlowLogsConfig name. */ + public name: string; + + /** VpcFlowLogsConfig description. */ + public description?: (string|null); + + /** VpcFlowLogsConfig state. */ + public state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); + + /** VpcFlowLogsConfig aggregationInterval. */ + public aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); + + /** VpcFlowLogsConfig flowSampling. */ + public flowSampling?: (number|null); + + /** VpcFlowLogsConfig metadata. */ + public metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); + + /** VpcFlowLogsConfig metadataFields. */ + public metadataFields: string[]; + + /** VpcFlowLogsConfig filterExpr. */ + public filterExpr?: (string|null); + + /** VpcFlowLogsConfig interconnectAttachment. */ + public interconnectAttachment?: (string|null); + + /** VpcFlowLogsConfig vpnTunnel. */ + public vpnTunnel?: (string|null); + + /** VpcFlowLogsConfig labels. */ + public labels: { [k: string]: string }; + + /** VpcFlowLogsConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** VpcFlowLogsConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** VpcFlowLogsConfig _description. */ + public _description?: "description"; + + /** VpcFlowLogsConfig _state. */ + public _state?: "state"; + + /** VpcFlowLogsConfig _aggregationInterval. */ + public _aggregationInterval?: "aggregationInterval"; + + /** VpcFlowLogsConfig _flowSampling. */ + public _flowSampling?: "flowSampling"; + + /** VpcFlowLogsConfig _metadata. */ + public _metadata?: "metadata"; + + /** VpcFlowLogsConfig _filterExpr. */ + public _filterExpr?: "filterExpr"; + + /** VpcFlowLogsConfig targetResource. */ + public targetResource?: ("interconnectAttachment"|"vpnTunnel"); + + /** + * Creates a new VpcFlowLogsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns VpcFlowLogsConfig instance + */ + public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @param message VpcFlowLogsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @param message VpcFlowLogsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Verifies a VpcFlowLogsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VpcFlowLogsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; + + /** + * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. + * @param message VpcFlowLogsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VpcFlowLogsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VpcFlowLogsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VpcFlowLogsConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2 + } + + /** AggregationInterval enum. */ + enum AggregationInterval { + AGGREGATION_INTERVAL_UNSPECIFIED = 0, + INTERVAL_5_SEC = 1, + INTERVAL_30_SEC = 2, + INTERVAL_1_MIN = 3, + INTERVAL_5_MIN = 4, + INTERVAL_10_MIN = 5, + INTERVAL_15_MIN = 6 + } + + /** Metadata enum. */ + enum Metadata { + METADATA_UNSPECIFIED = 0, + INCLUDE_ALL_METADATA = 1, + EXCLUDE_ALL_METADATA = 2, + CUSTOM_METADATA = 3 + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a 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 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 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of 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-networkmanagement/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js new file mode 100644 index 00000000000..2438db4bb8a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js @@ -0,0 +1,42968 @@ +// 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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.networkmanagement = (function() { + + /** + * Namespace networkmanagement. + * @memberof google.cloud + * @namespace + */ + var networkmanagement = {}; + + networkmanagement.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.networkmanagement + * @namespace + */ + var v1beta1 = {}; + + v1beta1.ConnectivityTest = (function() { + + /** + * Properties of a ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IConnectivityTest + * @property {string|null} [name] ConnectivityTest name + * @property {string|null} [description] ConnectivityTest description + * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [source] ConnectivityTest source + * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [destination] ConnectivityTest destination + * @property {string|null} [protocol] ConnectivityTest protocol + * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects + * @property {string|null} [displayName] ConnectivityTest displayName + * @property {Object.|null} [labels] ConnectivityTest labels + * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime + * @property {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails + * @property {google.cloud.networkmanagement.v1beta1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails + * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks + */ + + /** + * Constructs a new ConnectivityTest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ConnectivityTest. + * @implements IConnectivityTest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set + */ + function ConnectivityTest(properties) { + this.relatedProjects = []; + 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]]; + } + + /** + * ConnectivityTest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.name = ""; + + /** + * ConnectivityTest description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.description = ""; + + /** + * ConnectivityTest source. + * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} source + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.source = null; + + /** + * ConnectivityTest destination. + * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} destination + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.destination = null; + + /** + * ConnectivityTest protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.protocol = ""; + + /** + * ConnectivityTest relatedProjects. + * @member {Array.} relatedProjects + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.relatedProjects = $util.emptyArray; + + /** + * ConnectivityTest displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.displayName = ""; + + /** + * ConnectivityTest labels. + * @member {Object.} labels + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.labels = $util.emptyObject; + + /** + * ConnectivityTest createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.createTime = null; + + /** + * ConnectivityTest updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.updateTime = null; + + /** + * ConnectivityTest reachabilityDetails. + * @member {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null|undefined} reachabilityDetails + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.reachabilityDetails = null; + + /** + * ConnectivityTest probingDetails. + * @member {google.cloud.networkmanagement.v1beta1.IProbingDetails|null|undefined} probingDetails + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.probingDetails = null; + + /** + * ConnectivityTest bypassFirewallChecks. + * @member {boolean} bypassFirewallChecks + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + */ + ConnectivityTest.prototype.bypassFirewallChecks = false; + + /** + * Creates a new ConnectivityTest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest instance + */ + ConnectivityTest.create = function create(properties) { + return new ConnectivityTest(properties); + }; + + /** + * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encode = function encode(message, writer) { + if (!writer) + 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.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); + if (message.relatedProjects != null && message.relatedProjects.length) + for (var i = 0; i < message.relatedProjects.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) + $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) + $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); + return writer; + }; + + /** + * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); + break; + } + case 5: { + message.protocol = reader.string(); + break; + } + case 6: { + if (!(message.relatedProjects && message.relatedProjects.length)) + message.relatedProjects = []; + message.relatedProjects.push(reader.string()); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 8: { + 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 10: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.decode(reader, reader.uint32()); + break; + } + case 17: { + message.bypassFirewallChecks = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectivityTest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectivityTest.verify = function verify(message) { + if (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.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.source); + if (error) + return "source." + error; + } + if (message.destination != null && message.hasOwnProperty("destination")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.destination); + if (error) + return "destination." + error; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { + if (!Array.isArray(message.relatedProjects)) + return "relatedProjects: array expected"; + for (var i = 0; i < message.relatedProjects.length; ++i) + if (!$util.isString(message.relatedProjects[i])) + return "relatedProjects: string[] expected"; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify(message.reachabilityDetails); + if (error) + return "reachabilityDetails." + error; + } + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.verify(message.probingDetails); + if (error) + return "probingDetails." + error; + } + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + if (typeof message.bypassFirewallChecks !== "boolean") + return "bypassFirewallChecks: boolean expected"; + return null; + }; + + /** + * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest + */ + ConnectivityTest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.source: object expected"); + message.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.source); + } + if (object.destination != null) { + if (typeof object.destination !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.destination: object expected"); + message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.destination); + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.relatedProjects) { + if (!Array.isArray(object.relatedProjects)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.relatedProjects: array expected"); + message.relatedProjects = []; + for (var i = 0; i < object.relatedProjects.length; ++i) + message.relatedProjects[i] = String(object.relatedProjects[i]); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.reachabilityDetails != null) { + if (typeof object.reachabilityDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.reachabilityDetails: object expected"); + message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.fromObject(object.reachabilityDetails); + } + if (object.probingDetails != null) { + if (typeof object.probingDetails !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.probingDetails: object expected"); + message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.fromObject(object.probingDetails); + } + if (object.bypassFirewallChecks != null) + message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); + return message; + }; + + /** + * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} message ConnectivityTest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectivityTest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.relatedProjects = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.source = null; + object.destination = null; + object.protocol = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.reachabilityDetails = null; + object.probingDetails = null; + object.bypassFirewallChecks = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.source, options); + if (message.destination != null && message.hasOwnProperty("destination")) + object.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.destination, options); + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.relatedProjects && message.relatedProjects.length) { + object.relatedProjects = []; + for (var j = 0; j < message.relatedProjects.length; ++j) + object.relatedProjects[j] = message.relatedProjects[j]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) + object.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.toObject(message.reachabilityDetails, options); + if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) + object.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.toObject(message.probingDetails, options); + if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) + object.bypassFirewallChecks = message.bypassFirewallChecks; + return object; + }; + + /** + * Converts this ConnectivityTest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @instance + * @returns {Object.} JSON object + */ + ConnectivityTest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectivityTest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ConnectivityTest"; + }; + + return ConnectivityTest; + })(); + + v1beta1.Endpoint = (function() { + + /** + * Properties of an Endpoint. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IEndpoint + * @property {string|null} [ipAddress] Endpoint ipAddress + * @property {number|null} [port] Endpoint port + * @property {string|null} [instance] Endpoint instance + * @property {string|null} [forwardingRule] Endpoint forwardingRule + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget + * @property {string|null} [loadBalancerId] Endpoint loadBalancerId + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType + * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster + * @property {string|null} [fqdn] Endpoint fqdn + * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance + * @property {string|null} [redisInstance] Endpoint redisInstance + * @property {string|null} [redisCluster] Endpoint redisCluster + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision + * @property {string|null} [network] Endpoint network + * @property {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null} [networkType] Endpoint networkType + * @property {string|null} [projectId] Endpoint projectId + */ + + /** + * Constructs a new Endpoint. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an Endpoint. + * @implements IEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set + */ + function Endpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Endpoint ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.ipAddress = ""; + + /** + * Endpoint port. + * @member {number} port + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.port = 0; + + /** + * Endpoint instance. + * @member {string} instance + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.instance = ""; + + /** + * Endpoint forwardingRule. + * @member {string} forwardingRule + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRule = ""; + + /** + * Endpoint forwardingRuleTarget. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.forwardingRuleTarget = null; + + /** + * Endpoint loadBalancerId. + * @member {string|null|undefined} loadBalancerId + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerId = null; + + /** + * Endpoint loadBalancerType. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null|undefined} loadBalancerType + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.loadBalancerType = null; + + /** + * Endpoint gkeMasterCluster. + * @member {string} gkeMasterCluster + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.gkeMasterCluster = ""; + + /** + * Endpoint fqdn. + * @member {string} fqdn + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.fqdn = ""; + + /** + * Endpoint cloudSqlInstance. + * @member {string} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.cloudSqlInstance = ""; + + /** + * Endpoint redisInstance. + * @member {string} redisInstance + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.redisInstance = ""; + + /** + * Endpoint redisCluster. + * @member {string} redisCluster + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.redisCluster = ""; + + /** + * Endpoint cloudFunction. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.cloudFunction = null; + + /** + * Endpoint appEngineVersion. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.appEngineVersion = null; + + /** + * Endpoint cloudRunRevision. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.cloudRunRevision = null; + + /** + * Endpoint network. + * @member {string} network + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.network = ""; + + /** + * Endpoint networkType. + * @member {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType} networkType + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.networkType = 0; + + /** + * Endpoint projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Endpoint.prototype.projectId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Endpoint _forwardingRuleTarget. + * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { + get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerId. + * @member {"loadBalancerId"|undefined} _loadBalancerId + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Endpoint _loadBalancerType. + * @member {"loadBalancerType"|undefined} _loadBalancerType + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + */ + Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { + get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Endpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint instance + */ + Endpoint.create = function create(properties) { + return new Endpoint(properties); + }; + + /** + * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); + if (message.port != null && Object.hasOwnProperty.call(message, "port")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); + if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); + if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); + if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); + if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); + if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); + return writer; + }; + + /** + * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Endpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ipAddress = reader.string(); + break; + } + case 2: { + message.port = reader.int32(); + break; + } + case 3: { + message.instance = reader.string(); + break; + } + case 13: { + message.forwardingRule = reader.string(); + break; + } + case 14: { + message.forwardingRuleTarget = reader.int32(); + break; + } + case 15: { + message.loadBalancerId = reader.string(); + break; + } + case 16: { + message.loadBalancerType = reader.int32(); + break; + } + case 7: { + message.gkeMasterCluster = reader.string(); + break; + } + case 19: { + message.fqdn = reader.string(); + break; + } + case 8: { + message.cloudSqlInstance = reader.string(); + break; + } + case 17: { + message.redisInstance = reader.string(); + break; + } + case 18: { + message.redisCluster = reader.string(); + break; + } + case 10: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); + break; + } + case 11: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); + break; + } + case 12: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); + break; + } + case 4: { + message.network = reader.string(); + break; + } + case 5: { + message.networkType = reader.int32(); + break; + } + case 6: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Endpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Endpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Endpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Endpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.port != null && message.hasOwnProperty("port")) + if (!$util.isInteger(message.port)) + return "port: integer expected"; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + if (!$util.isString(message.forwardingRule)) + return "forwardingRule: string expected"; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + properties._forwardingRuleTarget = 1; + switch (message.forwardingRuleTarget) { + default: + return "forwardingRuleTarget: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + properties._loadBalancerId = 1; + if (!$util.isString(message.loadBalancerId)) + return "loadBalancerId: string expected"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + properties._loadBalancerType = 1; + switch (message.loadBalancerType) { + default: + return "loadBalancerType: 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: + break; + } + } + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + if (!$util.isString(message.gkeMasterCluster)) + return "gkeMasterCluster: string expected"; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + if (!$util.isString(message.fqdn)) + return "fqdn: string expected"; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + if (!$util.isString(message.cloudSqlInstance)) + return "cloudSqlInstance: string expected"; + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + if (!$util.isString(message.redisInstance)) + return "redisInstance: string expected"; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + if (!$util.isString(message.redisCluster)) + return "redisCluster: string expected"; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.networkType != null && message.hasOwnProperty("networkType")) + switch (message.networkType) { + default: + return "networkType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint + */ + Endpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.port != null) + message.port = object.port | 0; + if (object.instance != null) + message.instance = String(object.instance); + if (object.forwardingRule != null) + message.forwardingRule = String(object.forwardingRule); + switch (object.forwardingRuleTarget) { + default: + if (typeof object.forwardingRuleTarget === "number") { + message.forwardingRuleTarget = object.forwardingRuleTarget; + break; + } + break; + case "FORWARDING_RULE_TARGET_UNSPECIFIED": + case 0: + message.forwardingRuleTarget = 0; + break; + case "INSTANCE": + case 1: + message.forwardingRuleTarget = 1; + break; + case "LOAD_BALANCER": + case 2: + message.forwardingRuleTarget = 2; + break; + case "VPN_GATEWAY": + case 3: + message.forwardingRuleTarget = 3; + break; + case "PSC": + case 4: + message.forwardingRuleTarget = 4; + break; + } + if (object.loadBalancerId != null) + message.loadBalancerId = String(object.loadBalancerId); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "HTTPS_ADVANCED_LOAD_BALANCER": + case 1: + message.loadBalancerType = 1; + break; + case "HTTPS_LOAD_BALANCER": + case 2: + message.loadBalancerType = 2; + break; + case "REGIONAL_HTTPS_LOAD_BALANCER": + case 3: + message.loadBalancerType = 3; + break; + case "INTERNAL_HTTPS_LOAD_BALANCER": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY_LOAD_BALANCER": + case 5: + message.loadBalancerType = 5; + break; + case "TCP_PROXY_LOAD_BALANCER": + case 6: + message.loadBalancerType = 6; + break; + case "INTERNAL_TCP_PROXY_LOAD_BALANCER": + case 7: + message.loadBalancerType = 7; + break; + case "NETWORK_LOAD_BALANCER": + case 8: + message.loadBalancerType = 8; + break; + case "LEGACY_NETWORK_LOAD_BALANCER": + case 9: + message.loadBalancerType = 9; + break; + case "TCP_UDP_INTERNAL_LOAD_BALANCER": + case 10: + message.loadBalancerType = 10; + break; + } + if (object.gkeMasterCluster != null) + message.gkeMasterCluster = String(object.gkeMasterCluster); + if (object.fqdn != null) + message.fqdn = String(object.fqdn); + if (object.cloudSqlInstance != null) + message.cloudSqlInstance = String(object.cloudSqlInstance); + if (object.redisInstance != null) + message.redisInstance = String(object.redisInstance); + if (object.redisCluster != null) + message.redisCluster = String(object.redisCluster); + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); + } + if (object.network != null) + message.network = String(object.network); + switch (object.networkType) { + default: + if (typeof object.networkType === "number") { + message.networkType = object.networkType; + break; + } + break; + case "NETWORK_TYPE_UNSPECIFIED": + case 0: + message.networkType = 0; + break; + case "GCP_NETWORK": + case 1: + message.networkType = 1; + break; + case "NON_GCP_NETWORK": + case 2: + message.networkType = 2; + break; + } + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from an Endpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint} message Endpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Endpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.ipAddress = ""; + object.port = 0; + object.instance = ""; + object.network = ""; + object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; + object.projectId = ""; + object.gkeMasterCluster = ""; + object.cloudSqlInstance = ""; + object.cloudFunction = null; + object.appEngineVersion = null; + object.cloudRunRevision = null; + object.forwardingRule = ""; + object.redisInstance = ""; + object.redisCluster = ""; + object.fqdn = ""; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.port != null && message.hasOwnProperty("port")) + object.port = message.port; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.networkType != null && message.hasOwnProperty("networkType")) + object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] : message.networkType; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) + object.gkeMasterCluster = message.gkeMasterCluster; + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) + object.cloudSqlInstance = message.cloudSqlInstance; + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) + object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) + object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) + object.forwardingRule = message.forwardingRule; + if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { + object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; + if (options.oneofs) + object._forwardingRuleTarget = "forwardingRuleTarget"; + } + if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { + object.loadBalancerId = message.loadBalancerId; + if (options.oneofs) + object._loadBalancerId = "loadBalancerId"; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (options.oneofs) + object._loadBalancerType = "loadBalancerType"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) + object.redisInstance = message.redisInstance; + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) + object.redisCluster = message.redisCluster; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + object.fqdn = message.fqdn; + return object; + }; + + /** + * Converts this Endpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @instance + * @returns {Object.} JSON object + */ + Endpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Endpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint"; + }; + + /** + * NetworkType enum. + * @name google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType + * @enum {number} + * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value + * @property {number} GCP_NETWORK=1 GCP_NETWORK value + * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value + */ + Endpoint.NetworkType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GCP_NETWORK"] = 1; + values[valuesById[2] = "NON_GCP_NETWORK"] = 2; + return values; + })(); + + /** + * ForwardingRuleTarget enum. + * @name google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget + * @enum {number} + * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value + * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value + * @property {number} PSC=4 PSC value + */ + Endpoint.ForwardingRuleTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "LOAD_BALANCER"] = 2; + values[valuesById[3] = "VPN_GATEWAY"] = 3; + values[valuesById[4] = "PSC"] = 4; + return values; + })(); + + Endpoint.CloudFunctionEndpoint = (function() { + + /** + * Properties of a CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @interface ICloudFunctionEndpoint + * @property {string|null} [uri] CloudFunctionEndpoint uri + */ + + /** + * Constructs a new CloudFunctionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @classdesc Represents a CloudFunctionEndpoint. + * @implements ICloudFunctionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + */ + function CloudFunctionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @instance + */ + CloudFunctionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudFunctionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance + */ + CloudFunctionEndpoint.create = function create(properties) { + return new CloudFunctionEndpoint(properties); + }; + + /** + * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint + */ + CloudFunctionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudFunctionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint"; + }; + + return CloudFunctionEndpoint; + })(); + + Endpoint.AppEngineVersionEndpoint = (function() { + + /** + * Properties of an AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @interface IAppEngineVersionEndpoint + * @property {string|null} [uri] AppEngineVersionEndpoint uri + */ + + /** + * Constructs a new AppEngineVersionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @classdesc Represents an AppEngineVersionEndpoint. + * @implements IAppEngineVersionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + */ + function AppEngineVersionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @instance + */ + AppEngineVersionEndpoint.prototype.uri = ""; + + /** + * Creates a new AppEngineVersionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance + */ + AppEngineVersionEndpoint.create = function create(properties) { + return new AppEngineVersionEndpoint(properties); + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint + */ + AppEngineVersionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this AppEngineVersionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint"; + }; + + return AppEngineVersionEndpoint; + })(); + + Endpoint.CloudRunRevisionEndpoint = (function() { + + /** + * Properties of a CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @interface ICloudRunRevisionEndpoint + * @property {string|null} [uri] CloudRunRevisionEndpoint uri + */ + + /** + * Constructs a new CloudRunRevisionEndpoint. + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint + * @classdesc Represents a CloudRunRevisionEndpoint. + * @implements ICloudRunRevisionEndpoint + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + */ + function CloudRunRevisionEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionEndpoint uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @instance + */ + CloudRunRevisionEndpoint.prototype.uri = ""; + + /** + * Creates a new CloudRunRevisionEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance + */ + CloudRunRevisionEndpoint.create = function create(properties) { + return new CloudRunRevisionEndpoint(properties); + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.uri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionEndpoint message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint + */ + CloudRunRevisionEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); + if (object.uri != null) + message.uri = String(object.uri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uri = ""; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + return object; + }; + + /** + * Converts this CloudRunRevisionEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionEndpoint + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint"; + }; + + return CloudRunRevisionEndpoint; + })(); + + return Endpoint; + })(); + + v1beta1.ReachabilityDetails = (function() { + + /** + * Properties of a ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IReachabilityDetails + * @property {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error + * @property {Array.|null} [traces] ReachabilityDetails traces + */ + + /** + * Constructs a new ReachabilityDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ReachabilityDetails. + * @implements IReachabilityDetails + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set + */ + function ReachabilityDetails(properties) { + this.traces = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReachabilityDetails result. + * @member {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result} result + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.result = 0; + + /** + * ReachabilityDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.verifyTime = null; + + /** + * ReachabilityDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.error = null; + + /** + * ReachabilityDetails traces. + * @member {Array.} traces + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + */ + ReachabilityDetails.prototype.traces = $util.emptyArray; + + /** + * Creates a new ReachabilityDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails instance + */ + ReachabilityDetails.create = function create(properties) { + return new ReachabilityDetails(properties); + }; + + /** + * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.traces != null && message.traces.length) + for (var i = 0; i < message.traces.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + if (!(message.traces && message.traces.length)) + message.traces = []; + message.traces.push($root.google.cloud.networkmanagement.v1beta1.Trace.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReachabilityDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReachabilityDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 4: + case 5: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.traces != null && message.hasOwnProperty("traces")) { + if (!Array.isArray(message.traces)) + return "traces: array expected"; + for (var i = 0; i < message.traces.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.Trace.verify(message.traces[i]); + if (error) + return "traces." + error; + } + } + return null; + }; + + /** + * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails + */ + ReachabilityDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "AMBIGUOUS": + case 4: + message.result = 4; + break; + case "UNDETERMINED": + case 5: + message.result = 5; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.traces) { + if (!Array.isArray(object.traces)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: array expected"); + message.traces = []; + for (var i = 0; i < object.traces.length; ++i) { + if (typeof object.traces[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: object expected"); + message.traces[i] = $root.google.cloud.networkmanagement.v1beta1.Trace.fromObject(object.traces[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} message ReachabilityDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReachabilityDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.traces = []; + if (options.defaults) { + object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.traces && message.traces.length) { + object.traces = []; + for (var j = 0; j < message.traces.length; ++j) + object.traces[j] = $root.google.cloud.networkmanagement.v1beta1.Trace.toObject(message.traces[j], options); + } + return object; + }; + + /** + * Converts this ReachabilityDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @instance + * @returns {Object.} JSON object + */ + ReachabilityDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReachabilityDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ReachabilityDetails"; + }; + + /** + * Result enum. + * @name google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result + * @enum {number} + * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} AMBIGUOUS=4 AMBIGUOUS value + * @property {number} UNDETERMINED=5 UNDETERMINED value + */ + ReachabilityDetails.Result = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[4] = "AMBIGUOUS"] = 4; + values[valuesById[5] = "UNDETERMINED"] = 5; + return values; + })(); + + return ReachabilityDetails; + })(); + + v1beta1.LatencyPercentile = (function() { + + /** + * Properties of a LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILatencyPercentile + * @property {number|null} [percent] LatencyPercentile percent + * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros + */ + + /** + * Constructs a new LatencyPercentile. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LatencyPercentile. + * @implements ILatencyPercentile + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set + */ + function LatencyPercentile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyPercentile percent. + * @member {number} percent + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.percent = 0; + + /** + * LatencyPercentile latencyMicros. + * @member {number|Long} latencyMicros + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @instance + */ + LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LatencyPercentile instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile instance + */ + LatencyPercentile.create = function create(properties) { + return new LatencyPercentile(properties); + }; + + /** + * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); + if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); + return writer; + }; + + /** + * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.percent = reader.int32(); + break; + } + case 2: { + message.latencyMicros = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyPercentile message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyPercentile.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.percent != null && message.hasOwnProperty("percent")) + if (!$util.isInteger(message.percent)) + return "percent: integer expected"; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) + return "latencyMicros: integer|Long expected"; + return null; + }; + + /** + * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile + */ + LatencyPercentile.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); + if (object.percent != null) + message.percent = object.percent | 0; + if (object.latencyMicros != null) + if ($util.Long) + (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; + else if (typeof object.latencyMicros === "string") + message.latencyMicros = parseInt(object.latencyMicros, 10); + else if (typeof object.latencyMicros === "number") + message.latencyMicros = object.latencyMicros; + else if (typeof object.latencyMicros === "object") + message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {google.cloud.networkmanagement.v1beta1.LatencyPercentile} message LatencyPercentile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyPercentile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.percent = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.latencyMicros = options.longs === String ? "0" : 0; + } + if (message.percent != null && message.hasOwnProperty("percent")) + object.percent = message.percent; + if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) + if (typeof message.latencyMicros === "number") + object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; + else + object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; + return object; + }; + + /** + * Converts this LatencyPercentile to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @instance + * @returns {Object.} JSON object + */ + LatencyPercentile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyPercentile + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyPercentile"; + }; + + return LatencyPercentile; + })(); + + v1beta1.LatencyDistribution = (function() { + + /** + * Properties of a LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILatencyDistribution + * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles + */ + + /** + * Constructs a new LatencyDistribution. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LatencyDistribution. + * @implements ILatencyDistribution + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set + */ + function LatencyDistribution(properties) { + this.latencyPercentiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LatencyDistribution latencyPercentiles. + * @member {Array.} latencyPercentiles + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @instance + */ + LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; + + /** + * Creates a new LatencyDistribution instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution instance + */ + LatencyDistribution.create = function create(properties) { + return new LatencyDistribution(properties); + }; + + /** + * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.latencyPercentiles != null && message.latencyPercentiles.length) + for (var i = 0; i < message.latencyPercentiles.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.latencyPercentiles && message.latencyPercentiles.length)) + message.latencyPercentiles = []; + message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LatencyDistribution message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LatencyDistribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { + if (!Array.isArray(message.latencyPercentiles)) + return "latencyPercentiles: array expected"; + for (var i = 0; i < message.latencyPercentiles.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify(message.latencyPercentiles[i]); + if (error) + return "latencyPercentiles." + error; + } + } + return null; + }; + + /** + * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution + */ + LatencyDistribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); + if (object.latencyPercentiles) { + if (!Array.isArray(object.latencyPercentiles)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: array expected"); + message.latencyPercentiles = []; + for (var i = 0; i < object.latencyPercentiles.length; ++i) { + if (typeof object.latencyPercentiles[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: object expected"); + message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {google.cloud.networkmanagement.v1beta1.LatencyDistribution} message LatencyDistribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LatencyDistribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.latencyPercentiles = []; + if (message.latencyPercentiles && message.latencyPercentiles.length) { + object.latencyPercentiles = []; + for (var j = 0; j < message.latencyPercentiles.length; ++j) + object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); + } + return object; + }; + + /** + * Converts this LatencyDistribution to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @instance + * @returns {Object.} JSON object + */ + LatencyDistribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LatencyDistribution + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyDistribution"; + }; + + return LatencyDistribution; + })(); + + v1beta1.ProbingDetails = (function() { + + /** + * Properties of a ProbingDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IProbingDetails + * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result + * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime + * @property {google.rpc.IStatus|null} [error] ProbingDetails error + * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause + * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount + * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount + * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo + * @property {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency + * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation + */ + + /** + * Constructs a new ProbingDetails. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ProbingDetails. + * @implements IProbingDetails + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set + */ + function ProbingDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProbingDetails result. + * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult} result + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.result = 0; + + /** + * ProbingDetails verifyTime. + * @member {google.protobuf.ITimestamp|null|undefined} verifyTime + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.verifyTime = null; + + /** + * ProbingDetails error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.error = null; + + /** + * ProbingDetails abortCause. + * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause} abortCause + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.abortCause = 0; + + /** + * ProbingDetails sentProbeCount. + * @member {number} sentProbeCount + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.sentProbeCount = 0; + + /** + * ProbingDetails successfulProbeCount. + * @member {number} successfulProbeCount + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.successfulProbeCount = 0; + + /** + * ProbingDetails endpointInfo. + * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.endpointInfo = null; + + /** + * ProbingDetails probingLatency. + * @member {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null|undefined} probingLatency + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.probingLatency = null; + + /** + * ProbingDetails destinationEgressLocation. + * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + */ + ProbingDetails.prototype.destinationEgressLocation = null; + + /** + * Creates a new ProbingDetails instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails instance + */ + ProbingDetails.create = function create(properties) { + return new ProbingDetails(properties); + }; + + /** + * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); + if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) + $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); + if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); + if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) + $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) + $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.result = reader.int32(); + break; + } + case 2: { + message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 4: { + message.abortCause = reader.int32(); + break; + } + case 5: { + message.sentProbeCount = reader.int32(); + break; + } + case 6: { + message.successfulProbeCount = reader.int32(); + break; + } + case 7: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.decode(reader, reader.uint32()); + break; + } + case 9: { + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProbingDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProbingDetails message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProbingDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.result != null && message.hasOwnProperty("result")) + switch (message.result) { + default: + return "result: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); + if (error) + return "verifyTime." + error; + } + if (message.error != null && message.hasOwnProperty("error")) { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + switch (message.abortCause) { + default: + return "abortCause: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + if (!$util.isInteger(message.sentProbeCount)) + return "sentProbeCount: integer expected"; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + if (!$util.isInteger(message.successfulProbeCount)) + return "successfulProbeCount: integer expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { + var error = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify(message.probingLatency); + if (error) + return "probingLatency." + error; + } + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); + if (error) + return "destinationEgressLocation." + error; + } + return null; + }; + + /** + * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails + */ + ProbingDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); + switch (object.result) { + default: + if (typeof object.result === "number") { + message.result = object.result; + break; + } + break; + case "PROBING_RESULT_UNSPECIFIED": + case 0: + message.result = 0; + break; + case "REACHABLE": + case 1: + message.result = 1; + break; + case "UNREACHABLE": + case 2: + message.result = 2; + break; + case "REACHABILITY_INCONSISTENT": + case 3: + message.result = 3; + break; + case "UNDETERMINED": + case 4: + message.result = 4; + break; + } + if (object.verifyTime != null) { + if (typeof object.verifyTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.verifyTime: object expected"); + message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); + } + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + switch (object.abortCause) { + default: + if (typeof object.abortCause === "number") { + message.abortCause = object.abortCause; + break; + } + break; + case "PROBING_ABORT_CAUSE_UNSPECIFIED": + case 0: + message.abortCause = 0; + break; + case "PERMISSION_DENIED": + case 1: + message.abortCause = 1; + break; + case "NO_SOURCE_LOCATION": + case 2: + message.abortCause = 2; + break; + } + if (object.sentProbeCount != null) + message.sentProbeCount = object.sentProbeCount | 0; + if (object.successfulProbeCount != null) + message.successfulProbeCount = object.successfulProbeCount | 0; + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.probingLatency != null) { + if (typeof object.probingLatency !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.probingLatency: object expected"); + message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.fromObject(object.probingLatency); + } + if (object.destinationEgressLocation != null) { + if (typeof object.destinationEgressLocation !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.destinationEgressLocation: object expected"); + message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); + } + return message; + }; + + /** + * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails} message ProbingDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProbingDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; + object.verifyTime = null; + object.error = null; + object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; + object.sentProbeCount = 0; + object.successfulProbeCount = 0; + object.endpointInfo = null; + object.probingLatency = null; + object.destinationEgressLocation = null; + } + if (message.result != null && message.hasOwnProperty("result")) + object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] : message.result; + if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) + object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); + if (message.error != null && message.hasOwnProperty("error")) + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (message.abortCause != null && message.hasOwnProperty("abortCause")) + object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; + if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) + object.sentProbeCount = message.sentProbeCount; + if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) + object.successfulProbeCount = message.successfulProbeCount; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) + object.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.toObject(message.probingLatency, options); + if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) + object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); + return object; + }; + + /** + * Converts this ProbingDetails to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @instance + * @returns {Object.} JSON object + */ + ProbingDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProbingDetails + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails"; + }; + + /** + * ProbingResult enum. + * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult + * @enum {number} + * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value + * @property {number} REACHABLE=1 REACHABLE value + * @property {number} UNREACHABLE=2 UNREACHABLE value + * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value + * @property {number} UNDETERMINED=4 UNDETERMINED value + */ + ProbingDetails.ProbingResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "REACHABLE"] = 1; + values[valuesById[2] = "UNREACHABLE"] = 2; + values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; + values[valuesById[4] = "UNDETERMINED"] = 4; + return values; + })(); + + /** + * ProbingAbortCause enum. + * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause + * @enum {number} + * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value + * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value + * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value + */ + ProbingDetails.ProbingAbortCause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PERMISSION_DENIED"] = 1; + values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; + return values; + })(); + + ProbingDetails.EdgeLocation = (function() { + + /** + * Properties of an EdgeLocation. + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @interface IEdgeLocation + * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea + */ + + /** + * Constructs a new EdgeLocation. + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails + * @classdesc Represents an EdgeLocation. + * @implements IEdgeLocation + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + */ + function EdgeLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EdgeLocation metropolitanArea. + * @member {string} metropolitanArea + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @instance + */ + EdgeLocation.prototype.metropolitanArea = ""; + + /** + * Creates a new EdgeLocation instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation instance + */ + EdgeLocation.create = function create(properties) { + return new EdgeLocation(properties); + }; + + /** + * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); + return writer; + }; + + /** + * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metropolitanArea = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EdgeLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EdgeLocation message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EdgeLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + if (!$util.isString(message.metropolitanArea)) + return "metropolitanArea: string expected"; + return null; + }; + + /** + * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation + */ + EdgeLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); + if (object.metropolitanArea != null) + message.metropolitanArea = String(object.metropolitanArea); + return message; + }; + + /** + * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} message EdgeLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EdgeLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metropolitanArea = ""; + if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) + object.metropolitanArea = message.metropolitanArea; + return object; + }; + + /** + * Converts this EdgeLocation to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @instance + * @returns {Object.} JSON object + */ + EdgeLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EdgeLocation + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation"; + }; + + return EdgeLocation; + })(); + + return ProbingDetails; + })(); + + v1beta1.Trace = (function() { + + /** + * Properties of a Trace. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ITrace + * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo + * @property {Array.|null} [steps] Trace steps + * @property {number|null} [forwardTraceId] Trace forwardTraceId + */ + + /** + * Constructs a new Trace. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a Trace. + * @implements ITrace + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set + */ + function Trace(properties) { + this.steps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trace endpointInfo. + * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + */ + Trace.prototype.endpointInfo = null; + + /** + * Trace steps. + * @member {Array.} steps + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + */ + Trace.prototype.steps = $util.emptyArray; + + /** + * Trace forwardTraceId. + * @member {number} forwardTraceId + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + */ + Trace.prototype.forwardTraceId = 0; + + /** + * Creates a new Trace instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace instance + */ + Trace.create = function create(properties) { + return new Trace(properties); + }; + + /** + * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) + $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); + return writer; + }; + + /** + * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trace.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trace message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.cloud.networkmanagement.v1beta1.Step.decode(reader, reader.uint32())); + break; + } + case 4: { + message.forwardTraceId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Trace message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trace.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trace message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trace.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { + var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); + if (error) + return "endpointInfo." + error; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.Step.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + if (!$util.isInteger(message.forwardTraceId)) + return "forwardTraceId: integer expected"; + return null; + }; + + /** + * Creates a Trace message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace + */ + Trace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Trace) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); + if (object.endpointInfo != null) { + if (typeof object.endpointInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.endpointInfo: object expected"); + message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: object expected"); + message.steps[i] = $root.google.cloud.networkmanagement.v1beta1.Step.fromObject(object.steps[i]); + } + } + if (object.forwardTraceId != null) + message.forwardTraceId = object.forwardTraceId | 0; + return message; + }; + + /** + * Creates a plain object from a Trace message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {google.cloud.networkmanagement.v1beta1.Trace} message Trace + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trace.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.steps = []; + if (options.defaults) { + object.endpointInfo = null; + object.forwardTraceId = 0; + } + if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) + object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.cloud.networkmanagement.v1beta1.Step.toObject(message.steps[j], options); + } + if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) + object.forwardTraceId = message.forwardTraceId; + return object; + }; + + /** + * Converts this Trace to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @instance + * @returns {Object.} JSON object + */ + Trace.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trace + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Trace + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Trace"; + }; + + return Trace; + })(); + + v1beta1.Step = (function() { + + /** + * Properties of a Step. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IStep + * @property {string|null} [description] Step description + * @property {google.cloud.networkmanagement.v1beta1.Step.State|null} [state] Step state + * @property {boolean|null} [causesDrop] Step causesDrop + * @property {string|null} [projectId] Step projectId + * @property {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null} [instance] Step instance + * @property {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null} [firewall] Step firewall + * @property {google.cloud.networkmanagement.v1beta1.IRouteInfo|null} [route] Step route + * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpoint] Step endpoint + * @property {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null} [googleService] Step googleService + * @property {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule + * @property {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway + * @property {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel + * @property {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector + * @property {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null} [deliver] Step deliver + * @property {google.cloud.networkmanagement.v1beta1.IForwardInfo|null} [forward] Step forward + * @property {google.cloud.networkmanagement.v1beta1.IAbortInfo|null} [abort] Step abort + * @property {google.cloud.networkmanagement.v1beta1.IDropInfo|null} [drop] Step drop + * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer + * @property {google.cloud.networkmanagement.v1beta1.INetworkInfo|null} [network] Step network + * @property {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster + * @property {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance + * @property {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance + * @property {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null} [redisCluster] Step redisCluster + * @property {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction + * @property {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion + * @property {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision + * @property {google.cloud.networkmanagement.v1beta1.INatInfo|null} [nat] Step nat + * @property {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection + * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo + * @property {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null} [storageBucket] Step storageBucket + * @property {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg + */ + + /** + * Constructs a new Step. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a Step. + * @implements IStep + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set + */ + function Step(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Step description. + * @member {string} description + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.description = ""; + + /** + * Step state. + * @member {google.cloud.networkmanagement.v1beta1.Step.State} state + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.state = 0; + + /** + * Step causesDrop. + * @member {boolean} causesDrop + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.causesDrop = false; + + /** + * Step projectId. + * @member {string} projectId + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.projectId = ""; + + /** + * Step instance. + * @member {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null|undefined} instance + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.instance = null; + + /** + * Step firewall. + * @member {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null|undefined} firewall + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.firewall = null; + + /** + * Step route. + * @member {google.cloud.networkmanagement.v1beta1.IRouteInfo|null|undefined} route + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.route = null; + + /** + * Step endpoint. + * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpoint + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.endpoint = null; + + /** + * Step googleService. + * @member {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null|undefined} googleService + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.googleService = null; + + /** + * Step forwardingRule. + * @member {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null|undefined} forwardingRule + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.forwardingRule = null; + + /** + * Step vpnGateway. + * @member {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null|undefined} vpnGateway + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.vpnGateway = null; + + /** + * Step vpnTunnel. + * @member {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null|undefined} vpnTunnel + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.vpnTunnel = null; + + /** + * Step vpcConnector. + * @member {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null|undefined} vpcConnector + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.vpcConnector = null; + + /** + * Step deliver. + * @member {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null|undefined} deliver + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.deliver = null; + + /** + * Step forward. + * @member {google.cloud.networkmanagement.v1beta1.IForwardInfo|null|undefined} forward + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.forward = null; + + /** + * Step abort. + * @member {google.cloud.networkmanagement.v1beta1.IAbortInfo|null|undefined} abort + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.abort = null; + + /** + * Step drop. + * @member {google.cloud.networkmanagement.v1beta1.IDropInfo|null|undefined} drop + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.drop = null; + + /** + * Step loadBalancer. + * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null|undefined} loadBalancer + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.loadBalancer = null; + + /** + * Step network. + * @member {google.cloud.networkmanagement.v1beta1.INetworkInfo|null|undefined} network + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.network = null; + + /** + * Step gkeMaster. + * @member {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null|undefined} gkeMaster + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.gkeMaster = null; + + /** + * Step cloudSqlInstance. + * @member {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.cloudSqlInstance = null; + + /** + * Step redisInstance. + * @member {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null|undefined} redisInstance + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.redisInstance = null; + + /** + * Step redisCluster. + * @member {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null|undefined} redisCluster + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.redisCluster = null; + + /** + * Step cloudFunction. + * @member {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null|undefined} cloudFunction + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.cloudFunction = null; + + /** + * Step appEngineVersion. + * @member {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null|undefined} appEngineVersion + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.appEngineVersion = null; + + /** + * Step cloudRunRevision. + * @member {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.cloudRunRevision = null; + + /** + * Step nat. + * @member {google.cloud.networkmanagement.v1beta1.INatInfo|null|undefined} nat + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.nat = null; + + /** + * Step proxyConnection. + * @member {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null|undefined} proxyConnection + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.proxyConnection = null; + + /** + * Step loadBalancerBackendInfo. + * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.loadBalancerBackendInfo = null; + + /** + * Step storageBucket. + * @member {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null|undefined} storageBucket + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.storageBucket = null; + + /** + * Step serverlessNeg. + * @member {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null|undefined} serverlessNeg + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Step.prototype.serverlessNeg = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Step stepInfo. + * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + */ + Object.defineProperty(Step.prototype, "stepInfo", { + get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Step instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step instance + */ + Step.create = function create(properties) { + return new Step(properties); + }; + + /** + * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) + $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.route != null && Object.hasOwnProperty.call(message, "route")) + $root.google.cloud.networkmanagement.v1beta1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) + $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) + $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) + $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) + $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) + $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) + $root.google.cloud.networkmanagement.v1beta1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) + $root.google.cloud.networkmanagement.v1beta1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) + $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) + $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) + $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) + $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) + $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) + $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) + $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) + $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) + $root.google.cloud.networkmanagement.v1beta1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) + $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) + $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) + $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) + $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) + $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Step.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Step message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Step(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + message.causesDrop = reader.bool(); + break; + } + case 4: { + message.projectId = reader.string(); + break; + } + case 5: { + message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.decode(reader, reader.uint32()); + break; + } + case 7: { + message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); + break; + } + case 24: { + message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.decode(reader, reader.uint32()); + break; + } + case 9: { + message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.decode(reader, reader.uint32()); + break; + } + case 10: { + message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.decode(reader, reader.uint32()); + break; + } + case 11: { + message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.decode(reader, reader.uint32()); + break; + } + case 21: { + message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.decode(reader, reader.uint32()); + break; + } + case 13: { + message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.decode(reader, reader.uint32()); + break; + } + case 14: { + message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.decode(reader, reader.uint32()); + break; + } + case 15: { + message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.decode(reader, reader.uint32()); + break; + } + case 16: { + message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.decode(reader, reader.uint32()); + break; + } + case 17: { + message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.decode(reader, reader.uint32()); + break; + } + case 18: { + message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.decode(reader, reader.uint32()); + break; + } + case 19: { + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 30: { + message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.decode(reader, reader.uint32()); + break; + } + case 31: { + message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.decode(reader, reader.uint32()); + break; + } + case 20: { + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.decode(reader, reader.uint32()); + break; + } + case 22: { + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.decode(reader, reader.uint32()); + break; + } + case 23: { + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.decode(reader, reader.uint32()); + break; + } + case 26: { + message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.decode(reader, reader.uint32()); + break; + } + case 27: { + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); + break; + } + case 28: { + message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.decode(reader, reader.uint32()); + break; + } + case 29: { + message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Step message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Step.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Step message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Step.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 27: + case 3: + case 21: + case 22: + case 32: + case 33: + case 23: + case 25: + case 26: + case 29: + case 30: + case 31: + case 4: + case 5: + case 6: + case 7: + case 28: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 24: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + break; + } + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + if (typeof message.causesDrop !== "boolean") + return "causesDrop: boolean expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) { + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.verify(message.instance); + if (error) + return "instance." + error; + } + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.verify(message.firewall); + if (error) + return "firewall." + error; + } + } + if (message.route != null && message.hasOwnProperty("route")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.verify(message.route); + if (error) + return "route." + error; + } + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpoint); + if (error) + return "endpoint." + error; + } + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify(message.googleService); + if (error) + return "googleService." + error; + } + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify(message.forwardingRule); + if (error) + return "forwardingRule." + error; + } + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify(message.vpnGateway); + if (error) + return "vpnGateway." + error; + } + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify(message.vpnTunnel); + if (error) + return "vpnTunnel." + error; + } + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify(message.vpcConnector); + if (error) + return "vpcConnector." + error; + } + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.verify(message.deliver); + if (error) + return "deliver." + error; + } + } + if (message.forward != null && message.hasOwnProperty("forward")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.verify(message.forward); + if (error) + return "forward." + error; + } + } + if (message.abort != null && message.hasOwnProperty("abort")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.verify(message.abort); + if (error) + return "abort." + error; + } + } + if (message.drop != null && message.hasOwnProperty("drop")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.DropInfo.verify(message.drop); + if (error) + return "drop." + error; + } + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify(message.loadBalancer); + if (error) + return "loadBalancer." + error; + } + } + if (message.network != null && message.hasOwnProperty("network")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.verify(message.network); + if (error) + return "network." + error; + } + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify(message.gkeMaster); + if (error) + return "gkeMaster." + error; + } + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); + if (error) + return "cloudSqlInstance." + error; + } + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify(message.redisInstance); + if (error) + return "redisInstance." + error; + } + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify(message.redisCluster); + if (error) + return "redisCluster." + error; + } + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify(message.cloudFunction); + if (error) + return "cloudFunction." + error; + } + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify(message.appEngineVersion); + if (error) + return "appEngineVersion." + error; + } + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify(message.cloudRunRevision); + if (error) + return "cloudRunRevision." + error; + } + } + if (message.nat != null && message.hasOwnProperty("nat")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.NatInfo.verify(message.nat); + if (error) + return "nat." + error; + } + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify(message.proxyConnection); + if (error) + return "proxyConnection." + error; + } + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); + if (error) + return "loadBalancerBackendInfo." + error; + } + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify(message.storageBucket); + if (error) + return "storageBucket." + error; + } + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + if (properties.stepInfo === 1) + return "stepInfo: multiple values"; + properties.stepInfo = 1; + { + var error = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify(message.serverlessNeg); + if (error) + return "serverlessNeg." + error; + } + } + return null; + }; + + /** + * Creates a Step message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.Step} Step + */ + Step.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Step) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.Step(); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "START_FROM_INSTANCE": + case 1: + message.state = 1; + break; + case "START_FROM_INTERNET": + case 2: + message.state = 2; + break; + case "START_FROM_GOOGLE_SERVICE": + case 27: + message.state = 27; + break; + case "START_FROM_PRIVATE_NETWORK": + case 3: + message.state = 3; + break; + case "START_FROM_GKE_MASTER": + case 21: + message.state = 21; + break; + case "START_FROM_CLOUD_SQL_INSTANCE": + case 22: + message.state = 22; + break; + case "START_FROM_REDIS_INSTANCE": + case 32: + message.state = 32; + break; + case "START_FROM_REDIS_CLUSTER": + case 33: + message.state = 33; + break; + case "START_FROM_CLOUD_FUNCTION": + case 23: + message.state = 23; + break; + case "START_FROM_APP_ENGINE_VERSION": + case 25: + message.state = 25; + break; + case "START_FROM_CLOUD_RUN_REVISION": + case 26: + message.state = 26; + break; + case "START_FROM_STORAGE_BUCKET": + case 29: + message.state = 29; + break; + case "START_FROM_PSC_PUBLISHED_SERVICE": + case 30: + message.state = 30; + break; + case "START_FROM_SERVERLESS_NEG": + case 31: + message.state = 31; + break; + case "APPLY_INGRESS_FIREWALL_RULE": + case 4: + message.state = 4; + break; + case "APPLY_EGRESS_FIREWALL_RULE": + case 5: + message.state = 5; + break; + case "APPLY_ROUTE": + case 6: + message.state = 6; + break; + case "APPLY_FORWARDING_RULE": + case 7: + message.state = 7; + break; + case "ANALYZE_LOAD_BALANCER_BACKEND": + case 28: + message.state = 28; + break; + case "SPOOFING_APPROVED": + case 8: + message.state = 8; + break; + case "ARRIVE_AT_INSTANCE": + case 9: + message.state = 9; + break; + case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": + case 10: + message.state = 10; + break; + case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": + case 11: + message.state = 11; + break; + case "ARRIVE_AT_VPN_GATEWAY": + case 12: + message.state = 12; + break; + case "ARRIVE_AT_VPN_TUNNEL": + case 13: + message.state = 13; + break; + case "ARRIVE_AT_VPC_CONNECTOR": + case 24: + message.state = 24; + break; + case "NAT": + case 14: + message.state = 14; + break; + case "PROXY_CONNECTION": + case 15: + message.state = 15; + break; + case "DELIVER": + case 16: + message.state = 16; + break; + case "DROP": + case 17: + message.state = 17; + break; + case "FORWARD": + case 18: + message.state = 18; + break; + case "ABORT": + case 19: + message.state = 19; + break; + case "VIEWER_PERMISSION_MISSING": + case 20: + message.state = 20; + break; + } + if (object.causesDrop != null) + message.causesDrop = Boolean(object.causesDrop); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instance != null) { + if (typeof object.instance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.instance: object expected"); + message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.fromObject(object.instance); + } + if (object.firewall != null) { + if (typeof object.firewall !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.firewall: object expected"); + message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.fromObject(object.firewall); + } + if (object.route != null) { + if (typeof object.route !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.route: object expected"); + message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.fromObject(object.route); + } + if (object.endpoint != null) { + if (typeof object.endpoint !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.endpoint: object expected"); + message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpoint); + } + if (object.googleService != null) { + if (typeof object.googleService !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.googleService: object expected"); + message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.fromObject(object.googleService); + } + if (object.forwardingRule != null) { + if (typeof object.forwardingRule !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forwardingRule: object expected"); + message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.fromObject(object.forwardingRule); + } + if (object.vpnGateway != null) { + if (typeof object.vpnGateway !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnGateway: object expected"); + message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.fromObject(object.vpnGateway); + } + if (object.vpnTunnel != null) { + if (typeof object.vpnTunnel !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnTunnel: object expected"); + message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.fromObject(object.vpnTunnel); + } + if (object.vpcConnector != null) { + if (typeof object.vpcConnector !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpcConnector: object expected"); + message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.fromObject(object.vpcConnector); + } + if (object.deliver != null) { + if (typeof object.deliver !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.deliver: object expected"); + message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.fromObject(object.deliver); + } + if (object.forward != null) { + if (typeof object.forward !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forward: object expected"); + message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.fromObject(object.forward); + } + if (object.abort != null) { + if (typeof object.abort !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.abort: object expected"); + message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.fromObject(object.abort); + } + if (object.drop != null) { + if (typeof object.drop !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.drop: object expected"); + message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.fromObject(object.drop); + } + if (object.loadBalancer != null) { + if (typeof object.loadBalancer !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancer: object expected"); + message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.fromObject(object.loadBalancer); + } + if (object.network != null) { + if (typeof object.network !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.network: object expected"); + message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.fromObject(object.network); + } + if (object.gkeMaster != null) { + if (typeof object.gkeMaster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.gkeMaster: object expected"); + message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.fromObject(object.gkeMaster); + } + if (object.cloudSqlInstance != null) { + if (typeof object.cloudSqlInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudSqlInstance: object expected"); + message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); + } + if (object.redisInstance != null) { + if (typeof object.redisInstance !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisInstance: object expected"); + message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.fromObject(object.redisInstance); + } + if (object.redisCluster != null) { + if (typeof object.redisCluster !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisCluster: object expected"); + message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.fromObject(object.redisCluster); + } + if (object.cloudFunction != null) { + if (typeof object.cloudFunction !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudFunction: object expected"); + message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.fromObject(object.cloudFunction); + } + if (object.appEngineVersion != null) { + if (typeof object.appEngineVersion !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.appEngineVersion: object expected"); + message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.fromObject(object.appEngineVersion); + } + if (object.cloudRunRevision != null) { + if (typeof object.cloudRunRevision !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudRunRevision: object expected"); + message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); + } + if (object.nat != null) { + if (typeof object.nat !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.nat: object expected"); + message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.fromObject(object.nat); + } + if (object.proxyConnection != null) { + if (typeof object.proxyConnection !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.proxyConnection: object expected"); + message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.fromObject(object.proxyConnection); + } + if (object.loadBalancerBackendInfo != null) { + if (typeof object.loadBalancerBackendInfo !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancerBackendInfo: object expected"); + message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); + } + if (object.storageBucket != null) { + if (typeof object.storageBucket !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.storageBucket: object expected"); + message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.fromObject(object.storageBucket); + } + if (object.serverlessNeg != null) { + if (typeof object.serverlessNeg !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.serverlessNeg: object expected"); + message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.fromObject(object.serverlessNeg); + } + return message; + }; + + /** + * Creates a plain object from a Step message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {google.cloud.networkmanagement.v1beta1.Step} message Step + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Step.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.causesDrop = false; + object.projectId = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] : message.state; + if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) + object.causesDrop = message.causesDrop; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instance != null && message.hasOwnProperty("instance")) { + object.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.toObject(message.instance, options); + if (options.oneofs) + object.stepInfo = "instance"; + } + if (message.firewall != null && message.hasOwnProperty("firewall")) { + object.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.toObject(message.firewall, options); + if (options.oneofs) + object.stepInfo = "firewall"; + } + if (message.route != null && message.hasOwnProperty("route")) { + object.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.toObject(message.route, options); + if (options.oneofs) + object.stepInfo = "route"; + } + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + object.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpoint, options); + if (options.oneofs) + object.stepInfo = "endpoint"; + } + if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { + object.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.toObject(message.forwardingRule, options); + if (options.oneofs) + object.stepInfo = "forwardingRule"; + } + if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { + object.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.toObject(message.vpnGateway, options); + if (options.oneofs) + object.stepInfo = "vpnGateway"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + object.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.toObject(message.vpnTunnel, options); + if (options.oneofs) + object.stepInfo = "vpnTunnel"; + } + if (message.deliver != null && message.hasOwnProperty("deliver")) { + object.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.toObject(message.deliver, options); + if (options.oneofs) + object.stepInfo = "deliver"; + } + if (message.forward != null && message.hasOwnProperty("forward")) { + object.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.toObject(message.forward, options); + if (options.oneofs) + object.stepInfo = "forward"; + } + if (message.abort != null && message.hasOwnProperty("abort")) { + object.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.toObject(message.abort, options); + if (options.oneofs) + object.stepInfo = "abort"; + } + if (message.drop != null && message.hasOwnProperty("drop")) { + object.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.toObject(message.drop, options); + if (options.oneofs) + object.stepInfo = "drop"; + } + if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { + object.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.toObject(message.loadBalancer, options); + if (options.oneofs) + object.stepInfo = "loadBalancer"; + } + if (message.network != null && message.hasOwnProperty("network")) { + object.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.toObject(message.network, options); + if (options.oneofs) + object.stepInfo = "network"; + } + if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { + object.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.toObject(message.gkeMaster, options); + if (options.oneofs) + object.stepInfo = "gkeMaster"; + } + if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { + object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); + if (options.oneofs) + object.stepInfo = "cloudSqlInstance"; + } + if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { + object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.toObject(message.cloudFunction, options); + if (options.oneofs) + object.stepInfo = "cloudFunction"; + } + if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { + object.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.toObject(message.vpcConnector, options); + if (options.oneofs) + object.stepInfo = "vpcConnector"; + } + if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { + object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); + if (options.oneofs) + object.stepInfo = "appEngineVersion"; + } + if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { + object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); + if (options.oneofs) + object.stepInfo = "cloudRunRevision"; + } + if (message.googleService != null && message.hasOwnProperty("googleService")) { + object.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.toObject(message.googleService, options); + if (options.oneofs) + object.stepInfo = "googleService"; + } + if (message.nat != null && message.hasOwnProperty("nat")) { + object.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.toObject(message.nat, options); + if (options.oneofs) + object.stepInfo = "nat"; + } + if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { + object.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.toObject(message.proxyConnection, options); + if (options.oneofs) + object.stepInfo = "proxyConnection"; + } + if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { + object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); + if (options.oneofs) + object.stepInfo = "loadBalancerBackendInfo"; + } + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { + object.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.toObject(message.storageBucket, options); + if (options.oneofs) + object.stepInfo = "storageBucket"; + } + if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { + object.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.toObject(message.serverlessNeg, options); + if (options.oneofs) + object.stepInfo = "serverlessNeg"; + } + if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { + object.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.toObject(message.redisInstance, options); + if (options.oneofs) + object.stepInfo = "redisInstance"; + } + if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { + object.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.toObject(message.redisCluster, options); + if (options.oneofs) + object.stepInfo = "redisCluster"; + } + return object; + }; + + /** + * Converts this Step to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @instance + * @returns {Object.} JSON object + */ + Step.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Step + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.Step + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Step"; + }; + + /** + * State enum. + * @name google.cloud.networkmanagement.v1beta1.Step.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value + * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value + * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value + * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value + * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value + * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value + * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value + * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value + * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value + * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value + * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value + * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value + * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value + * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value + * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value + * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value + * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value + * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value + * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value + * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value + * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value + * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value + * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value + * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value + * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value + * @property {number} NAT=14 NAT value + * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value + * @property {number} DELIVER=16 DELIVER value + * @property {number} DROP=17 DROP value + * @property {number} FORWARD=18 FORWARD value + * @property {number} ABORT=19 ABORT value + * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value + */ + Step.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "START_FROM_INSTANCE"] = 1; + values[valuesById[2] = "START_FROM_INTERNET"] = 2; + values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; + values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; + values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; + values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; + values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; + values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; + values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; + values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; + values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; + values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; + values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; + values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; + values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; + values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; + values[valuesById[6] = "APPLY_ROUTE"] = 6; + values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; + values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; + values[valuesById[8] = "SPOOFING_APPROVED"] = 8; + values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; + values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; + values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; + values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; + values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; + values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; + values[valuesById[14] = "NAT"] = 14; + values[valuesById[15] = "PROXY_CONNECTION"] = 15; + values[valuesById[16] = "DELIVER"] = 16; + values[valuesById[17] = "DROP"] = 17; + values[valuesById[18] = "FORWARD"] = 18; + values[valuesById[19] = "ABORT"] = 19; + values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; + return values; + })(); + + return Step; + })(); + + v1beta1.InstanceInfo = (function() { + + /** + * Properties of an InstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IInstanceInfo + * @property {string|null} [displayName] InstanceInfo displayName + * @property {string|null} [uri] InstanceInfo uri + * @property {string|null} ["interface"] InstanceInfo interface + * @property {string|null} [networkUri] InstanceInfo networkUri + * @property {string|null} [internalIp] InstanceInfo internalIp + * @property {string|null} [externalIp] InstanceInfo externalIp + * @property {Array.|null} [networkTags] InstanceInfo networkTags + * @property {string|null} [serviceAccount] InstanceInfo serviceAccount + * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri + */ + + /** + * Constructs a new InstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an InstanceInfo. + * @implements IInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set + */ + function InstanceInfo(properties) { + this.networkTags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.displayName = ""; + + /** + * InstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.uri = ""; + + /** + * InstanceInfo interface. + * @member {string} interface + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype["interface"] = ""; + + /** + * InstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkUri = ""; + + /** + * InstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.internalIp = ""; + + /** + * InstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.externalIp = ""; + + /** + * InstanceInfo networkTags. + * @member {Array.} networkTags + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.networkTags = $util.emptyArray; + + /** + * InstanceInfo serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.serviceAccount = ""; + + /** + * InstanceInfo pscNetworkAttachmentUri. + * @member {string} pscNetworkAttachmentUri + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + */ + InstanceInfo.prototype.pscNetworkAttachmentUri = ""; + + /** + * Creates a new InstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo instance + */ + InstanceInfo.create = function create(properties) { + return new InstanceInfo(properties); + }; + + /** + * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.networkTags != null && message.networkTags.length) + for (var i = 0; i < message.networkTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); + if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); + return writer; + }; + + /** + * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message["interface"] = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + if (!(message.networkTags && message.networkTags.length)) + message.networkTags = []; + message.networkTags.push(reader.string()); + break; + } + case 8: { + message.serviceAccount = reader.string(); + break; + } + case 9: { + message.pscNetworkAttachmentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message["interface"] != null && message.hasOwnProperty("interface")) + if (!$util.isString(message["interface"])) + return "interface: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + if (!Array.isArray(message.networkTags)) + return "networkTags: array expected"; + for (var i = 0; i < message.networkTags.length; ++i) + if (!$util.isString(message.networkTags[i])) + return "networkTags: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + if (!$util.isString(message.pscNetworkAttachmentUri)) + return "pscNetworkAttachmentUri: string expected"; + return null; + }; + + /** + * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo + */ + InstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.InstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object["interface"] != null) + message["interface"] = String(object["interface"]); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.networkTags) { + if (!Array.isArray(object.networkTags)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.InstanceInfo.networkTags: array expected"); + message.networkTags = []; + for (var i = 0; i < object.networkTags.length; ++i) + message.networkTags[i] = String(object.networkTags[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.pscNetworkAttachmentUri != null) + message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); + return message; + }; + + /** + * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.InstanceInfo} message InstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.networkTags = []; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object["interface"] = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.serviceAccount = ""; + object.pscNetworkAttachmentUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message["interface"] != null && message.hasOwnProperty("interface")) + object["interface"] = message["interface"]; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.networkTags && message.networkTags.length) { + object.networkTags = []; + for (var j = 0; j < message.networkTags.length; ++j) + object.networkTags[j] = message.networkTags[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) + object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; + return object; + }; + + /** + * Converts this InstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @instance + * @returns {Object.} JSON object + */ + InstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.InstanceInfo"; + }; + + return InstanceInfo; + })(); + + v1beta1.NetworkInfo = (function() { + + /** + * Properties of a NetworkInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface INetworkInfo + * @property {string|null} [displayName] NetworkInfo displayName + * @property {string|null} [uri] NetworkInfo uri + * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri + * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange + * @property {string|null} [region] NetworkInfo region + */ + + /** + * Constructs a new NetworkInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a NetworkInfo. + * @implements INetworkInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set + */ + function NetworkInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.displayName = ""; + + /** + * NetworkInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.uri = ""; + + /** + * NetworkInfo matchedSubnetUri. + * @member {string} matchedSubnetUri + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedSubnetUri = ""; + + /** + * NetworkInfo matchedIpRange. + * @member {string} matchedIpRange + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.matchedIpRange = ""; + + /** + * NetworkInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + */ + NetworkInfo.prototype.region = ""; + + /** + * Creates a new NetworkInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo instance + */ + NetworkInfo.create = function create(properties) { + return new NetworkInfo(properties); + }; + + /** + * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); + if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 5: { + message.matchedSubnetUri = reader.string(); + break; + } + case 4: { + message.matchedIpRange = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + if (!$util.isString(message.matchedSubnetUri)) + return "matchedSubnetUri: string expected"; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + if (!$util.isString(message.matchedIpRange)) + return "matchedIpRange: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo + */ + NetworkInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NetworkInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedSubnetUri != null) + message.matchedSubnetUri = String(object.matchedSubnetUri); + if (object.matchedIpRange != null) + message.matchedIpRange = String(object.matchedIpRange); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.NetworkInfo} message NetworkInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedIpRange = ""; + object.matchedSubnetUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) + object.matchedIpRange = message.matchedIpRange; + if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) + object.matchedSubnetUri = message.matchedSubnetUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this NetworkInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @instance + * @returns {Object.} JSON object + */ + NetworkInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NetworkInfo"; + }; + + return NetworkInfo; + })(); + + v1beta1.FirewallInfo = (function() { + + /** + * Properties of a FirewallInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IFirewallInfo + * @property {string|null} [displayName] FirewallInfo displayName + * @property {string|null} [uri] FirewallInfo uri + * @property {string|null} [direction] FirewallInfo direction + * @property {string|null} [action] FirewallInfo action + * @property {number|null} [priority] FirewallInfo priority + * @property {string|null} [networkUri] FirewallInfo networkUri + * @property {Array.|null} [targetTags] FirewallInfo targetTags + * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts + * @property {string|null} [policy] FirewallInfo policy + * @property {string|null} [policyUri] FirewallInfo policyUri + * @property {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType + */ + + /** + * Constructs a new FirewallInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a FirewallInfo. + * @implements IFirewallInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set + */ + function FirewallInfo(properties) { + this.targetTags = []; + this.targetServiceAccounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirewallInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.displayName = ""; + + /** + * FirewallInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.uri = ""; + + /** + * FirewallInfo direction. + * @member {string} direction + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.direction = ""; + + /** + * FirewallInfo action. + * @member {string} action + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.action = ""; + + /** + * FirewallInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.priority = 0; + + /** + * FirewallInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.networkUri = ""; + + /** + * FirewallInfo targetTags. + * @member {Array.} targetTags + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetTags = $util.emptyArray; + + /** + * FirewallInfo targetServiceAccounts. + * @member {Array.} targetServiceAccounts + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; + + /** + * FirewallInfo policy. + * @member {string} policy + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policy = ""; + + /** + * FirewallInfo policyUri. + * @member {string} policyUri + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.policyUri = ""; + + /** + * FirewallInfo firewallRuleType. + * @member {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType} firewallRuleType + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + */ + FirewallInfo.prototype.firewallRuleType = 0; + + /** + * Creates a new FirewallInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo instance + */ + FirewallInfo.create = function create(properties) { + return new FirewallInfo(properties); + }; + + /** + * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); + if (message.targetTags != null && message.targetTags.length) + for (var i = 0; i < message.targetTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); + if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); + if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); + if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); + if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); + return writer; + }; + + /** + * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.direction = reader.string(); + break; + } + case 4: { + message.action = reader.string(); + break; + } + case 5: { + message.priority = reader.int32(); + break; + } + case 6: { + message.networkUri = reader.string(); + break; + } + case 7: { + if (!(message.targetTags && message.targetTags.length)) + message.targetTags = []; + message.targetTags.push(reader.string()); + break; + } + case 8: { + if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) + message.targetServiceAccounts = []; + message.targetServiceAccounts.push(reader.string()); + break; + } + case 9: { + message.policy = reader.string(); + break; + } + case 11: { + message.policyUri = reader.string(); + break; + } + case 10: { + message.firewallRuleType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirewallInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirewallInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirewallInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.direction != null && message.hasOwnProperty("direction")) + if (!$util.isString(message.direction)) + return "direction: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + if (!$util.isString(message.action)) + return "action: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.targetTags != null && message.hasOwnProperty("targetTags")) { + if (!Array.isArray(message.targetTags)) + return "targetTags: array expected"; + for (var i = 0; i < message.targetTags.length; ++i) + if (!$util.isString(message.targetTags[i])) + return "targetTags: string[] expected"; + } + if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { + if (!Array.isArray(message.targetServiceAccounts)) + return "targetServiceAccounts: array expected"; + for (var i = 0; i < message.targetServiceAccounts.length; ++i) + if (!$util.isString(message.targetServiceAccounts[i])) + return "targetServiceAccounts: string[] expected"; + } + if (message.policy != null && message.hasOwnProperty("policy")) + if (!$util.isString(message.policy)) + return "policy: string expected"; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + if (!$util.isString(message.policyUri)) + return "policyUri: string expected"; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + switch (message.firewallRuleType) { + default: + return "firewallRuleType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 100: + case 101: + break; + } + return null; + }; + + /** + * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo + */ + FirewallInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.FirewallInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.direction != null) + message.direction = String(object.direction); + if (object.action != null) + message.action = String(object.action); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.targetTags) { + if (!Array.isArray(object.targetTags)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetTags: array expected"); + message.targetTags = []; + for (var i = 0; i < object.targetTags.length; ++i) + message.targetTags[i] = String(object.targetTags[i]); + } + if (object.targetServiceAccounts) { + if (!Array.isArray(object.targetServiceAccounts)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetServiceAccounts: array expected"); + message.targetServiceAccounts = []; + for (var i = 0; i < object.targetServiceAccounts.length; ++i) + message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); + } + if (object.policy != null) + message.policy = String(object.policy); + if (object.policyUri != null) + message.policyUri = String(object.policyUri); + switch (object.firewallRuleType) { + default: + if (typeof object.firewallRuleType === "number") { + message.firewallRuleType = object.firewallRuleType; + break; + } + break; + case "FIREWALL_RULE_TYPE_UNSPECIFIED": + case 0: + message.firewallRuleType = 0; + break; + case "HIERARCHICAL_FIREWALL_POLICY_RULE": + case 1: + message.firewallRuleType = 1; + break; + case "VPC_FIREWALL_RULE": + case 2: + message.firewallRuleType = 2; + break; + case "IMPLIED_VPC_FIREWALL_RULE": + case 3: + message.firewallRuleType = 3; + break; + case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": + case 4: + message.firewallRuleType = 4; + break; + case "NETWORK_FIREWALL_POLICY_RULE": + case 5: + message.firewallRuleType = 5; + break; + case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": + case 6: + message.firewallRuleType = 6; + break; + case "UNSUPPORTED_FIREWALL_POLICY_RULE": + case 100: + message.firewallRuleType = 100; + break; + case "TRACKING_STATE": + case 101: + message.firewallRuleType = 101; + break; + } + return message; + }; + + /** + * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.FirewallInfo} message FirewallInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirewallInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targetTags = []; + object.targetServiceAccounts = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.direction = ""; + object.action = ""; + object.priority = 0; + object.networkUri = ""; + object.policy = ""; + object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; + object.policyUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.direction != null && message.hasOwnProperty("direction")) + object.direction = message.direction; + if (message.action != null && message.hasOwnProperty("action")) + object.action = message.action; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.targetTags && message.targetTags.length) { + object.targetTags = []; + for (var j = 0; j < message.targetTags.length; ++j) + object.targetTags[j] = message.targetTags[j]; + } + if (message.targetServiceAccounts && message.targetServiceAccounts.length) { + object.targetServiceAccounts = []; + for (var j = 0; j < message.targetServiceAccounts.length; ++j) + object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; + } + if (message.policy != null && message.hasOwnProperty("policy")) + object.policy = message.policy; + if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) + object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; + if (message.policyUri != null && message.hasOwnProperty("policyUri")) + object.policyUri = message.policyUri; + return object; + }; + + /** + * Converts this FirewallInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @instance + * @returns {Object.} JSON object + */ + FirewallInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirewallInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.FirewallInfo"; + }; + + /** + * FirewallRuleType enum. + * @name google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType + * @enum {number} + * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value + * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value + * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value + * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value + * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value + * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value + * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value + * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value + * @property {number} TRACKING_STATE=101 TRACKING_STATE value + */ + FirewallInfo.FirewallRuleType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; + values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; + values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; + values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; + values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; + values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; + values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; + values[valuesById[101] = "TRACKING_STATE"] = 101; + return values; + })(); + + return FirewallInfo; + })(); + + v1beta1.RouteInfo = (function() { + + /** + * Properties of a RouteInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRouteInfo + * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType + * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType + * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope + * @property {string|null} [displayName] RouteInfo displayName + * @property {string|null} [uri] RouteInfo uri + * @property {string|null} [region] RouteInfo region + * @property {string|null} [destIpRange] RouteInfo destIpRange + * @property {string|null} [nextHop] RouteInfo nextHop + * @property {string|null} [networkUri] RouteInfo networkUri + * @property {number|null} [priority] RouteInfo priority + * @property {Array.|null} [instanceTags] RouteInfo instanceTags + * @property {string|null} [srcIpRange] RouteInfo srcIpRange + * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges + * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges + * @property {Array.|null} [protocols] RouteInfo protocols + * @property {string|null} [nccHubUri] RouteInfo nccHubUri + * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri + * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri + * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri + */ + + /** + * Constructs a new RouteInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RouteInfo. + * @implements IRouteInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set + */ + function RouteInfo(properties) { + this.instanceTags = []; + this.destPortRanges = []; + this.srcPortRanges = []; + this.protocols = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RouteInfo routeType. + * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType} routeType + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeType = 0; + + /** + * RouteInfo nextHopType. + * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType} nextHopType + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHopType = 0; + + /** + * RouteInfo routeScope. + * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope} routeScope + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.routeScope = 0; + + /** + * RouteInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.displayName = ""; + + /** + * RouteInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.uri = ""; + + /** + * RouteInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.region = ""; + + /** + * RouteInfo destIpRange. + * @member {string} destIpRange + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.destIpRange = ""; + + /** + * RouteInfo nextHop. + * @member {string} nextHop + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nextHop = ""; + + /** + * RouteInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.networkUri = ""; + + /** + * RouteInfo priority. + * @member {number} priority + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.priority = 0; + + /** + * RouteInfo instanceTags. + * @member {Array.} instanceTags + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.instanceTags = $util.emptyArray; + + /** + * RouteInfo srcIpRange. + * @member {string} srcIpRange + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcIpRange = ""; + + /** + * RouteInfo destPortRanges. + * @member {Array.} destPortRanges + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.destPortRanges = $util.emptyArray; + + /** + * RouteInfo srcPortRanges. + * @member {Array.} srcPortRanges + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.srcPortRanges = $util.emptyArray; + + /** + * RouteInfo protocols. + * @member {Array.} protocols + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.protocols = $util.emptyArray; + + /** + * RouteInfo nccHubUri. + * @member {string|null|undefined} nccHubUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccHubUri = null; + + /** + * RouteInfo nccSpokeUri. + * @member {string|null|undefined} nccSpokeUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.nccSpokeUri = null; + + /** + * RouteInfo advertisedRouteSourceRouterUri. + * @member {string|null|undefined} advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteSourceRouterUri = null; + + /** + * RouteInfo advertisedRouteNextHopUri. + * @member {string|null|undefined} advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + RouteInfo.prototype.advertisedRouteNextHopUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RouteInfo _nccHubUri. + * @member {"nccHubUri"|undefined} _nccHubUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { + get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _nccSpokeUri. + * @member {"nccSpokeUri"|undefined} _nccSpokeUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { + get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteSourceRouterUri. + * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RouteInfo _advertisedRouteNextHopUri. + * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + */ + Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { + get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RouteInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo instance + */ + RouteInfo.create = function create(properties) { + return new RouteInfo(properties); + }; + + /** + * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); + if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); + if (message.instanceTags != null && message.instanceTags.length) + for (var i = 0; i < message.instanceTags.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); + if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); + if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); + if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); + if (message.destPortRanges != null && message.destPortRanges.length) + for (var i = 0; i < message.destPortRanges.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); + if (message.srcPortRanges != null && message.srcPortRanges.length) + for (var i = 0; i < message.srcPortRanges.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); + if (message.protocols != null && message.protocols.length) + for (var i = 0; i < message.protocols.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); + if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); + if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); + if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); + if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); + if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) + writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); + return writer; + }; + + /** + * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 8: { + message.routeType = reader.int32(); + break; + } + case 9: { + message.nextHopType = reader.int32(); + break; + } + case 14: { + message.routeScope = reader.int32(); + break; + } + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 19: { + message.region = reader.string(); + break; + } + case 3: { + message.destIpRange = reader.string(); + break; + } + case 4: { + message.nextHop = reader.string(); + break; + } + case 5: { + message.networkUri = reader.string(); + break; + } + case 6: { + message.priority = reader.int32(); + break; + } + case 7: { + if (!(message.instanceTags && message.instanceTags.length)) + message.instanceTags = []; + message.instanceTags.push(reader.string()); + break; + } + case 10: { + message.srcIpRange = reader.string(); + break; + } + case 11: { + if (!(message.destPortRanges && message.destPortRanges.length)) + message.destPortRanges = []; + message.destPortRanges.push(reader.string()); + break; + } + case 12: { + if (!(message.srcPortRanges && message.srcPortRanges.length)) + message.srcPortRanges = []; + message.srcPortRanges.push(reader.string()); + break; + } + case 13: { + if (!(message.protocols && message.protocols.length)) + message.protocols = []; + message.protocols.push(reader.string()); + break; + } + case 15: { + message.nccHubUri = reader.string(); + break; + } + case 16: { + message.nccSpokeUri = reader.string(); + break; + } + case 17: { + message.advertisedRouteSourceRouterUri = reader.string(); + break; + } + case 18: { + message.advertisedRouteNextHopUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RouteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RouteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RouteInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RouteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.routeType != null && message.hasOwnProperty("routeType")) + switch (message.routeType) { + default: + return "routeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 101: + break; + } + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + switch (message.nextHopType) { + default: + return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) + switch (message.routeScope) { + default: + return "routeScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + if (!$util.isString(message.destIpRange)) + return "destIpRange: string expected"; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + if (!$util.isString(message.nextHop)) + return "nextHop: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + if (!$util.isInteger(message.priority)) + return "priority: integer expected"; + if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { + if (!Array.isArray(message.instanceTags)) + return "instanceTags: array expected"; + for (var i = 0; i < message.instanceTags.length; ++i) + if (!$util.isString(message.instanceTags[i])) + return "instanceTags: string[] expected"; + } + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + if (!$util.isString(message.srcIpRange)) + return "srcIpRange: string expected"; + if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { + if (!Array.isArray(message.destPortRanges)) + return "destPortRanges: array expected"; + for (var i = 0; i < message.destPortRanges.length; ++i) + if (!$util.isString(message.destPortRanges[i])) + return "destPortRanges: string[] expected"; + } + if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { + if (!Array.isArray(message.srcPortRanges)) + return "srcPortRanges: array expected"; + for (var i = 0; i < message.srcPortRanges.length; ++i) + if (!$util.isString(message.srcPortRanges[i])) + return "srcPortRanges: string[] expected"; + } + if (message.protocols != null && message.hasOwnProperty("protocols")) { + if (!Array.isArray(message.protocols)) + return "protocols: array expected"; + for (var i = 0; i < message.protocols.length; ++i) + if (!$util.isString(message.protocols[i])) + return "protocols: string[] expected"; + } + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + properties._nccHubUri = 1; + if (!$util.isString(message.nccHubUri)) + return "nccHubUri: string expected"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + properties._nccSpokeUri = 1; + if (!$util.isString(message.nccSpokeUri)) + return "nccSpokeUri: string expected"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + properties._advertisedRouteSourceRouterUri = 1; + if (!$util.isString(message.advertisedRouteSourceRouterUri)) + return "advertisedRouteSourceRouterUri: string expected"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + properties._advertisedRouteNextHopUri = 1; + if (!$util.isString(message.advertisedRouteNextHopUri)) + return "advertisedRouteNextHopUri: string expected"; + } + return null; + }; + + /** + * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo + */ + RouteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RouteInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); + switch (object.routeType) { + default: + if (typeof object.routeType === "number") { + message.routeType = object.routeType; + break; + } + break; + case "ROUTE_TYPE_UNSPECIFIED": + case 0: + message.routeType = 0; + break; + case "SUBNET": + case 1: + message.routeType = 1; + break; + case "STATIC": + case 2: + message.routeType = 2; + break; + case "DYNAMIC": + case 3: + message.routeType = 3; + break; + case "PEERING_SUBNET": + case 4: + message.routeType = 4; + break; + case "PEERING_STATIC": + case 5: + message.routeType = 5; + break; + case "PEERING_DYNAMIC": + case 6: + message.routeType = 6; + break; + case "POLICY_BASED": + case 7: + message.routeType = 7; + break; + case "ADVERTISED": + case 101: + message.routeType = 101; + break; + } + switch (object.nextHopType) { + default: + if (typeof object.nextHopType === "number") { + message.nextHopType = object.nextHopType; + break; + } + break; + case "NEXT_HOP_TYPE_UNSPECIFIED": + case 0: + message.nextHopType = 0; + break; + case "NEXT_HOP_IP": + case 1: + message.nextHopType = 1; + break; + case "NEXT_HOP_INSTANCE": + case 2: + message.nextHopType = 2; + break; + case "NEXT_HOP_NETWORK": + case 3: + message.nextHopType = 3; + break; + case "NEXT_HOP_PEERING": + case 4: + message.nextHopType = 4; + break; + case "NEXT_HOP_INTERCONNECT": + case 5: + message.nextHopType = 5; + break; + case "NEXT_HOP_VPN_TUNNEL": + case 6: + message.nextHopType = 6; + break; + case "NEXT_HOP_VPN_GATEWAY": + case 7: + message.nextHopType = 7; + break; + case "NEXT_HOP_INTERNET_GATEWAY": + case 8: + message.nextHopType = 8; + break; + case "NEXT_HOP_BLACKHOLE": + case 9: + message.nextHopType = 9; + break; + case "NEXT_HOP_ILB": + case 10: + message.nextHopType = 10; + break; + case "NEXT_HOP_ROUTER_APPLIANCE": + case 11: + message.nextHopType = 11; + break; + case "NEXT_HOP_NCC_HUB": + case 12: + message.nextHopType = 12; + break; + } + switch (object.routeScope) { + default: + if (typeof object.routeScope === "number") { + message.routeScope = object.routeScope; + break; + } + break; + case "ROUTE_SCOPE_UNSPECIFIED": + case 0: + message.routeScope = 0; + break; + case "NETWORK": + case 1: + message.routeScope = 1; + break; + case "NCC_HUB": + case 2: + message.routeScope = 2; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.region != null) + message.region = String(object.region); + if (object.destIpRange != null) + message.destIpRange = String(object.destIpRange); + if (object.nextHop != null) + message.nextHop = String(object.nextHop); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.priority != null) + message.priority = object.priority | 0; + if (object.instanceTags) { + if (!Array.isArray(object.instanceTags)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.instanceTags: array expected"); + message.instanceTags = []; + for (var i = 0; i < object.instanceTags.length; ++i) + message.instanceTags[i] = String(object.instanceTags[i]); + } + if (object.srcIpRange != null) + message.srcIpRange = String(object.srcIpRange); + if (object.destPortRanges) { + if (!Array.isArray(object.destPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.destPortRanges: array expected"); + message.destPortRanges = []; + for (var i = 0; i < object.destPortRanges.length; ++i) + message.destPortRanges[i] = String(object.destPortRanges[i]); + } + if (object.srcPortRanges) { + if (!Array.isArray(object.srcPortRanges)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.srcPortRanges: array expected"); + message.srcPortRanges = []; + for (var i = 0; i < object.srcPortRanges.length; ++i) + message.srcPortRanges[i] = String(object.srcPortRanges[i]); + } + if (object.protocols) { + if (!Array.isArray(object.protocols)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.protocols: array expected"); + message.protocols = []; + for (var i = 0; i < object.protocols.length; ++i) + message.protocols[i] = String(object.protocols[i]); + } + if (object.nccHubUri != null) + message.nccHubUri = String(object.nccHubUri); + if (object.nccSpokeUri != null) + message.nccSpokeUri = String(object.nccSpokeUri); + if (object.advertisedRouteSourceRouterUri != null) + message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); + if (object.advertisedRouteNextHopUri != null) + message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); + return message; + }; + + /** + * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.RouteInfo} message RouteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RouteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.instanceTags = []; + object.destPortRanges = []; + object.srcPortRanges = []; + object.protocols = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.destIpRange = ""; + object.nextHop = ""; + object.networkUri = ""; + object.priority = 0; + object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; + object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; + object.srcIpRange = ""; + object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) + object.destIpRange = message.destIpRange; + if (message.nextHop != null && message.hasOwnProperty("nextHop")) + object.nextHop = message.nextHop; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = message.priority; + if (message.instanceTags && message.instanceTags.length) { + object.instanceTags = []; + for (var j = 0; j < message.instanceTags.length; ++j) + object.instanceTags[j] = message.instanceTags[j]; + } + if (message.routeType != null && message.hasOwnProperty("routeType")) + object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] : message.routeType; + if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) + object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; + if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) + object.srcIpRange = message.srcIpRange; + if (message.destPortRanges && message.destPortRanges.length) { + object.destPortRanges = []; + for (var j = 0; j < message.destPortRanges.length; ++j) + object.destPortRanges[j] = message.destPortRanges[j]; + } + if (message.srcPortRanges && message.srcPortRanges.length) { + object.srcPortRanges = []; + for (var j = 0; j < message.srcPortRanges.length; ++j) + object.srcPortRanges[j] = message.srcPortRanges[j]; + } + if (message.protocols && message.protocols.length) { + object.protocols = []; + for (var j = 0; j < message.protocols.length; ++j) + object.protocols[j] = message.protocols[j]; + } + if (message.routeScope != null && message.hasOwnProperty("routeScope")) + object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; + if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { + object.nccHubUri = message.nccHubUri; + if (options.oneofs) + object._nccHubUri = "nccHubUri"; + } + if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { + object.nccSpokeUri = message.nccSpokeUri; + if (options.oneofs) + object._nccSpokeUri = "nccSpokeUri"; + } + if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { + object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; + if (options.oneofs) + object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; + } + if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { + object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; + if (options.oneofs) + object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; + } + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RouteInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @instance + * @returns {Object.} JSON object + */ + RouteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RouteInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RouteInfo"; + }; + + /** + * RouteType enum. + * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType + * @enum {number} + * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value + * @property {number} SUBNET=1 SUBNET value + * @property {number} STATIC=2 STATIC value + * @property {number} DYNAMIC=3 DYNAMIC value + * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value + * @property {number} PEERING_STATIC=5 PEERING_STATIC value + * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value + * @property {number} POLICY_BASED=7 POLICY_BASED value + * @property {number} ADVERTISED=101 ADVERTISED value + */ + RouteInfo.RouteType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUBNET"] = 1; + values[valuesById[2] = "STATIC"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + values[valuesById[4] = "PEERING_SUBNET"] = 4; + values[valuesById[5] = "PEERING_STATIC"] = 5; + values[valuesById[6] = "PEERING_DYNAMIC"] = 6; + values[valuesById[7] = "POLICY_BASED"] = 7; + values[valuesById[101] = "ADVERTISED"] = 101; + return values; + })(); + + /** + * NextHopType enum. + * @name google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType + * @enum {number} + * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value + * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value + * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value + * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value + * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value + * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value + * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value + * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value + * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value + * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value + * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value + * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value + * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value + */ + RouteInfo.NextHopType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEXT_HOP_IP"] = 1; + values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; + values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; + values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; + values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; + values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; + values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; + values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; + values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; + values[valuesById[10] = "NEXT_HOP_ILB"] = 10; + values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; + values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; + return values; + })(); + + /** + * RouteScope enum. + * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope + * @enum {number} + * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value + * @property {number} NETWORK=1 NETWORK value + * @property {number} NCC_HUB=2 NCC_HUB value + */ + RouteInfo.RouteScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NETWORK"] = 1; + values[valuesById[2] = "NCC_HUB"] = 2; + return values; + })(); + + return RouteInfo; + })(); + + v1beta1.GoogleServiceInfo = (function() { + + /** + * Properties of a GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGoogleServiceInfo + * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp + * @property {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType + */ + + /** + * Constructs a new GoogleServiceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GoogleServiceInfo. + * @implements IGoogleServiceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set + */ + function GoogleServiceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleServiceInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.sourceIp = ""; + + /** + * GoogleServiceInfo googleServiceType. + * @member {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType} googleServiceType + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @instance + */ + GoogleServiceInfo.prototype.googleServiceType = 0; + + /** + * Creates a new GoogleServiceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo instance + */ + GoogleServiceInfo.create = function create(properties) { + return new GoogleServiceInfo(properties); + }; + + /** + * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); + return writer; + }; + + /** + * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.googleServiceType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleServiceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleServiceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + switch (message.googleServiceType) { + default: + return "googleServiceType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo + */ + GoogleServiceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + switch (object.googleServiceType) { + default: + if (typeof object.googleServiceType === "number") { + message.googleServiceType = object.googleServiceType; + break; + } + break; + case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": + case 0: + message.googleServiceType = 0; + break; + case "IAP": + case 1: + message.googleServiceType = 1; + break; + case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": + case 2: + message.googleServiceType = 2; + break; + case "CLOUD_DNS": + case 3: + message.googleServiceType = 3; + break; + case "GOOGLE_API": + case 4: + message.googleServiceType = 4; + break; + case "GOOGLE_API_PSC": + case 5: + message.googleServiceType = 5; + break; + case "GOOGLE_API_VPC_SC": + case 6: + message.googleServiceType = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} message GoogleServiceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleServiceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) + object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; + return object; + }; + + /** + * Converts this GoogleServiceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @instance + * @returns {Object.} JSON object + */ + GoogleServiceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleServiceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GoogleServiceInfo"; + }; + + /** + * GoogleServiceType enum. + * @name google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType + * @enum {number} + * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value + * @property {number} IAP=1 IAP value + * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value + * @property {number} CLOUD_DNS=3 CLOUD_DNS value + * @property {number} GOOGLE_API=4 GOOGLE_API value + * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value + * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value + */ + GoogleServiceInfo.GoogleServiceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IAP"] = 1; + values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; + values[valuesById[3] = "CLOUD_DNS"] = 3; + values[valuesById[4] = "GOOGLE_API"] = 4; + values[valuesById[5] = "GOOGLE_API_PSC"] = 5; + values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; + return values; + })(); + + return GoogleServiceInfo; + })(); + + v1beta1.ForwardingRuleInfo = (function() { + + /** + * Properties of a ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IForwardingRuleInfo + * @property {string|null} [displayName] ForwardingRuleInfo displayName + * @property {string|null} [uri] ForwardingRuleInfo uri + * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol + * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange + * @property {string|null} [vip] ForwardingRuleInfo vip + * @property {string|null} [target] ForwardingRuleInfo target + * @property {string|null} [networkUri] ForwardingRuleInfo networkUri + * @property {string|null} [region] ForwardingRuleInfo region + * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName + * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget + */ + + /** + * Constructs a new ForwardingRuleInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ForwardingRuleInfo. + * @implements IForwardingRuleInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set + */ + function ForwardingRuleInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardingRuleInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.displayName = ""; + + /** + * ForwardingRuleInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.uri = ""; + + /** + * ForwardingRuleInfo matchedProtocol. + * @member {string} matchedProtocol + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedProtocol = ""; + + /** + * ForwardingRuleInfo matchedPortRange. + * @member {string} matchedPortRange + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.matchedPortRange = ""; + + /** + * ForwardingRuleInfo vip. + * @member {string} vip + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.vip = ""; + + /** + * ForwardingRuleInfo target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.target = ""; + + /** + * ForwardingRuleInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.networkUri = ""; + + /** + * ForwardingRuleInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.region = ""; + + /** + * ForwardingRuleInfo loadBalancerName. + * @member {string} loadBalancerName + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.loadBalancerName = ""; + + /** + * ForwardingRuleInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * ForwardingRuleInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + */ + ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new ForwardingRuleInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo instance + */ + ForwardingRuleInfo.create = function create(properties) { + return new ForwardingRuleInfo(properties); + }; + + /** + * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); + if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); + if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.matchedProtocol = reader.string(); + break; + } + case 6: { + message.matchedPortRange = reader.string(); + break; + } + case 4: { + message.vip = reader.string(); + break; + } + case 5: { + message.target = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.loadBalancerName = reader.string(); + break; + } + case 10: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 11: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardingRuleInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardingRuleInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + if (!$util.isString(message.matchedProtocol)) + return "matchedProtocol: string expected"; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + if (!$util.isString(message.matchedPortRange)) + return "matchedPortRange: string expected"; + if (message.vip != null && message.hasOwnProperty("vip")) + if (!$util.isString(message.vip)) + return "vip: string expected"; + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + if (!$util.isString(message.loadBalancerName)) + return "loadBalancerName: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo + */ + ForwardingRuleInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.matchedProtocol != null) + message.matchedProtocol = String(object.matchedProtocol); + if (object.matchedPortRange != null) + message.matchedPortRange = String(object.matchedPortRange); + if (object.vip != null) + message.vip = String(object.vip); + if (object.target != null) + message.target = String(object.target); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + if (object.loadBalancerName != null) + message.loadBalancerName = String(object.loadBalancerName); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} message ForwardingRuleInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardingRuleInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.matchedProtocol = ""; + object.vip = ""; + object.target = ""; + object.matchedPortRange = ""; + object.networkUri = ""; + object.region = ""; + object.loadBalancerName = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) + object.matchedProtocol = message.matchedProtocol; + if (message.vip != null && message.hasOwnProperty("vip")) + object.vip = message.vip; + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) + object.matchedPortRange = message.matchedPortRange; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) + object.loadBalancerName = message.loadBalancerName; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this ForwardingRuleInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardingRuleInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardingRuleInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo"; + }; + + return ForwardingRuleInfo; + })(); + + v1beta1.LoadBalancerInfo = (function() { + + /** + * Properties of a LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILoadBalancerInfo + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType + * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri + * @property {Array.|null} [backends] LoadBalancerInfo backends + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType + * @property {string|null} [backendUri] LoadBalancerInfo backendUri + */ + + /** + * Constructs a new LoadBalancerInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LoadBalancerInfo. + * @implements ILoadBalancerInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set + */ + function LoadBalancerInfo(properties) { + this.backends = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerInfo loadBalancerType. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType} loadBalancerType + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.loadBalancerType = 0; + + /** + * LoadBalancerInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerInfo backends. + * @member {Array.} backends + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backends = $util.emptyArray; + + /** + * LoadBalancerInfo backendType. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType} backendType + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendType = 0; + + /** + * LoadBalancerInfo backendUri. + * @member {string} backendUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + */ + LoadBalancerInfo.prototype.backendUri = ""; + + /** + * Creates a new LoadBalancerInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo instance + */ + LoadBalancerInfo.create = function create(properties) { + return new LoadBalancerInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); + if (message.backends != null && message.backends.length) + for (var i = 0; i < message.backends.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); + if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); + return writer; + }; + + /** + * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.loadBalancerType = reader.int32(); + break; + } + case 2: { + message.healthCheckUri = reader.string(); + break; + } + case 3: { + if (!(message.backends && message.backends.length)) + message.backends = []; + message.backends.push($root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.decode(reader, reader.uint32())); + break; + } + case 4: { + message.backendType = reader.int32(); + break; + } + case 5: { + message.backendUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + switch (message.loadBalancerType) { + default: + return "loadBalancerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.backends != null && message.hasOwnProperty("backends")) { + if (!Array.isArray(message.backends)) + return "backends: array expected"; + for (var i = 0; i < message.backends.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify(message.backends[i]); + if (error) + return "backends." + error; + } + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + switch (message.backendType) { + default: + return "backendType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + if (!$util.isString(message.backendUri)) + return "backendUri: string expected"; + return null; + }; + + /** + * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo + */ + LoadBalancerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); + switch (object.loadBalancerType) { + default: + if (typeof object.loadBalancerType === "number") { + message.loadBalancerType = object.loadBalancerType; + break; + } + break; + case "LOAD_BALANCER_TYPE_UNSPECIFIED": + case 0: + message.loadBalancerType = 0; + break; + case "INTERNAL_TCP_UDP": + case 1: + message.loadBalancerType = 1; + break; + case "NETWORK_TCP_UDP": + case 2: + message.loadBalancerType = 2; + break; + case "HTTP_PROXY": + case 3: + message.loadBalancerType = 3; + break; + case "TCP_PROXY": + case 4: + message.loadBalancerType = 4; + break; + case "SSL_PROXY": + case 5: + message.loadBalancerType = 5; + break; + } + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + if (object.backends) { + if (!Array.isArray(object.backends)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: array expected"); + message.backends = []; + for (var i = 0; i < object.backends.length; ++i) { + if (typeof object.backends[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: object expected"); + message.backends[i] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.fromObject(object.backends[i]); + } + } + switch (object.backendType) { + default: + if (typeof object.backendType === "number") { + message.backendType = object.backendType; + break; + } + break; + case "BACKEND_TYPE_UNSPECIFIED": + case 0: + message.backendType = 0; + break; + case "BACKEND_SERVICE": + case 1: + message.backendType = 1; + break; + case "TARGET_POOL": + case 2: + message.backendType = 2; + break; + case "TARGET_INSTANCE": + case 3: + message.backendType = 3; + break; + } + if (object.backendUri != null) + message.backendUri = String(object.backendUri); + return message; + }; + + /** + * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} message LoadBalancerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.backends = []; + if (options.defaults) { + object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; + object.healthCheckUri = ""; + object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; + object.backendUri = ""; + } + if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) + object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.backends && message.backends.length) { + object.backends = []; + for (var j = 0; j < message.backends.length; ++j) + object.backends[j] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.toObject(message.backends[j], options); + } + if (message.backendType != null && message.hasOwnProperty("backendType")) + object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; + if (message.backendUri != null && message.hasOwnProperty("backendUri")) + object.backendUri = message.backendUri; + return object; + }; + + /** + * Converts this LoadBalancerInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerInfo"; + }; + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value + * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value + * @property {number} HTTP_PROXY=3 HTTP_PROXY value + * @property {number} TCP_PROXY=4 TCP_PROXY value + * @property {number} SSL_PROXY=5 SSL_PROXY value + */ + LoadBalancerInfo.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; + values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; + values[valuesById[3] = "HTTP_PROXY"] = 3; + values[valuesById[4] = "TCP_PROXY"] = 4; + values[valuesById[5] = "SSL_PROXY"] = 5; + return values; + })(); + + /** + * BackendType enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType + * @enum {number} + * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value + * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value + * @property {number} TARGET_POOL=2 TARGET_POOL value + * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value + */ + LoadBalancerInfo.BackendType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BACKEND_SERVICE"] = 1; + values[valuesById[2] = "TARGET_POOL"] = 2; + values[valuesById[3] = "TARGET_INSTANCE"] = 3; + return values; + })(); + + return LoadBalancerInfo; + })(); + + v1beta1.LoadBalancerBackend = (function() { + + /** + * Properties of a LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILoadBalancerBackend + * @property {string|null} [displayName] LoadBalancerBackend displayName + * @property {string|null} [uri] LoadBalancerBackend uri + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState + * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules + * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules + */ + + /** + * Constructs a new LoadBalancerBackend. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LoadBalancerBackend. + * @implements ILoadBalancerBackend + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set + */ + function LoadBalancerBackend(properties) { + this.healthCheckAllowingFirewallRules = []; + this.healthCheckBlockingFirewallRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackend displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.displayName = ""; + + /** + * LoadBalancerBackend uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.uri = ""; + + /** + * LoadBalancerBackend healthCheckFirewallState. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckFirewallState = 0; + + /** + * LoadBalancerBackend healthCheckAllowingFirewallRules. + * @member {Array.} healthCheckAllowingFirewallRules + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; + + /** + * LoadBalancerBackend healthCheckBlockingFirewallRules. + * @member {Array.} healthCheckBlockingFirewallRules + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + */ + LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; + + /** + * Creates a new LoadBalancerBackend instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend instance + */ + LoadBalancerBackend.create = function create(properties) { + return new LoadBalancerBackend(properties); + }; + + /** + * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); + if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); + if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.healthCheckFirewallState = reader.int32(); + break; + } + case 4: { + if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) + message.healthCheckAllowingFirewallRules = []; + message.healthCheckAllowingFirewallRules.push(reader.string()); + break; + } + case 5: { + if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) + message.healthCheckBlockingFirewallRules = []; + message.healthCheckBlockingFirewallRules.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackend message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + switch (message.healthCheckFirewallState) { + default: + return "healthCheckFirewallState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { + if (!Array.isArray(message.healthCheckAllowingFirewallRules)) + return "healthCheckAllowingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) + return "healthCheckAllowingFirewallRules: string[] expected"; + } + if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { + if (!Array.isArray(message.healthCheckBlockingFirewallRules)) + return "healthCheckBlockingFirewallRules: array expected"; + for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) + if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) + return "healthCheckBlockingFirewallRules: string[] expected"; + } + return null; + }; + + /** + * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend + */ + LoadBalancerBackend.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + switch (object.healthCheckFirewallState) { + default: + if (typeof object.healthCheckFirewallState === "number") { + message.healthCheckFirewallState = object.healthCheckFirewallState; + break; + } + break; + case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallState = 0; + break; + case "CONFIGURED": + case 1: + message.healthCheckFirewallState = 1; + break; + case "MISCONFIGURED": + case 2: + message.healthCheckFirewallState = 2; + break; + } + if (object.healthCheckAllowingFirewallRules) { + if (!Array.isArray(object.healthCheckAllowingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); + message.healthCheckAllowingFirewallRules = []; + for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) + message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); + } + if (object.healthCheckBlockingFirewallRules) { + if (!Array.isArray(object.healthCheckBlockingFirewallRules)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); + message.healthCheckBlockingFirewallRules = []; + for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) + message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} message LoadBalancerBackend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.healthCheckAllowingFirewallRules = []; + object.healthCheckBlockingFirewallRules = []; + } + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) + object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; + if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { + object.healthCheckAllowingFirewallRules = []; + for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) + object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; + } + if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { + object.healthCheckBlockingFirewallRules = []; + for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) + object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; + } + return object; + }; + + /** + * Converts this LoadBalancerBackend to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackend + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackend"; + }; + + /** + * HealthCheckFirewallState enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value + * @property {number} CONFIGURED=1 CONFIGURED value + * @property {number} MISCONFIGURED=2 MISCONFIGURED value + */ + LoadBalancerBackend.HealthCheckFirewallState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFIGURED"] = 1; + values[valuesById[2] = "MISCONFIGURED"] = 2; + return values; + })(); + + return LoadBalancerBackend; + })(); + + v1beta1.VpnGatewayInfo = (function() { + + /** + * Properties of a VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpnGatewayInfo + * @property {string|null} [displayName] VpnGatewayInfo displayName + * @property {string|null} [uri] VpnGatewayInfo uri + * @property {string|null} [networkUri] VpnGatewayInfo networkUri + * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress + * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri + * @property {string|null} [region] VpnGatewayInfo region + */ + + /** + * Constructs a new VpnGatewayInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpnGatewayInfo. + * @implements IVpnGatewayInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set + */ + function VpnGatewayInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnGatewayInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.displayName = ""; + + /** + * VpnGatewayInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.uri = ""; + + /** + * VpnGatewayInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.networkUri = ""; + + /** + * VpnGatewayInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.ipAddress = ""; + + /** + * VpnGatewayInfo vpnTunnelUri. + * @member {string} vpnTunnelUri + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.vpnTunnelUri = ""; + + /** + * VpnGatewayInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + */ + VpnGatewayInfo.prototype.region = ""; + + /** + * Creates a new VpnGatewayInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo instance + */ + VpnGatewayInfo.create = function create(properties) { + return new VpnGatewayInfo(properties); + }; + + /** + * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 5: { + message.vpnTunnelUri = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnGatewayInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnGatewayInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + if (!$util.isString(message.vpnTunnelUri)) + return "vpnTunnelUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo + */ + VpnGatewayInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.vpnTunnelUri != null) + message.vpnTunnelUri = String(object.vpnTunnelUri); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} message VpnGatewayInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnGatewayInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.ipAddress = ""; + object.vpnTunnelUri = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) + object.vpnTunnelUri = message.vpnTunnelUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this VpnGatewayInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @instance + * @returns {Object.} JSON object + */ + VpnGatewayInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnGatewayInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnGatewayInfo"; + }; + + return VpnGatewayInfo; + })(); + + v1beta1.VpnTunnelInfo = (function() { + + /** + * Properties of a VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpnTunnelInfo + * @property {string|null} [displayName] VpnTunnelInfo displayName + * @property {string|null} [uri] VpnTunnelInfo uri + * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway + * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway + * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp + * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp + * @property {string|null} [networkUri] VpnTunnelInfo networkUri + * @property {string|null} [region] VpnTunnelInfo region + * @property {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType + */ + + /** + * Constructs a new VpnTunnelInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpnTunnelInfo. + * @implements IVpnTunnelInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set + */ + function VpnTunnelInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpnTunnelInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.displayName = ""; + + /** + * VpnTunnelInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.uri = ""; + + /** + * VpnTunnelInfo sourceGateway. + * @member {string} sourceGateway + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGateway = ""; + + /** + * VpnTunnelInfo remoteGateway. + * @member {string} remoteGateway + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGateway = ""; + + /** + * VpnTunnelInfo remoteGatewayIp. + * @member {string} remoteGatewayIp + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.remoteGatewayIp = ""; + + /** + * VpnTunnelInfo sourceGatewayIp. + * @member {string} sourceGatewayIp + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.sourceGatewayIp = ""; + + /** + * VpnTunnelInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.networkUri = ""; + + /** + * VpnTunnelInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.region = ""; + + /** + * VpnTunnelInfo routingType. + * @member {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType} routingType + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + */ + VpnTunnelInfo.prototype.routingType = 0; + + /** + * Creates a new VpnTunnelInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo instance + */ + VpnTunnelInfo.create = function create(properties) { + return new VpnTunnelInfo(properties); + }; + + /** + * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); + if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); + if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); + if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); + if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); + return writer; + }; + + /** + * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.sourceGateway = reader.string(); + break; + } + case 4: { + message.remoteGateway = reader.string(); + break; + } + case 5: { + message.remoteGatewayIp = reader.string(); + break; + } + case 6: { + message.sourceGatewayIp = reader.string(); + break; + } + case 7: { + message.networkUri = reader.string(); + break; + } + case 8: { + message.region = reader.string(); + break; + } + case 9: { + message.routingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpnTunnelInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpnTunnelInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + if (!$util.isString(message.sourceGateway)) + return "sourceGateway: string expected"; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + if (!$util.isString(message.remoteGateway)) + return "remoteGateway: string expected"; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + if (!$util.isString(message.remoteGatewayIp)) + return "remoteGatewayIp: string expected"; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + if (!$util.isString(message.sourceGatewayIp)) + return "sourceGatewayIp: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.routingType != null && message.hasOwnProperty("routingType")) + switch (message.routingType) { + default: + return "routingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo + */ + VpnTunnelInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.sourceGateway != null) + message.sourceGateway = String(object.sourceGateway); + if (object.remoteGateway != null) + message.remoteGateway = String(object.remoteGateway); + if (object.remoteGatewayIp != null) + message.remoteGatewayIp = String(object.remoteGatewayIp); + if (object.sourceGatewayIp != null) + message.sourceGatewayIp = String(object.sourceGatewayIp); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.region != null) + message.region = String(object.region); + switch (object.routingType) { + default: + if (typeof object.routingType === "number") { + message.routingType = object.routingType; + break; + } + break; + case "ROUTING_TYPE_UNSPECIFIED": + case 0: + message.routingType = 0; + break; + case "ROUTE_BASED": + case 1: + message.routingType = 1; + break; + case "POLICY_BASED": + case 2: + message.routingType = 2; + break; + case "DYNAMIC": + case 3: + message.routingType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} message VpnTunnelInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpnTunnelInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.sourceGateway = ""; + object.remoteGateway = ""; + object.remoteGatewayIp = ""; + object.sourceGatewayIp = ""; + object.networkUri = ""; + object.region = ""; + object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) + object.sourceGateway = message.sourceGateway; + if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) + object.remoteGateway = message.remoteGateway; + if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) + object.remoteGatewayIp = message.remoteGatewayIp; + if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) + object.sourceGatewayIp = message.sourceGatewayIp; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.routingType != null && message.hasOwnProperty("routingType")) + object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; + return object; + }; + + /** + * Converts this VpnTunnelInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @instance + * @returns {Object.} JSON object + */ + VpnTunnelInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpnTunnelInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnTunnelInfo"; + }; + + /** + * RoutingType enum. + * @name google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType + * @enum {number} + * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value + * @property {number} ROUTE_BASED=1 ROUTE_BASED value + * @property {number} POLICY_BASED=2 POLICY_BASED value + * @property {number} DYNAMIC=3 DYNAMIC value + */ + VpnTunnelInfo.RoutingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ROUTE_BASED"] = 1; + values[valuesById[2] = "POLICY_BASED"] = 2; + values[valuesById[3] = "DYNAMIC"] = 3; + return values; + })(); + + return VpnTunnelInfo; + })(); + + v1beta1.EndpointInfo = (function() { + + /** + * Properties of an EndpointInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IEndpointInfo + * @property {string|null} [sourceIp] EndpointInfo sourceIp + * @property {string|null} [destinationIp] EndpointInfo destinationIp + * @property {string|null} [protocol] EndpointInfo protocol + * @property {number|null} [sourcePort] EndpointInfo sourcePort + * @property {number|null} [destinationPort] EndpointInfo destinationPort + * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri + * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri + * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri + */ + + /** + * Constructs a new EndpointInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an EndpointInfo. + * @implements IEndpointInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set + */ + function EndpointInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EndpointInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceIp = ""; + + /** + * EndpointInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationIp = ""; + + /** + * EndpointInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.protocol = ""; + + /** + * EndpointInfo sourcePort. + * @member {number} sourcePort + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourcePort = 0; + + /** + * EndpointInfo destinationPort. + * @member {number} destinationPort + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationPort = 0; + + /** + * EndpointInfo sourceNetworkUri. + * @member {string} sourceNetworkUri + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceNetworkUri = ""; + + /** + * EndpointInfo destinationNetworkUri. + * @member {string} destinationNetworkUri + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.destinationNetworkUri = ""; + + /** + * EndpointInfo sourceAgentUri. + * @member {string} sourceAgentUri + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + */ + EndpointInfo.prototype.sourceAgentUri = ""; + + /** + * Creates a new EndpointInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo instance + */ + EndpointInfo.create = function create(properties) { + return new EndpointInfo(properties); + }; + + /** + * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); + if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); + if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); + if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); + return writer; + }; + + /** + * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.sourceIp = reader.string(); + break; + } + case 2: { + message.destinationIp = reader.string(); + break; + } + case 3: { + message.protocol = reader.string(); + break; + } + case 4: { + message.sourcePort = reader.int32(); + break; + } + case 5: { + message.destinationPort = reader.int32(); + break; + } + case 6: { + message.sourceNetworkUri = reader.string(); + break; + } + case 7: { + message.destinationNetworkUri = reader.string(); + break; + } + case 8: { + message.sourceAgentUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EndpointInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EndpointInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EndpointInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isInteger(message.sourcePort)) + return "sourcePort: integer expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isInteger(message.destinationPort)) + return "destinationPort: integer expected"; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + if (!$util.isString(message.sourceNetworkUri)) + return "sourceNetworkUri: string expected"; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + if (!$util.isString(message.destinationNetworkUri)) + return "destinationNetworkUri: string expected"; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + if (!$util.isString(message.sourceAgentUri)) + return "sourceAgentUri: string expected"; + return null; + }; + + /** + * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo + */ + EndpointInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.EndpointInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.sourcePort != null) + message.sourcePort = object.sourcePort | 0; + if (object.destinationPort != null) + message.destinationPort = object.destinationPort | 0; + if (object.sourceNetworkUri != null) + message.sourceNetworkUri = String(object.sourceNetworkUri); + if (object.destinationNetworkUri != null) + message.destinationNetworkUri = String(object.destinationNetworkUri); + if (object.sourceAgentUri != null) + message.sourceAgentUri = String(object.sourceAgentUri); + return message; + }; + + /** + * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.EndpointInfo} message EndpointInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EndpointInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.sourceIp = ""; + object.destinationIp = ""; + object.protocol = ""; + object.sourcePort = 0; + object.destinationPort = 0; + object.sourceNetworkUri = ""; + object.destinationNetworkUri = ""; + object.sourceAgentUri = ""; + } + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) + object.sourceNetworkUri = message.sourceNetworkUri; + if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) + object.destinationNetworkUri = message.destinationNetworkUri; + if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) + object.sourceAgentUri = message.sourceAgentUri; + return object; + }; + + /** + * Converts this EndpointInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @instance + * @returns {Object.} JSON object + */ + EndpointInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EndpointInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.EndpointInfo"; + }; + + return EndpointInfo; + })(); + + v1beta1.DeliverInfo = (function() { + + /** + * Properties of a DeliverInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDeliverInfo + * @property {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null} [target] DeliverInfo target + * @property {string|null} [resourceUri] DeliverInfo resourceUri + * @property {string|null} [ipAddress] DeliverInfo ipAddress + * @property {string|null} [storageBucket] DeliverInfo storageBucket + * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget + */ + + /** + * Constructs a new DeliverInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DeliverInfo. + * @implements IDeliverInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set + */ + function DeliverInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeliverInfo target. + * @member {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target} target + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.target = 0; + + /** + * DeliverInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.resourceUri = ""; + + /** + * DeliverInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.ipAddress = ""; + + /** + * DeliverInfo storageBucket. + * @member {string} storageBucket + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.storageBucket = ""; + + /** + * DeliverInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + */ + DeliverInfo.prototype.pscGoogleApiTarget = ""; + + /** + * Creates a new DeliverInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo instance + */ + DeliverInfo.create = function create(properties) { + return new DeliverInfo(properties); + }; + + /** + * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + case 4: { + message.storageBucket = reader.string(); + break; + } + case 5: { + message.pscGoogleApiTarget = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeliverInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeliverInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeliverInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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: + case 15: + case 16: + case 17: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + if (!$util.isString(message.storageBucket)) + return "storageBucket: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + return null; + }; + + /** + * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo + */ + DeliverInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeliverInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "INSTANCE": + case 1: + message.target = 1; + break; + case "INTERNET": + case 2: + message.target = 2; + break; + case "GOOGLE_API": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "CLOUD_SQL_INSTANCE": + case 5: + message.target = 5; + break; + case "PSC_PUBLISHED_SERVICE": + case 6: + message.target = 6; + break; + case "PSC_GOOGLE_API": + case 7: + message.target = 7; + break; + case "PSC_VPC_SC": + case 8: + message.target = 8; + break; + case "SERVERLESS_NEG": + case 9: + message.target = 9; + break; + case "STORAGE_BUCKET": + case 10: + message.target = 10; + break; + case "PRIVATE_NETWORK": + case 11: + message.target = 11; + break; + case "CLOUD_FUNCTION": + case 12: + message.target = 12; + break; + case "APP_ENGINE_VERSION": + case 13: + message.target = 13; + break; + case "CLOUD_RUN_REVISION": + case 14: + message.target = 14; + break; + case "GOOGLE_MANAGED_SERVICE": + case 15: + message.target = 15; + break; + case "REDIS_INSTANCE": + case 16: + message.target = 16; + break; + case "REDIS_CLUSTER": + case 17: + message.target = 17; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.storageBucket != null) + message.storageBucket = String(object.storageBucket); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + return message; + }; + + /** + * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.DeliverInfo} message DeliverInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeliverInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + object.storageBucket = ""; + object.pscGoogleApiTarget = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) + object.storageBucket = message.storageBucket; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this DeliverInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @instance + * @returns {Object.} JSON object + */ + DeliverInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeliverInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeliverInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1beta1.DeliverInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} INSTANCE=1 INSTANCE value + * @property {number} INTERNET=2 INTERNET value + * @property {number} GOOGLE_API=3 GOOGLE_API value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value + * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value + * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value + * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value + * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value + * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value + * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value + * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value + * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value + * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value + * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value + * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value + * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value + */ + DeliverInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSTANCE"] = 1; + values[valuesById[2] = "INTERNET"] = 2; + values[valuesById[3] = "GOOGLE_API"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; + values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; + values[valuesById[7] = "PSC_GOOGLE_API"] = 7; + values[valuesById[8] = "PSC_VPC_SC"] = 8; + values[valuesById[9] = "SERVERLESS_NEG"] = 9; + values[valuesById[10] = "STORAGE_BUCKET"] = 10; + values[valuesById[11] = "PRIVATE_NETWORK"] = 11; + values[valuesById[12] = "CLOUD_FUNCTION"] = 12; + values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; + values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; + values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; + values[valuesById[16] = "REDIS_INSTANCE"] = 16; + values[valuesById[17] = "REDIS_CLUSTER"] = 17; + return values; + })(); + + return DeliverInfo; + })(); + + v1beta1.ForwardInfo = (function() { + + /** + * Properties of a ForwardInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IForwardInfo + * @property {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null} [target] ForwardInfo target + * @property {string|null} [resourceUri] ForwardInfo resourceUri + * @property {string|null} [ipAddress] ForwardInfo ipAddress + */ + + /** + * Constructs a new ForwardInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ForwardInfo. + * @implements IForwardInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set + */ + function ForwardInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ForwardInfo target. + * @member {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target} target + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.target = 0; + + /** + * ForwardInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.resourceUri = ""; + + /** + * ForwardInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + */ + ForwardInfo.prototype.ipAddress = ""; + + /** + * Creates a new ForwardInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo instance + */ + ForwardInfo.create = function create(properties) { + return new ForwardInfo(properties); + }; + + /** + * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.target = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.ipAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ForwardInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ForwardInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ForwardInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.target != null && message.hasOwnProperty("target")) + switch (message.target) { + default: + return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + return null; + }; + + /** + * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo + */ + ForwardInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); + switch (object.target) { + default: + if (typeof object.target === "number") { + message.target = object.target; + break; + } + break; + case "TARGET_UNSPECIFIED": + case 0: + message.target = 0; + break; + case "PEERING_VPC": + case 1: + message.target = 1; + break; + case "VPN_GATEWAY": + case 2: + message.target = 2; + break; + case "INTERCONNECT": + case 3: + message.target = 3; + break; + case "GKE_MASTER": + case 4: + message.target = 4; + break; + case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": + case 5: + message.target = 5; + break; + case "CLOUD_SQL_INSTANCE": + case 6: + message.target = 6; + break; + case "ANOTHER_PROJECT": + case 7: + message.target = 7; + break; + case "NCC_HUB": + case 8: + message.target = 8; + break; + case "ROUTER_APPLIANCE": + case 9: + message.target = 9; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + return message; + }; + + /** + * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ForwardInfo} message ForwardInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ForwardInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.target != null && message.hasOwnProperty("target")) + object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] : message.target; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this ForwardInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @instance + * @returns {Object.} JSON object + */ + ForwardInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ForwardInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardInfo"; + }; + + /** + * Target enum. + * @name google.cloud.networkmanagement.v1beta1.ForwardInfo.Target + * @enum {number} + * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value + * @property {number} PEERING_VPC=1 PEERING_VPC value + * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value + * @property {number} INTERCONNECT=3 INTERCONNECT value + * @property {number} GKE_MASTER=4 GKE_MASTER value + * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value + * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value + * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value + * @property {number} NCC_HUB=8 NCC_HUB value + * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value + */ + ForwardInfo.Target = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "PEERING_VPC"] = 1; + values[valuesById[2] = "VPN_GATEWAY"] = 2; + values[valuesById[3] = "INTERCONNECT"] = 3; + values[valuesById[4] = "GKE_MASTER"] = 4; + values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; + values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; + values[valuesById[7] = "ANOTHER_PROJECT"] = 7; + values[valuesById[8] = "NCC_HUB"] = 8; + values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; + return values; + })(); + + return ForwardInfo; + })(); + + v1beta1.AbortInfo = (function() { + + /** + * Properties of an AbortInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IAbortInfo + * @property {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null} [cause] AbortInfo cause + * @property {string|null} [resourceUri] AbortInfo resourceUri + * @property {string|null} [ipAddress] AbortInfo ipAddress + * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission + */ + + /** + * Constructs a new AbortInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an AbortInfo. + * @implements IAbortInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set + */ + function AbortInfo(properties) { + this.projectsMissingPermission = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AbortInfo cause. + * @member {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.cause = 0; + + /** + * AbortInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.resourceUri = ""; + + /** + * AbortInfo ipAddress. + * @member {string} ipAddress + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.ipAddress = ""; + + /** + * AbortInfo projectsMissingPermission. + * @member {Array.} projectsMissingPermission + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + */ + AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; + + /** + * Creates a new AbortInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo instance + */ + AbortInfo.create = function create(properties) { + return new AbortInfo(properties); + }; + + /** + * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); + if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); + return writer; + }; + + /** + * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 4: { + message.ipAddress = reader.string(); + break; + } + case 3: { + if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) + message.projectsMissingPermission = []; + message.projectsMissingPermission.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AbortInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AbortInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AbortInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AbortInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 3: + case 7: + case 8: + case 11: + case 12: + case 13: + case 14: + case 2: + case 32: + case 23: + case 4: + case 28: + case 29: + case 36: + case 5: + case 6: + case 9: + case 10: + case 15: + case 16: + case 17: + case 18: + case 24: + case 25: + case 26: + case 27: + case 19: + case 20: + case 34: + case 35: + case 21: + case 22: + case 30: + case 31: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + if (!$util.isString(message.ipAddress)) + return "ipAddress: string expected"; + if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { + if (!Array.isArray(message.projectsMissingPermission)) + return "projectsMissingPermission: array expected"; + for (var i = 0; i < message.projectsMissingPermission.length; ++i) + if (!$util.isString(message.projectsMissingPermission[i])) + return "projectsMissingPermission: string[] expected"; + } + return null; + }; + + /** + * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo + */ + AbortInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AbortInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_NETWORK": + case 1: + message.cause = 1; + break; + case "UNKNOWN_PROJECT": + case 3: + message.cause = 3; + break; + case "NO_EXTERNAL_IP": + case 7: + message.cause = 7; + break; + case "UNINTENDED_DESTINATION": + case 8: + message.cause = 8; + break; + case "SOURCE_ENDPOINT_NOT_FOUND": + case 11: + message.cause = 11; + break; + case "MISMATCHED_SOURCE_NETWORK": + case 12: + message.cause = 12; + break; + case "DESTINATION_ENDPOINT_NOT_FOUND": + case 13: + message.cause = 13; + break; + case "MISMATCHED_DESTINATION_NETWORK": + case 14: + message.cause = 14; + break; + case "UNKNOWN_IP": + case 2: + message.cause = 2; + break; + case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": + case 32: + message.cause = 32; + break; + case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": + case 23: + message.cause = 23; + break; + case "PERMISSION_DENIED": + case 4: + message.cause = 4; + break; + case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": + case 28: + message.cause = 28; + break; + case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": + case 29: + message.cause = 29; + break; + case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": + case 36: + message.cause = 36; + break; + case "NO_SOURCE_LOCATION": + case 5: + message.cause = 5; + break; + case "INVALID_ARGUMENT": + case 6: + message.cause = 6; + break; + case "TRACE_TOO_LONG": + case 9: + message.cause = 9; + break; + case "INTERNAL_ERROR": + case 10: + message.cause = 10; + break; + case "UNSUPPORTED": + case 15: + message.cause = 15; + break; + case "MISMATCHED_IP_VERSION": + case 16: + message.cause = 16; + break; + case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": + case 17: + message.cause = 17; + break; + case "RESOURCE_CONFIG_NOT_FOUND": + case 18: + message.cause = 18; + break; + case "VM_INSTANCE_CONFIG_NOT_FOUND": + case 24: + message.cause = 24; + break; + case "NETWORK_CONFIG_NOT_FOUND": + case 25: + message.cause = 25; + break; + case "FIREWALL_CONFIG_NOT_FOUND": + case 26: + message.cause = 26; + break; + case "ROUTE_CONFIG_NOT_FOUND": + case 27: + message.cause = 27; + break; + case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": + case 19: + message.cause = 19; + break; + case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": + case 20: + message.cause = 20; + break; + case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": + case 34: + message.cause = 34; + break; + case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": + case 35: + message.cause = 35; + break; + case "SOURCE_FORWARDING_RULE_UNSUPPORTED": + case 21: + message.cause = 21; + break; + case "NON_ROUTABLE_IP_ADDRESS": + case 22: + message.cause = 22; + break; + case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": + case 30: + message.cause = 30; + break; + case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": + case 31: + message.cause = 31; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.ipAddress != null) + message.ipAddress = String(object.ipAddress); + if (object.projectsMissingPermission) { + if (!Array.isArray(object.projectsMissingPermission)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.AbortInfo.projectsMissingPermission: array expected"); + message.projectsMissingPermission = []; + for (var i = 0; i < object.projectsMissingPermission.length; ++i) + message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); + } + return message; + }; + + /** + * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.AbortInfo} message AbortInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AbortInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectsMissingPermission = []; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.ipAddress = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.projectsMissingPermission && message.projectsMissingPermission.length) { + object.projectsMissingPermission = []; + for (var j = 0; j < message.projectsMissingPermission.length; ++j) + object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; + } + if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) + object.ipAddress = message.ipAddress; + return object; + }; + + /** + * Converts this AbortInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @instance + * @returns {Object.} JSON object + */ + AbortInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AbortInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AbortInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1beta1.AbortInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value + * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value + * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value + * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value + * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value + * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value + * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value + * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value + * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value + * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value + * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value + * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value + * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value + * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value + * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value + * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value + * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value + * @property {number} UNSUPPORTED=15 UNSUPPORTED value + * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value + * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value + * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value + * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value + * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value + * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value + * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value + * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value + * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value + * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value + * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value + * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value + * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value + * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value + * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value + */ + AbortInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; + values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; + values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; + values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; + values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; + values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; + values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; + values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; + values[valuesById[2] = "UNKNOWN_IP"] = 2; + values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; + values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; + values[valuesById[4] = "PERMISSION_DENIED"] = 4; + values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; + values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; + values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; + values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; + values[valuesById[6] = "INVALID_ARGUMENT"] = 6; + values[valuesById[9] = "TRACE_TOO_LONG"] = 9; + values[valuesById[10] = "INTERNAL_ERROR"] = 10; + values[valuesById[15] = "UNSUPPORTED"] = 15; + values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; + values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; + values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; + values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; + values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; + values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; + values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; + values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; + values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; + values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; + values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; + values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; + values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; + values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; + values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; + return values; + })(); + + return AbortInfo; + })(); + + v1beta1.DropInfo = (function() { + + /** + * Properties of a DropInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDropInfo + * @property {google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null} [cause] DropInfo cause + * @property {string|null} [resourceUri] DropInfo resourceUri + * @property {string|null} [sourceIp] DropInfo sourceIp + * @property {string|null} [destinationIp] DropInfo destinationIp + * @property {string|null} [region] DropInfo region + */ + + /** + * Constructs a new DropInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DropInfo. + * @implements IDropInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set + */ + function DropInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DropInfo cause. + * @member {google.cloud.networkmanagement.v1beta1.DropInfo.Cause} cause + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.cause = 0; + + /** + * DropInfo resourceUri. + * @member {string} resourceUri + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.resourceUri = ""; + + /** + * DropInfo sourceIp. + * @member {string} sourceIp + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.sourceIp = ""; + + /** + * DropInfo destinationIp. + * @member {string} destinationIp + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.destinationIp = ""; + + /** + * DropInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + */ + DropInfo.prototype.region = ""; + + /** + * Creates a new DropInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo instance + */ + DropInfo.create = function create(properties) { + return new DropInfo(properties); + }; + + /** + * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); + if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); + if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); + if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); + return writer; + }; + + /** + * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DropInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cause = reader.int32(); + break; + } + case 2: { + message.resourceUri = reader.string(); + break; + } + case 3: { + message.sourceIp = reader.string(); + break; + } + case 4: { + message.destinationIp = reader.string(); + break; + } + case 5: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DropInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DropInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DropInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DropInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cause != null && message.hasOwnProperty("cause")) + switch (message.cause) { + default: + return "cause: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 42: + case 43: + case 49: + case 50: + case 51: + case 52: + case 53: + case 44: + case 45: + case 46: + case 7: + case 8: + case 47: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 27: + case 28: + case 68: + case 69: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 38: + case 36: + case 21: + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 63: + case 22: + case 23: + case 24: + case 60: + case 61: + case 25: + case 26: + case 41: + case 48: + case 54: + case 58: + case 57: + case 64: + case 55: + case 56: + case 29: + case 37: + case 39: + case 40: + case 59: + case 62: + case 65: + case 66: + case 67: + case 70: + case 71: + case 72: + case 73: + case 74: + case 78: + case 75: + case 76: + case 77: + case 79: + case 80: + case 81: + case 82: + case 83: + break; + } + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + if (!$util.isString(message.resourceUri)) + return "resourceUri: string expected"; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + if (!$util.isString(message.sourceIp)) + return "sourceIp: string expected"; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + if (!$util.isString(message.destinationIp)) + return "destinationIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo + */ + DropInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DropInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); + switch (object.cause) { + default: + if (typeof object.cause === "number") { + message.cause = object.cause; + break; + } + break; + case "CAUSE_UNSPECIFIED": + case 0: + message.cause = 0; + break; + case "UNKNOWN_EXTERNAL_ADDRESS": + case 1: + message.cause = 1; + break; + case "FOREIGN_IP_DISALLOWED": + case 2: + message.cause = 2; + break; + case "FIREWALL_RULE": + case 3: + message.cause = 3; + break; + case "NO_ROUTE": + case 4: + message.cause = 4; + break; + case "ROUTE_BLACKHOLE": + case 5: + message.cause = 5; + break; + case "ROUTE_WRONG_NETWORK": + case 6: + message.cause = 6; + break; + case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": + case 42: + message.cause = 42; + break; + case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": + case 43: + message.cause = 43; + break; + case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": + case 49: + message.cause = 49; + break; + case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": + case 50: + message.cause = 50; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": + case 51: + message.cause = 51; + break; + case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": + case 52: + message.cause = 52; + break; + case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": + case 53: + message.cause = 53; + break; + case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": + case 44: + message.cause = 44; + break; + case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": + case 45: + message.cause = 45; + break; + case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": + case 46: + message.cause = 46; + break; + case "PRIVATE_TRAFFIC_TO_INTERNET": + case 7: + message.cause = 7; + break; + case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": + case 8: + message.cause = 8; + break; + case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": + case 47: + message.cause = 47; + break; + case "NO_EXTERNAL_ADDRESS": + case 9: + message.cause = 9; + break; + case "UNKNOWN_INTERNAL_ADDRESS": + case 10: + message.cause = 10; + break; + case "FORWARDING_RULE_MISMATCH": + case 11: + message.cause = 11; + break; + case "FORWARDING_RULE_NO_INSTANCES": + case 12: + message.cause = 12; + break; + case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": + case 13: + message.cause = 13; + break; + case "INSTANCE_NOT_RUNNING": + case 14: + message.cause = 14; + break; + case "GKE_CLUSTER_NOT_RUNNING": + case 27: + message.cause = 27; + break; + case "CLOUD_SQL_INSTANCE_NOT_RUNNING": + case 28: + message.cause = 28; + break; + case "REDIS_INSTANCE_NOT_RUNNING": + case 68: + message.cause = 68; + break; + case "REDIS_CLUSTER_NOT_RUNNING": + case 69: + message.cause = 69; + break; + case "TRAFFIC_TYPE_BLOCKED": + case 15: + message.cause = 15; + break; + case "GKE_MASTER_UNAUTHORIZED_ACCESS": + case 16: + message.cause = 16; + break; + case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": + case 17: + message.cause = 17; + break; + case "DROPPED_INSIDE_GKE_SERVICE": + case 18: + message.cause = 18; + break; + case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": + case 19: + message.cause = 19; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PEERING": + case 20: + message.cause = 20; + break; + case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": + case 38: + message.cause = 38; + break; + case "GKE_PSC_ENDPOINT_MISSING": + case 36: + message.cause = 36; + break; + case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": + case 21: + message.cause = 21; + break; + case "GKE_CONTROL_PLANE_REGION_MISMATCH": + case 30: + message.cause = 30; + break; + case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": + case 31: + message.cause = 31; + break; + case "GKE_CONTROL_PLANE_NO_ROUTE": + case 32: + message.cause = 32; + break; + case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": + case 33: + message.cause = 33; + break; + case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": + case 34: + message.cause = 34; + break; + case "CLOUD_SQL_INSTANCE_NO_ROUTE": + case 35: + message.cause = 35; + break; + case "CLOUD_SQL_CONNECTOR_REQUIRED": + case 63: + message.cause = 63; + break; + case "CLOUD_FUNCTION_NOT_ACTIVE": + case 22: + message.cause = 22; + break; + case "VPC_CONNECTOR_NOT_SET": + case 23: + message.cause = 23; + break; + case "VPC_CONNECTOR_NOT_RUNNING": + case 24: + message.cause = 24; + break; + case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": + case 60: + message.cause = 60; + break; + case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": + case 61: + message.cause = 61; + break; + case "FORWARDING_RULE_REGION_MISMATCH": + case 25: + message.cause = 25; + break; + case "PSC_CONNECTION_NOT_ACCEPTED": + case 26: + message.cause = 26; + break; + case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": + case 41: + message.cause = 41; + break; + case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": + case 48: + message.cause = 48; + break; + case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": + case 54: + message.cause = 54; + break; + case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": + case 58: + message.cause = 58; + break; + case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": + case 57: + message.cause = 57; + break; + case "PSC_TRANSITIVITY_NOT_PROPAGATED": + case 64: + message.cause = 64; + break; + case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": + case 55: + message.cause = 55; + break; + case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": + case 56: + message.cause = 56; + break; + case "CLOUD_RUN_REVISION_NOT_READY": + case 29: + message.cause = 29; + break; + case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": + case 37: + message.cause = 37; + break; + case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": + case 39: + message.cause = 39; + break; + case "CLOUD_NAT_NO_ADDRESSES": + case 40: + message.cause = 40; + break; + case "ROUTING_LOOP": + case 59: + message.cause = 59; + break; + case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": + case 62: + message.cause = 62; + break; + case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": + case 65: + message.cause = 65; + break; + case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": + case 66: + message.cause = 66; + break; + case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": + case 67: + message.cause = 67; + break; + case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": + case 70: + message.cause = 70; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PORT": + case 71: + message.cause = 71; + break; + case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": + case 72: + message.cause = 72; + break; + case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": + case 73: + message.cause = 73; + break; + case "REDIS_INSTANCE_NO_EXTERNAL_IP": + case 74: + message.cause = 74; + break; + case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": + case 78: + message.cause = 78; + break; + case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": + case 75: + message.cause = 75; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PORT": + case 76: + message.cause = 76; + break; + case "REDIS_CLUSTER_NO_EXTERNAL_IP": + case 77: + message.cause = 77; + break; + case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": + case 79: + message.cause = 79; + break; + case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": + case 80: + message.cause = 80; + break; + case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": + case 81: + message.cause = 81; + break; + case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": + case 82: + message.cause = 82; + break; + case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": + case 83: + message.cause = 83; + break; + } + if (object.resourceUri != null) + message.resourceUri = String(object.resourceUri); + if (object.sourceIp != null) + message.sourceIp = String(object.sourceIp); + if (object.destinationIp != null) + message.destinationIp = String(object.destinationIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a DropInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.DropInfo} message DropInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DropInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; + object.resourceUri = ""; + object.sourceIp = ""; + object.destinationIp = ""; + object.region = ""; + } + if (message.cause != null && message.hasOwnProperty("cause")) + object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] : message.cause; + if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) + object.resourceUri = message.resourceUri; + if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) + object.sourceIp = message.sourceIp; + if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) + object.destinationIp = message.destinationIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this DropInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @instance + * @returns {Object.} JSON object + */ + DropInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DropInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DropInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DropInfo"; + }; + + /** + * Cause enum. + * @name google.cloud.networkmanagement.v1beta1.DropInfo.Cause + * @enum {number} + * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value + * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value + * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value + * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value + * @property {number} NO_ROUTE=4 NO_ROUTE value + * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value + * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value + * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value + * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value + * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value + * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value + * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value + * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value + * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value + * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value + * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value + * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value + * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value + * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value + * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value + * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value + * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value + * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value + * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value + * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value + * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value + * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value + * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value + * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value + * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value + * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value + * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value + * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value + * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value + * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value + * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value + * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value + * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value + * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value + * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value + * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value + * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value + * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value + * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value + * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value + * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value + * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value + * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value + * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value + * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value + * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value + * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value + * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value + * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value + * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value + * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value + * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value + * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value + * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value + * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value + * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value + * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value + * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value + * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value + * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value + * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value + * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value + * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value + * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value + * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value + * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value + * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value + * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value + * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value + * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value + * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value + * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value + */ + DropInfo.Cause = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; + values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; + values[valuesById[3] = "FIREWALL_RULE"] = 3; + values[valuesById[4] = "NO_ROUTE"] = 4; + values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; + values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; + values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; + values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; + values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; + values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; + values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; + values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; + values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; + values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; + values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; + values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; + values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; + values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; + values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; + values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; + values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; + values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; + values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; + values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; + values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; + values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; + values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; + values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; + values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; + values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; + values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; + values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; + values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; + values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; + values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; + values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; + values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; + values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; + values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; + values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; + values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; + values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; + values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; + values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; + values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; + values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; + values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; + values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; + values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; + values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; + values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; + values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; + values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; + values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; + values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; + values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; + values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; + values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; + values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; + values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; + values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; + values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; + values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; + values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; + values[valuesById[59] = "ROUTING_LOOP"] = 59; + values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; + values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; + values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; + values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; + values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; + values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; + values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; + values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; + values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; + values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; + values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; + values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; + values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; + values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; + values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; + values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; + values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; + values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; + return values; + })(); + + return DropInfo; + })(); + + v1beta1.GKEMasterInfo = (function() { + + /** + * Properties of a GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGKEMasterInfo + * @property {string|null} [clusterUri] GKEMasterInfo clusterUri + * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri + * @property {string|null} [internalIp] GKEMasterInfo internalIp + * @property {string|null} [externalIp] GKEMasterInfo externalIp + * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint + */ + + /** + * Constructs a new GKEMasterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GKEMasterInfo. + * @implements IGKEMasterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set + */ + function GKEMasterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GKEMasterInfo clusterUri. + * @member {string} clusterUri + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterUri = ""; + + /** + * GKEMasterInfo clusterNetworkUri. + * @member {string} clusterNetworkUri + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.clusterNetworkUri = ""; + + /** + * GKEMasterInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.internalIp = ""; + + /** + * GKEMasterInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.externalIp = ""; + + /** + * GKEMasterInfo dnsEndpoint. + * @member {string} dnsEndpoint + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.dnsEndpoint = ""; + + /** + * Creates a new GKEMasterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo instance + */ + GKEMasterInfo.create = function create(properties) { + return new GKEMasterInfo(properties); + }; + + /** + * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); + if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); + return writer; + }; + + /** + * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.clusterUri = reader.string(); + break; + } + case 4: { + message.clusterNetworkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.dnsEndpoint = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GKEMasterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GKEMasterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + if (!$util.isString(message.clusterUri)) + return "clusterUri: string expected"; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + if (!$util.isString(message.clusterNetworkUri)) + return "clusterNetworkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + if (!$util.isString(message.dnsEndpoint)) + return "dnsEndpoint: string expected"; + return null; + }; + + /** + * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo + */ + GKEMasterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); + if (object.clusterUri != null) + message.clusterUri = String(object.clusterUri); + if (object.clusterNetworkUri != null) + message.clusterNetworkUri = String(object.clusterNetworkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.dnsEndpoint != null) + message.dnsEndpoint = String(object.dnsEndpoint); + return message; + }; + + /** + * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} message GKEMasterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GKEMasterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clusterUri = ""; + object.clusterNetworkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.dnsEndpoint = ""; + } + if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) + object.clusterUri = message.clusterUri; + if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) + object.clusterNetworkUri = message.clusterNetworkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + object.dnsEndpoint = message.dnsEndpoint; + return object; + }; + + /** + * Converts this GKEMasterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @instance + * @returns {Object.} JSON object + */ + GKEMasterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GKEMasterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GKEMasterInfo"; + }; + + return GKEMasterInfo; + })(); + + v1beta1.CloudSQLInstanceInfo = (function() { + + /** + * Properties of a CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICloudSQLInstanceInfo + * @property {string|null} [displayName] CloudSQLInstanceInfo displayName + * @property {string|null} [uri] CloudSQLInstanceInfo uri + * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri + * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp + * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp + * @property {string|null} [region] CloudSQLInstanceInfo region + */ + + /** + * Constructs a new CloudSQLInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CloudSQLInstanceInfo. + * @implements ICloudSQLInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set + */ + function CloudSQLInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudSQLInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.displayName = ""; + + /** + * CloudSQLInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.uri = ""; + + /** + * CloudSQLInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.networkUri = ""; + + /** + * CloudSQLInstanceInfo internalIp. + * @member {string} internalIp + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.internalIp = ""; + + /** + * CloudSQLInstanceInfo externalIp. + * @member {string} externalIp + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.externalIp = ""; + + /** + * CloudSQLInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + */ + CloudSQLInstanceInfo.prototype.region = ""; + + /** + * Creates a new CloudSQLInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance + */ + CloudSQLInstanceInfo.create = function create(properties) { + return new CloudSQLInstanceInfo(properties); + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); + if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); + if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); + return writer; + }; + + /** + * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.networkUri = reader.string(); + break; + } + case 5: { + message.internalIp = reader.string(); + break; + } + case 6: { + message.externalIp = reader.string(); + break; + } + case 7: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSQLInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSQLInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + if (!$util.isString(message.internalIp)) + return "internalIp: string expected"; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + if (!$util.isString(message.externalIp)) + return "externalIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo + */ + CloudSQLInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.internalIp != null) + message.internalIp = String(object.internalIp); + if (object.externalIp != null) + message.externalIp = String(object.externalIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSQLInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.internalIp = ""; + object.externalIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.internalIp != null && message.hasOwnProperty("internalIp")) + object.internalIp = message.internalIp; + if (message.externalIp != null && message.hasOwnProperty("externalIp")) + object.externalIp = message.externalIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this CloudSQLInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSQLInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo"; + }; + + return CloudSQLInstanceInfo; + })(); + + v1beta1.RedisInstanceInfo = (function() { + + /** + * Properties of a RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRedisInstanceInfo + * @property {string|null} [displayName] RedisInstanceInfo displayName + * @property {string|null} [uri] RedisInstanceInfo uri + * @property {string|null} [networkUri] RedisInstanceInfo networkUri + * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp + * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp + * @property {string|null} [region] RedisInstanceInfo region + */ + + /** + * Constructs a new RedisInstanceInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RedisInstanceInfo. + * @implements IRedisInstanceInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set + */ + function RedisInstanceInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisInstanceInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.displayName = ""; + + /** + * RedisInstanceInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.uri = ""; + + /** + * RedisInstanceInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.networkUri = ""; + + /** + * RedisInstanceInfo primaryEndpointIp. + * @member {string} primaryEndpointIp + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.primaryEndpointIp = ""; + + /** + * RedisInstanceInfo readEndpointIp. + * @member {string} readEndpointIp + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.readEndpointIp = ""; + + /** + * RedisInstanceInfo region. + * @member {string} region + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + */ + RedisInstanceInfo.prototype.region = ""; + + /** + * Creates a new RedisInstanceInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo instance + */ + RedisInstanceInfo.create = function create(properties) { + return new RedisInstanceInfo(properties); + }; + + /** + * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); + if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + return writer; + }; + + /** + * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.primaryEndpointIp = reader.string(); + break; + } + case 5: { + message.readEndpointIp = reader.string(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisInstanceInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisInstanceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + if (!$util.isString(message.primaryEndpointIp)) + return "primaryEndpointIp: string expected"; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + if (!$util.isString(message.readEndpointIp)) + return "readEndpointIp: string expected"; + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + return null; + }; + + /** + * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo + */ + RedisInstanceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.primaryEndpointIp != null) + message.primaryEndpointIp = String(object.primaryEndpointIp); + if (object.readEndpointIp != null) + message.readEndpointIp = String(object.readEndpointIp); + if (object.region != null) + message.region = String(object.region); + return message; + }; + + /** + * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} message RedisInstanceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisInstanceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.primaryEndpointIp = ""; + object.readEndpointIp = ""; + object.region = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) + object.primaryEndpointIp = message.primaryEndpointIp; + if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) + object.readEndpointIp = message.readEndpointIp; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + return object; + }; + + /** + * Converts this RedisInstanceInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @instance + * @returns {Object.} JSON object + */ + RedisInstanceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisInstanceInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisInstanceInfo"; + }; + + return RedisInstanceInfo; + })(); + + v1beta1.RedisClusterInfo = (function() { + + /** + * Properties of a RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRedisClusterInfo + * @property {string|null} [displayName] RedisClusterInfo displayName + * @property {string|null} [uri] RedisClusterInfo uri + * @property {string|null} [networkUri] RedisClusterInfo networkUri + * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress + * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress + * @property {string|null} [location] RedisClusterInfo location + */ + + /** + * Constructs a new RedisClusterInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RedisClusterInfo. + * @implements IRedisClusterInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set + */ + function RedisClusterInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedisClusterInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.displayName = ""; + + /** + * RedisClusterInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.uri = ""; + + /** + * RedisClusterInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.networkUri = ""; + + /** + * RedisClusterInfo discoveryEndpointIpAddress. + * @member {string} discoveryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; + + /** + * RedisClusterInfo secondaryEndpointIpAddress. + * @member {string} secondaryEndpointIpAddress + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; + + /** + * RedisClusterInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + */ + RedisClusterInfo.prototype.location = ""; + + /** + * Creates a new RedisClusterInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo instance + */ + RedisClusterInfo.create = function create(properties) { + return new RedisClusterInfo(properties); + }; + + /** + * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); + if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); + return writer; + }; + + /** + * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.discoveryEndpointIpAddress = reader.string(); + break; + } + case 5: { + message.secondaryEndpointIpAddress = reader.string(); + break; + } + case 6: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedisClusterInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedisClusterInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + if (!$util.isString(message.discoveryEndpointIpAddress)) + return "discoveryEndpointIpAddress: string expected"; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + if (!$util.isString(message.secondaryEndpointIpAddress)) + return "secondaryEndpointIpAddress: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo + */ + RedisClusterInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.discoveryEndpointIpAddress != null) + message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); + if (object.secondaryEndpointIpAddress != null) + message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} message RedisClusterInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedisClusterInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.networkUri = ""; + object.discoveryEndpointIpAddress = ""; + object.secondaryEndpointIpAddress = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) + object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; + if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) + object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this RedisClusterInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @instance + * @returns {Object.} JSON object + */ + RedisClusterInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedisClusterInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisClusterInfo"; + }; + + return RedisClusterInfo; + })(); + + v1beta1.CloudFunctionInfo = (function() { + + /** + * Properties of a CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICloudFunctionInfo + * @property {string|null} [displayName] CloudFunctionInfo displayName + * @property {string|null} [uri] CloudFunctionInfo uri + * @property {string|null} [location] CloudFunctionInfo location + * @property {number|Long|null} [versionId] CloudFunctionInfo versionId + */ + + /** + * Constructs a new CloudFunctionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CloudFunctionInfo. + * @implements ICloudFunctionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set + */ + function CloudFunctionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudFunctionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.displayName = ""; + + /** + * CloudFunctionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.uri = ""; + + /** + * CloudFunctionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.location = ""; + + /** + * CloudFunctionInfo versionId. + * @member {number|Long} versionId + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + */ + CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CloudFunctionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo instance + */ + CloudFunctionInfo.create = function create(properties) { + return new CloudFunctionInfo(properties); + }; + + /** + * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); + return writer; + }; + + /** + * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + case 4: { + message.versionId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudFunctionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudFunctionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) + return "versionId: integer|Long expected"; + return null; + }; + + /** + * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo + */ + CloudFunctionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.versionId != null) + if ($util.Long) + (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; + else if (typeof object.versionId === "string") + message.versionId = parseInt(object.versionId, 10); + else if (typeof object.versionId === "number") + message.versionId = object.versionId; + else if (typeof object.versionId === "object") + message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} message CloudFunctionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudFunctionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.versionId = options.longs === String ? "0" : 0; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (typeof message.versionId === "number") + object.versionId = options.longs === String ? String(message.versionId) : message.versionId; + else + object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; + return object; + }; + + /** + * Converts this CloudFunctionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudFunctionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudFunctionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudFunctionInfo"; + }; + + return CloudFunctionInfo; + })(); + + v1beta1.CloudRunRevisionInfo = (function() { + + /** + * Properties of a CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICloudRunRevisionInfo + * @property {string|null} [displayName] CloudRunRevisionInfo displayName + * @property {string|null} [uri] CloudRunRevisionInfo uri + * @property {string|null} [location] CloudRunRevisionInfo location + * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri + */ + + /** + * Constructs a new CloudRunRevisionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CloudRunRevisionInfo. + * @implements ICloudRunRevisionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set + */ + function CloudRunRevisionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudRunRevisionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.displayName = ""; + + /** + * CloudRunRevisionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.uri = ""; + + /** + * CloudRunRevisionInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.location = ""; + + /** + * CloudRunRevisionInfo serviceUri. + * @member {string} serviceUri + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + */ + CloudRunRevisionInfo.prototype.serviceUri = ""; + + /** + * Creates a new CloudRunRevisionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo instance + */ + CloudRunRevisionInfo.create = function create(properties) { + return new CloudRunRevisionInfo(properties); + }; + + /** + * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); + if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); + return writer; + }; + + /** + * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } + case 5: { + message.serviceUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudRunRevisionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudRunRevisionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + if (!$util.isString(message.serviceUri)) + return "serviceUri: string expected"; + return null; + }; + + /** + * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo + */ + CloudRunRevisionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + if (object.serviceUri != null) + message.serviceUri = String(object.serviceUri); + return message; + }; + + /** + * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} message CloudRunRevisionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudRunRevisionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + object.serviceUri = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) + object.serviceUri = message.serviceUri; + return object; + }; + + /** + * Converts this CloudRunRevisionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @instance + * @returns {Object.} JSON object + */ + CloudRunRevisionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudRunRevisionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo"; + }; + + return CloudRunRevisionInfo; + })(); + + v1beta1.AppEngineVersionInfo = (function() { + + /** + * Properties of an AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IAppEngineVersionInfo + * @property {string|null} [displayName] AppEngineVersionInfo displayName + * @property {string|null} [uri] AppEngineVersionInfo uri + * @property {string|null} [runtime] AppEngineVersionInfo runtime + * @property {string|null} [environment] AppEngineVersionInfo environment + */ + + /** + * Constructs a new AppEngineVersionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an AppEngineVersionInfo. + * @implements IAppEngineVersionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set + */ + function AppEngineVersionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AppEngineVersionInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.displayName = ""; + + /** + * AppEngineVersionInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.uri = ""; + + /** + * AppEngineVersionInfo runtime. + * @member {string} runtime + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.runtime = ""; + + /** + * AppEngineVersionInfo environment. + * @member {string} environment + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + */ + AppEngineVersionInfo.prototype.environment = ""; + + /** + * Creates a new AppEngineVersionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo instance + */ + AppEngineVersionInfo.create = function create(properties) { + return new AppEngineVersionInfo(properties); + }; + + /** + * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); + return writer; + }; + + /** + * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.runtime = reader.string(); + break; + } + case 4: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AppEngineVersionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AppEngineVersionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.runtime != null && message.hasOwnProperty("runtime")) + if (!$util.isString(message.runtime)) + return "runtime: string expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo + */ + AppEngineVersionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.runtime != null) + message.runtime = String(object.runtime); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} message AppEngineVersionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AppEngineVersionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.runtime = ""; + object.environment = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.runtime != null && message.hasOwnProperty("runtime")) + object.runtime = message.runtime; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this AppEngineVersionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @instance + * @returns {Object.} JSON object + */ + AppEngineVersionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AppEngineVersionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo"; + }; + + return AppEngineVersionInfo; + })(); + + v1beta1.VpcConnectorInfo = (function() { + + /** + * Properties of a VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpcConnectorInfo + * @property {string|null} [displayName] VpcConnectorInfo displayName + * @property {string|null} [uri] VpcConnectorInfo uri + * @property {string|null} [location] VpcConnectorInfo location + */ + + /** + * Constructs a new VpcConnectorInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpcConnectorInfo. + * @implements IVpcConnectorInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set + */ + function VpcConnectorInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VpcConnectorInfo displayName. + * @member {string} displayName + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.displayName = ""; + + /** + * VpcConnectorInfo uri. + * @member {string} uri + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.uri = ""; + + /** + * VpcConnectorInfo location. + * @member {string} location + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + */ + VpcConnectorInfo.prototype.location = ""; + + /** + * Creates a new VpcConnectorInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo instance + */ + VpcConnectorInfo.create = function create(properties) { + return new VpcConnectorInfo(properties); + }; + + /** + * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); + return writer; + }; + + /** + * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.uri = reader.string(); + break; + } + case 3: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcConnectorInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcConnectorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo + */ + VpcConnectorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uri != null) + message.uri = String(object.uri); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} message VpcConnectorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcConnectorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.uri = ""; + object.location = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this VpcConnectorInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @instance + * @returns {Object.} JSON object + */ + VpcConnectorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcConnectorInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcConnectorInfo"; + }; + + return VpcConnectorInfo; + })(); + + v1beta1.NatInfo = (function() { + + /** + * Properties of a NatInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface INatInfo + * @property {google.cloud.networkmanagement.v1beta1.NatInfo.Type|null} [type] NatInfo type + * @property {string|null} [protocol] NatInfo protocol + * @property {string|null} [networkUri] NatInfo networkUri + * @property {string|null} [oldSourceIp] NatInfo oldSourceIp + * @property {string|null} [newSourceIp] NatInfo newSourceIp + * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp + * @property {string|null} [newDestinationIp] NatInfo newDestinationIp + * @property {number|null} [oldSourcePort] NatInfo oldSourcePort + * @property {number|null} [newSourcePort] NatInfo newSourcePort + * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort + * @property {number|null} [newDestinationPort] NatInfo newDestinationPort + * @property {string|null} [routerUri] NatInfo routerUri + * @property {string|null} [natGatewayName] NatInfo natGatewayName + */ + + /** + * Constructs a new NatInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a NatInfo. + * @implements INatInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set + */ + function NatInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NatInfo type. + * @member {google.cloud.networkmanagement.v1beta1.NatInfo.Type} type + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.type = 0; + + /** + * NatInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.protocol = ""; + + /** + * NatInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.networkUri = ""; + + /** + * NatInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourceIp = ""; + + /** + * NatInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newSourceIp = ""; + + /** + * NatInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationIp = ""; + + /** + * NatInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationIp = ""; + + /** + * NatInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldSourcePort = 0; + + /** + * NatInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newSourcePort = 0; + + /** + * NatInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.oldDestinationPort = 0; + + /** + * NatInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.newDestinationPort = 0; + + /** + * NatInfo routerUri. + * @member {string} routerUri + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.routerUri = ""; + + /** + * NatInfo natGatewayName. + * @member {string} natGatewayName + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + */ + NatInfo.prototype.natGatewayName = ""; + + /** + * Creates a new NatInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo instance + */ + NatInfo.create = function create(properties) { + return new NatInfo(properties); + }; + + /** + * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); + if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); + if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); + return writer; + }; + + /** + * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NatInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.protocol = reader.string(); + break; + } + case 3: { + message.networkUri = reader.string(); + break; + } + case 4: { + message.oldSourceIp = reader.string(); + break; + } + case 5: { + message.newSourceIp = reader.string(); + break; + } + case 6: { + message.oldDestinationIp = reader.string(); + break; + } + case 7: { + message.newDestinationIp = reader.string(); + break; + } + case 8: { + message.oldSourcePort = reader.int32(); + break; + } + case 9: { + message.newSourcePort = reader.int32(); + break; + } + case 10: { + message.oldDestinationPort = reader.int32(); + break; + } + case 11: { + message.newDestinationPort = reader.int32(); + break; + } + case 12: { + message.routerUri = reader.string(); + break; + } + case 13: { + message.natGatewayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NatInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NatInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NatInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NatInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + if (!$util.isString(message.routerUri)) + return "routerUri: string expected"; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + if (!$util.isString(message.natGatewayName)) + return "natGatewayName: string expected"; + return null; + }; + + /** + * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo + */ + NatInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NatInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INTERNAL_TO_EXTERNAL": + case 1: + message.type = 1; + break; + case "EXTERNAL_TO_INTERNAL": + case 2: + message.type = 2; + break; + case "CLOUD_NAT": + case 3: + message.type = 3; + break; + case "PRIVATE_SERVICE_CONNECT": + case 4: + message.type = 4; + break; + } + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.routerUri != null) + message.routerUri = String(object.routerUri); + if (object.natGatewayName != null) + message.natGatewayName = String(object.natGatewayName); + return message; + }; + + /** + * Creates a plain object from a NatInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.NatInfo} message NatInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NatInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.protocol = ""; + object.networkUri = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.routerUri = ""; + object.natGatewayName = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] : message.type; + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.routerUri != null && message.hasOwnProperty("routerUri")) + object.routerUri = message.routerUri; + if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) + object.natGatewayName = message.natGatewayName; + return object; + }; + + /** + * Converts this NatInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @instance + * @returns {Object.} JSON object + */ + NatInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NatInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.NatInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NatInfo"; + }; + + /** + * Type enum. + * @name google.cloud.networkmanagement.v1beta1.NatInfo.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value + * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value + * @property {number} CLOUD_NAT=3 CLOUD_NAT value + * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value + */ + NatInfo.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; + values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; + values[valuesById[3] = "CLOUD_NAT"] = 3; + values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; + return values; + })(); + + return NatInfo; + })(); + + v1beta1.ProxyConnectionInfo = (function() { + + /** + * Properties of a ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IProxyConnectionInfo + * @property {string|null} [protocol] ProxyConnectionInfo protocol + * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp + * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp + * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp + * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp + * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort + * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort + * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort + * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort + * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri + * @property {string|null} [networkUri] ProxyConnectionInfo networkUri + */ + + /** + * Constructs a new ProxyConnectionInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ProxyConnectionInfo. + * @implements IProxyConnectionInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set + */ + function ProxyConnectionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProxyConnectionInfo protocol. + * @member {string} protocol + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.protocol = ""; + + /** + * ProxyConnectionInfo oldSourceIp. + * @member {string} oldSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourceIp = ""; + + /** + * ProxyConnectionInfo newSourceIp. + * @member {string} newSourceIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourceIp = ""; + + /** + * ProxyConnectionInfo oldDestinationIp. + * @member {string} oldDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationIp = ""; + + /** + * ProxyConnectionInfo newDestinationIp. + * @member {string} newDestinationIp + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationIp = ""; + + /** + * ProxyConnectionInfo oldSourcePort. + * @member {number} oldSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldSourcePort = 0; + + /** + * ProxyConnectionInfo newSourcePort. + * @member {number} newSourcePort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newSourcePort = 0; + + /** + * ProxyConnectionInfo oldDestinationPort. + * @member {number} oldDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.oldDestinationPort = 0; + + /** + * ProxyConnectionInfo newDestinationPort. + * @member {number} newDestinationPort + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.newDestinationPort = 0; + + /** + * ProxyConnectionInfo subnetUri. + * @member {string} subnetUri + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.subnetUri = ""; + + /** + * ProxyConnectionInfo networkUri. + * @member {string} networkUri + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + */ + ProxyConnectionInfo.prototype.networkUri = ""; + + /** + * Creates a new ProxyConnectionInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo instance + */ + ProxyConnectionInfo.create = function create(properties) { + return new ProxyConnectionInfo(properties); + }; + + /** + * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); + if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); + if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); + if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); + if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); + if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); + if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); + if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); + if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); + if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); + if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); + return writer; + }; + + /** + * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.protocol = reader.string(); + break; + } + case 2: { + message.oldSourceIp = reader.string(); + break; + } + case 3: { + message.newSourceIp = reader.string(); + break; + } + case 4: { + message.oldDestinationIp = reader.string(); + break; + } + case 5: { + message.newDestinationIp = reader.string(); + break; + } + case 6: { + message.oldSourcePort = reader.int32(); + break; + } + case 7: { + message.newSourcePort = reader.int32(); + break; + } + case 8: { + message.oldDestinationPort = reader.int32(); + break; + } + case 9: { + message.newDestinationPort = reader.int32(); + break; + } + case 10: { + message.subnetUri = reader.string(); + break; + } + case 11: { + message.networkUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProxyConnectionInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProxyConnectionInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.protocol != null && message.hasOwnProperty("protocol")) + if (!$util.isString(message.protocol)) + return "protocol: string expected"; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + if (!$util.isString(message.oldSourceIp)) + return "oldSourceIp: string expected"; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + if (!$util.isString(message.newSourceIp)) + return "newSourceIp: string expected"; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + if (!$util.isString(message.oldDestinationIp)) + return "oldDestinationIp: string expected"; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + if (!$util.isString(message.newDestinationIp)) + return "newDestinationIp: string expected"; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + if (!$util.isInteger(message.oldSourcePort)) + return "oldSourcePort: integer expected"; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + if (!$util.isInteger(message.newSourcePort)) + return "newSourcePort: integer expected"; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + if (!$util.isInteger(message.oldDestinationPort)) + return "oldDestinationPort: integer expected"; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + if (!$util.isInteger(message.newDestinationPort)) + return "newDestinationPort: integer expected"; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + if (!$util.isString(message.subnetUri)) + return "subnetUri: string expected"; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + if (!$util.isString(message.networkUri)) + return "networkUri: string expected"; + return null; + }; + + /** + * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo + */ + ProxyConnectionInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); + if (object.protocol != null) + message.protocol = String(object.protocol); + if (object.oldSourceIp != null) + message.oldSourceIp = String(object.oldSourceIp); + if (object.newSourceIp != null) + message.newSourceIp = String(object.newSourceIp); + if (object.oldDestinationIp != null) + message.oldDestinationIp = String(object.oldDestinationIp); + if (object.newDestinationIp != null) + message.newDestinationIp = String(object.newDestinationIp); + if (object.oldSourcePort != null) + message.oldSourcePort = object.oldSourcePort | 0; + if (object.newSourcePort != null) + message.newSourcePort = object.newSourcePort | 0; + if (object.oldDestinationPort != null) + message.oldDestinationPort = object.oldDestinationPort | 0; + if (object.newDestinationPort != null) + message.newDestinationPort = object.newDestinationPort | 0; + if (object.subnetUri != null) + message.subnetUri = String(object.subnetUri); + if (object.networkUri != null) + message.networkUri = String(object.networkUri); + return message; + }; + + /** + * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} message ProxyConnectionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProxyConnectionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.protocol = ""; + object.oldSourceIp = ""; + object.newSourceIp = ""; + object.oldDestinationIp = ""; + object.newDestinationIp = ""; + object.oldSourcePort = 0; + object.newSourcePort = 0; + object.oldDestinationPort = 0; + object.newDestinationPort = 0; + object.subnetUri = ""; + object.networkUri = ""; + } + if (message.protocol != null && message.hasOwnProperty("protocol")) + object.protocol = message.protocol; + if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) + object.oldSourceIp = message.oldSourceIp; + if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) + object.newSourceIp = message.newSourceIp; + if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) + object.oldDestinationIp = message.oldDestinationIp; + if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) + object.newDestinationIp = message.newDestinationIp; + if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) + object.oldSourcePort = message.oldSourcePort; + if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) + object.newSourcePort = message.newSourcePort; + if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) + object.oldDestinationPort = message.oldDestinationPort; + if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) + object.newDestinationPort = message.newDestinationPort; + if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) + object.subnetUri = message.subnetUri; + if (message.networkUri != null && message.hasOwnProperty("networkUri")) + object.networkUri = message.networkUri; + return object; + }; + + /** + * Converts this ProxyConnectionInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @instance + * @returns {Object.} JSON object + */ + ProxyConnectionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProxyConnectionInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo"; + }; + + return ProxyConnectionInfo; + })(); + + v1beta1.LoadBalancerBackendInfo = (function() { + + /** + * Properties of a LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ILoadBalancerBackendInfo + * @property {string|null} [name] LoadBalancerBackendInfo name + * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri + * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri + * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri + * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri + * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri + * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri + * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget + * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri + * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState + */ + + /** + * Constructs a new LoadBalancerBackendInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a LoadBalancerBackendInfo. + * @implements ILoadBalancerBackendInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set + */ + function LoadBalancerBackendInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadBalancerBackendInfo name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.name = ""; + + /** + * LoadBalancerBackendInfo instanceUri. + * @member {string} instanceUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceUri = ""; + + /** + * LoadBalancerBackendInfo backendServiceUri. + * @member {string} backendServiceUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendServiceUri = ""; + + /** + * LoadBalancerBackendInfo instanceGroupUri. + * @member {string} instanceGroupUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; + + /** + * LoadBalancerBackendInfo networkEndpointGroupUri. + * @member {string} networkEndpointGroupUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; + + /** + * LoadBalancerBackendInfo backendBucketUri. + * @member {string} backendBucketUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.backendBucketUri = ""; + + /** + * LoadBalancerBackendInfo pscServiceAttachmentUri. + * @member {string} pscServiceAttachmentUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; + + /** + * LoadBalancerBackendInfo pscGoogleApiTarget. + * @member {string} pscGoogleApiTarget + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; + + /** + * LoadBalancerBackendInfo healthCheckUri. + * @member {string} healthCheckUri + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckUri = ""; + + /** + * LoadBalancerBackendInfo healthCheckFirewallsConfigState. + * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + */ + LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; + + /** + * Creates a new LoadBalancerBackendInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance + */ + LoadBalancerBackendInfo.create = function create(properties) { + return new LoadBalancerBackendInfo(properties); + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); + if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); + if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); + if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); + if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); + if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); + if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); + if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); + if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); + return writer; + }; + + /** + * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.instanceUri = reader.string(); + break; + } + case 3: { + message.backendServiceUri = reader.string(); + break; + } + case 4: { + message.instanceGroupUri = reader.string(); + break; + } + case 5: { + message.networkEndpointGroupUri = reader.string(); + break; + } + case 8: { + message.backendBucketUri = reader.string(); + break; + } + case 9: { + message.pscServiceAttachmentUri = reader.string(); + break; + } + case 10: { + message.pscGoogleApiTarget = reader.string(); + break; + } + case 6: { + message.healthCheckUri = reader.string(); + break; + } + case 7: { + message.healthCheckFirewallsConfigState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadBalancerBackendInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadBalancerBackendInfo.verify = function verify(message) { + if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) + if (!$util.isString(message.instanceUri)) + return "instanceUri: string expected"; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + if (!$util.isString(message.backendServiceUri)) + return "backendServiceUri: string expected"; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + if (!$util.isString(message.instanceGroupUri)) + return "instanceGroupUri: string expected"; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + if (!$util.isString(message.networkEndpointGroupUri)) + return "networkEndpointGroupUri: string expected"; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + if (!$util.isString(message.backendBucketUri)) + return "backendBucketUri: string expected"; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + if (!$util.isString(message.pscServiceAttachmentUri)) + return "pscServiceAttachmentUri: string expected"; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + if (!$util.isString(message.pscGoogleApiTarget)) + return "pscGoogleApiTarget: string expected"; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + if (!$util.isString(message.healthCheckUri)) + return "healthCheckUri: string expected"; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + switch (message.healthCheckFirewallsConfigState) { + default: + return "healthCheckFirewallsConfigState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo + */ + LoadBalancerBackendInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); + if (object.name != null) + message.name = String(object.name); + if (object.instanceUri != null) + message.instanceUri = String(object.instanceUri); + if (object.backendServiceUri != null) + message.backendServiceUri = String(object.backendServiceUri); + if (object.instanceGroupUri != null) + message.instanceGroupUri = String(object.instanceGroupUri); + if (object.networkEndpointGroupUri != null) + message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); + if (object.backendBucketUri != null) + message.backendBucketUri = String(object.backendBucketUri); + if (object.pscServiceAttachmentUri != null) + message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); + if (object.pscGoogleApiTarget != null) + message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); + if (object.healthCheckUri != null) + message.healthCheckUri = String(object.healthCheckUri); + switch (object.healthCheckFirewallsConfigState) { + default: + if (typeof object.healthCheckFirewallsConfigState === "number") { + message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; + break; + } + break; + case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": + case 0: + message.healthCheckFirewallsConfigState = 0; + break; + case "FIREWALLS_CONFIGURED": + case 1: + message.healthCheckFirewallsConfigState = 1; + break; + case "FIREWALLS_PARTIALLY_CONFIGURED": + case 2: + message.healthCheckFirewallsConfigState = 2; + break; + case "FIREWALLS_NOT_CONFIGURED": + case 3: + message.healthCheckFirewallsConfigState = 3; + break; + case "FIREWALLS_UNSUPPORTED": + case 4: + message.healthCheckFirewallsConfigState = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadBalancerBackendInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.instanceUri = ""; + object.backendServiceUri = ""; + object.instanceGroupUri = ""; + object.networkEndpointGroupUri = ""; + object.healthCheckUri = ""; + object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; + object.backendBucketUri = ""; + object.pscServiceAttachmentUri = ""; + object.pscGoogleApiTarget = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) + object.instanceUri = message.instanceUri; + if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) + object.backendServiceUri = message.backendServiceUri; + if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) + object.instanceGroupUri = message.instanceGroupUri; + if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) + object.networkEndpointGroupUri = message.networkEndpointGroupUri; + if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) + object.healthCheckUri = message.healthCheckUri; + if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) + object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; + if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) + object.backendBucketUri = message.backendBucketUri; + if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) + object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; + if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) + object.pscGoogleApiTarget = message.pscGoogleApiTarget; + return object; + }; + + /** + * Converts this LoadBalancerBackendInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @instance + * @returns {Object.} JSON object + */ + LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadBalancerBackendInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo"; + }; + + /** + * HealthCheckFirewallsConfigState enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState + * @enum {number} + * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value + * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value + * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value + * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value + * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value + */ + LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; + values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; + values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; + values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; + return values; + })(); + + return LoadBalancerBackendInfo; + })(); + + /** + * LoadBalancerType enum. + * @name google.cloud.networkmanagement.v1beta1.LoadBalancerType + * @enum {number} + * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value + * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value + * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value + * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value + * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value + * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value + * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value + * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value + * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value + * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value + * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value + */ + v1beta1.LoadBalancerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; + values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; + values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; + values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; + values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; + values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; + values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; + values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; + values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; + values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; + return values; + })(); + + v1beta1.StorageBucketInfo = (function() { + + /** + * Properties of a StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IStorageBucketInfo + * @property {string|null} [bucket] StorageBucketInfo bucket + */ + + /** + * Constructs a new StorageBucketInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a StorageBucketInfo. + * @implements IStorageBucketInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set + */ + function StorageBucketInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageBucketInfo bucket. + * @member {string} bucket + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @instance + */ + StorageBucketInfo.prototype.bucket = ""; + + /** + * Creates a new StorageBucketInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo instance + */ + StorageBucketInfo.create = function create(properties) { + return new StorageBucketInfo(properties); + }; + + /** + * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageBucketInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageBucketInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo + */ + StorageBucketInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} message StorageBucketInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageBucketInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this StorageBucketInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @instance + * @returns {Object.} JSON object + */ + StorageBucketInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageBucketInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.StorageBucketInfo"; + }; + + return StorageBucketInfo; + })(); + + v1beta1.ServerlessNegInfo = (function() { + + /** + * Properties of a ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IServerlessNegInfo + * @property {string|null} [negUri] ServerlessNegInfo negUri + */ + + /** + * Constructs a new ServerlessNegInfo. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ServerlessNegInfo. + * @implements IServerlessNegInfo + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set + */ + function ServerlessNegInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerlessNegInfo negUri. + * @member {string} negUri + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @instance + */ + ServerlessNegInfo.prototype.negUri = ""; + + /** + * Creates a new ServerlessNegInfo instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo instance + */ + ServerlessNegInfo.create = function create(properties) { + return new ServerlessNegInfo(properties); + }; + + /** + * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); + return writer; + }; + + /** + * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.negUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerlessNegInfo message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerlessNegInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.negUri != null && message.hasOwnProperty("negUri")) + if (!$util.isString(message.negUri)) + return "negUri: string expected"; + return null; + }; + + /** + * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo + */ + ServerlessNegInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); + if (object.negUri != null) + message.negUri = String(object.negUri); + return message; + }; + + /** + * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} message ServerlessNegInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerlessNegInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.negUri = ""; + if (message.negUri != null && message.hasOwnProperty("negUri")) + object.negUri = message.negUri; + return object; + }; + + /** + * Converts this ServerlessNegInfo to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @instance + * @returns {Object.} JSON object + */ + ServerlessNegInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerlessNegInfo + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ServerlessNegInfo"; + }; + + return ServerlessNegInfo; + })(); + + v1beta1.ReachabilityService = (function() { + + /** + * Constructs a new ReachabilityService service. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ReachabilityService + * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; + + /** + * Creates new ReachabilityService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. + */ + ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef ListConnectivityTestsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse + */ + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { + return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, request, callback); + }, "name", { value: "ListConnectivityTests" }); + + /** + * Calls ListConnectivityTests. + * @function listConnectivityTests + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef GetConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} [response] ConnectivityTest + */ + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { + return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest, request, callback); + }, "name", { value: "GetConnectivityTest" }); + + /** + * Calls GetConnectivityTest. + * @function getConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef CreateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { + return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConnectivityTest" }); + + /** + * Calls CreateConnectivityTest. + * @function createConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef UpdateConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { + return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConnectivityTest" }); + + /** + * Calls UpdateConnectivityTest. + * @function updateConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef RerunConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { + return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RerunConnectivityTest" }); + + /** + * Calls RerunConnectivityTest. + * @function rerunConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @typedef DeleteConnectivityTestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { + return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConnectivityTest" }); + + /** + * Calls DeleteConnectivityTest. + * @function deleteConnectivityTest + * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ReachabilityService; + })(); + + v1beta1.ListConnectivityTestsRequest = (function() { + + /** + * Properties of a ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListConnectivityTestsRequest + * @property {string|null} [parent] ListConnectivityTestsRequest parent + * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize + * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken + * @property {string|null} [filter] ListConnectivityTestsRequest filter + * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy + */ + + /** + * Constructs a new ListConnectivityTestsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListConnectivityTestsRequest. + * @implements IListConnectivityTestsRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set + */ + function ListConnectivityTestsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectivityTestsRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.parent = ""; + + /** + * ListConnectivityTestsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageSize = 0; + + /** + * ListConnectivityTestsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.pageToken = ""; + + /** + * ListConnectivityTestsRequest filter. + * @member {string} filter + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.filter = ""; + + /** + * ListConnectivityTestsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + */ + ListConnectivityTestsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConnectivityTestsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance + */ + ListConnectivityTestsRequest.create = function create(properties) { + return new ListConnectivityTestsRequest(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest + */ + ListConnectivityTestsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); + 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest"; + }; + + return ListConnectivityTestsRequest; + })(); + + v1beta1.ListConnectivityTestsResponse = (function() { + + /** + * Properties of a ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListConnectivityTestsResponse + * @property {Array.|null} [resources] ListConnectivityTestsResponse resources + * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken + * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable + */ + + /** + * Constructs a new ListConnectivityTestsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListConnectivityTestsResponse. + * @implements IListConnectivityTestsResponse + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set + */ + function ListConnectivityTestsResponse(properties) { + this.resources = []; + 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]]; + } + + /** + * ListConnectivityTestsResponse resources. + * @member {Array.} resources + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; + + /** + * ListConnectivityTestsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.nextPageToken = ""; + + /** + * ListConnectivityTestsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + */ + ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConnectivityTestsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance + */ + ListConnectivityTestsResponse.create = function create(properties) { + return new ListConnectivityTestsResponse(properties); + }; + + /** + * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectivityTestsResponse message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectivityTestsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resources[i]); + if (error) + return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse + */ + ListConnectivityTestsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectivityTestsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectivityTestsResponse + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse"; + }; + + return ListConnectivityTestsResponse; + })(); + + v1beta1.GetConnectivityTestRequest = (function() { + + /** + * Properties of a GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGetConnectivityTestRequest + * @property {string|null} [name] GetConnectivityTestRequest name + */ + + /** + * Constructs a new GetConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GetConnectivityTestRequest. + * @implements IGetConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set + */ + function GetConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @instance + */ + GetConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new GetConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest instance + */ + GetConnectivityTestRequest.create = function create(properties) { + return new GetConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encode = function encode(message, writer) { + 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); + 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectivityTestRequest.verify = function verify(message) { + if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest + */ + GetConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} message GetConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest"; + }; + + return GetConnectivityTestRequest; + })(); + + v1beta1.CreateConnectivityTestRequest = (function() { + + /** + * Properties of a CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICreateConnectivityTestRequest + * @property {string|null} [parent] CreateConnectivityTestRequest parent + * @property {string|null} [testId] CreateConnectivityTestRequest testId + * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource + */ + + /** + * Constructs a new CreateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CreateConnectivityTestRequest. + * @implements ICreateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set + */ + function CreateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectivityTestRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.parent = ""; + + /** + * CreateConnectivityTestRequest testId. + * @member {string} testId + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.testId = ""; + + /** + * CreateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + */ + CreateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new CreateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance + */ + CreateConnectivityTestRequest.create = function create(properties) { + return new CreateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.testId = reader.string(); + break; + } + case 3: { + message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) + if (!$util.isString(message.testId)) + return "testId: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest + */ + CreateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.testId != null) + message.testId = String(object.testId); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.testId = ""; + object.resource = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.testId != null && message.hasOwnProperty("testId")) + object.testId = message.testId; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this CreateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest"; + }; + + return CreateConnectivityTestRequest; + })(); + + v1beta1.UpdateConnectivityTestRequest = (function() { + + /** + * Properties of an UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IUpdateConnectivityTestRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask + * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource + */ + + /** + * Constructs a new UpdateConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an UpdateConnectivityTestRequest. + * @implements IUpdateConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set + */ + function UpdateConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectivityTestRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.updateMask = null; + + /** + * UpdateConnectivityTestRequest resource. + * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @instance + */ + UpdateConnectivityTestRequest.prototype.resource = null; + + /** + * Creates a new UpdateConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance + */ + UpdateConnectivityTestRequest.create = function create(properties) { + return new UpdateConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); + 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.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); + if (error) + return "resource." + error; + } + return null; + }; + + /** + * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest + */ + UpdateConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.resource: object expected"); + message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectivityTestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.resource = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); + return object; + }; + + /** + * Converts this UpdateConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest"; + }; + + return UpdateConnectivityTestRequest; + })(); + + v1beta1.DeleteConnectivityTestRequest = (function() { + + /** + * Properties of a DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDeleteConnectivityTestRequest + * @property {string|null} [name] DeleteConnectivityTestRequest name + */ + + /** + * Constructs a new DeleteConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DeleteConnectivityTestRequest. + * @implements IDeleteConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set + */ + function DeleteConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @instance + */ + DeleteConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new DeleteConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance + */ + DeleteConnectivityTestRequest.create = function create(properties) { + return new DeleteConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encode = function encode(message, writer) { + 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); + 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectivityTestRequest.verify = function verify(message) { + if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest + */ + DeleteConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest"; + }; + + return DeleteConnectivityTestRequest; + })(); + + v1beta1.RerunConnectivityTestRequest = (function() { + + /** + * Properties of a RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IRerunConnectivityTestRequest + * @property {string|null} [name] RerunConnectivityTestRequest name + */ + + /** + * Constructs a new RerunConnectivityTestRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a RerunConnectivityTestRequest. + * @implements IRerunConnectivityTestRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set + */ + function RerunConnectivityTestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RerunConnectivityTestRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @instance + */ + RerunConnectivityTestRequest.prototype.name = ""; + + /** + * Creates a new RerunConnectivityTestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance + */ + RerunConnectivityTestRequest.create = function create(properties) { + return new RerunConnectivityTestRequest(properties); + }; + + /** + * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encode = function encode(message, writer) { + 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); + 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RerunConnectivityTestRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RerunConnectivityTestRequest.verify = function verify(message) { + if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest + */ + RerunConnectivityTestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @instance + * @returns {Object.} JSON object + */ + RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RerunConnectivityTestRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest"; + }; + + return RerunConnectivityTestRequest; + })(); + + v1beta1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.networkmanagement.v1beta1 + * @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} [statusDetail] OperationMetadata statusDetail + * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusDetail. + * @member {string} statusDetail + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusDetail = ""; + + /** + * OperationMetadata cancelRequested. + * @member {boolean} cancelRequested + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.cancelRequested = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); + if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusDetail = reader.string(); + break; + } + case 6: { + message.cancelRequested = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + 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.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + if (typeof message.cancelRequested !== "boolean") + return "cancelRequested: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: 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.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.OperationMetadata) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.cancelRequested != null) + message.cancelRequested = Boolean(object.cancelRequested); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networkmanagement.v1beta1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusDetail = ""; + object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + object.cancelRequested = message.cancelRequested; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1beta1.VpcFlowLogsService = (function() { + + /** + * Constructs a new VpcFlowLogsService service. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpcFlowLogsService + * @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 VpcFlowLogsService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (VpcFlowLogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VpcFlowLogsService; + + /** + * Creates new VpcFlowLogsService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @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 {VpcFlowLogsService} RPC service. Useful where requests and/or responses are streamed. + */ + VpcFlowLogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef ListVpcFlowLogsConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} [response] ListVpcFlowLogsConfigsResponse + */ + + /** + * Calls ListVpcFlowLogsConfigs. + * @function listVpcFlowLogsConfigs + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback} callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.listVpcFlowLogsConfigs = function listVpcFlowLogsConfigs(request, callback) { + return this.rpcCall(listVpcFlowLogsConfigs, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, request, callback); + }, "name", { value: "ListVpcFlowLogsConfigs" }); + + /** + * Calls ListVpcFlowLogsConfigs. + * @function listVpcFlowLogsConfigs + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef GetVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} [response] VpcFlowLogsConfig + */ + + /** + * Calls GetVpcFlowLogsConfig. + * @function getVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and VpcFlowLogsConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.getVpcFlowLogsConfig = function getVpcFlowLogsConfig(request, callback) { + return this.rpcCall(getVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, request, callback); + }, "name", { value: "GetVpcFlowLogsConfig" }); + + /** + * Calls GetVpcFlowLogsConfig. + * @function getVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef CreateVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateVpcFlowLogsConfig. + * @function createVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.createVpcFlowLogsConfig = function createVpcFlowLogsConfig(request, callback) { + return this.rpcCall(createVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateVpcFlowLogsConfig" }); + + /** + * Calls CreateVpcFlowLogsConfig. + * @function createVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef UpdateVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateVpcFlowLogsConfig. + * @function updateVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.updateVpcFlowLogsConfig = function updateVpcFlowLogsConfig(request, callback) { + return this.rpcCall(updateVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateVpcFlowLogsConfig" }); + + /** + * Calls UpdateVpcFlowLogsConfig. + * @function updateVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @typedef DeleteVpcFlowLogsConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteVpcFlowLogsConfig. + * @function deleteVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(VpcFlowLogsService.prototype.deleteVpcFlowLogsConfig = function deleteVpcFlowLogsConfig(request, callback) { + return this.rpcCall(deleteVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteVpcFlowLogsConfig" }); + + /** + * Calls DeleteVpcFlowLogsConfig. + * @function deleteVpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService + * @instance + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return VpcFlowLogsService; + })(); + + v1beta1.ListVpcFlowLogsConfigsRequest = (function() { + + /** + * Properties of a ListVpcFlowLogsConfigsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListVpcFlowLogsConfigsRequest + * @property {string|null} [parent] ListVpcFlowLogsConfigsRequest parent + * @property {number|null} [pageSize] ListVpcFlowLogsConfigsRequest pageSize + * @property {string|null} [pageToken] ListVpcFlowLogsConfigsRequest pageToken + * @property {string|null} [filter] ListVpcFlowLogsConfigsRequest filter + * @property {string|null} [orderBy] ListVpcFlowLogsConfigsRequest orderBy + */ + + /** + * Constructs a new ListVpcFlowLogsConfigsRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListVpcFlowLogsConfigsRequest. + * @implements IListVpcFlowLogsConfigsRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set + */ + function ListVpcFlowLogsConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVpcFlowLogsConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.parent = ""; + + /** + * ListVpcFlowLogsConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.pageSize = 0; + + /** + * ListVpcFlowLogsConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.pageToken = ""; + + /** + * ListVpcFlowLogsConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.filter = ""; + + /** + * ListVpcFlowLogsConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + */ + ListVpcFlowLogsConfigsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest instance + */ + ListVpcFlowLogsConfigsRequest.create = function create(properties) { + return new ListVpcFlowLogsConfigsRequest(properties); + }; + + /** + * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); + 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 ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVpcFlowLogsConfigsRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest + */ + ListVpcFlowLogsConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); + 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 ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVpcFlowLogsConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVpcFlowLogsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest"; + }; + + return ListVpcFlowLogsConfigsRequest; + })(); + + v1beta1.ListVpcFlowLogsConfigsResponse = (function() { + + /** + * Properties of a ListVpcFlowLogsConfigsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IListVpcFlowLogsConfigsResponse + * @property {Array.|null} [vpcFlowLogsConfigs] ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs + * @property {string|null} [nextPageToken] ListVpcFlowLogsConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListVpcFlowLogsConfigsResponse unreachable + */ + + /** + * Constructs a new ListVpcFlowLogsConfigsResponse. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a ListVpcFlowLogsConfigsResponse. + * @implements IListVpcFlowLogsConfigsResponse + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set + */ + function ListVpcFlowLogsConfigsResponse(properties) { + this.vpcFlowLogsConfigs = []; + 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]]; + } + + /** + * ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. + * @member {Array.} vpcFlowLogsConfigs + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + */ + ListVpcFlowLogsConfigsResponse.prototype.vpcFlowLogsConfigs = $util.emptyArray; + + /** + * ListVpcFlowLogsConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + */ + ListVpcFlowLogsConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListVpcFlowLogsConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + */ + ListVpcFlowLogsConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse instance + */ + ListVpcFlowLogsConfigsResponse.create = function create(properties) { + return new ListVpcFlowLogsConfigsResponse(properties); + }; + + /** + * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vpcFlowLogsConfigs != null && message.vpcFlowLogsConfigs.length) + for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) + $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVpcFlowLogsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length)) + message.vpcFlowLogsConfigs = []; + message.vpcFlowLogsConfigs.push($root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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 ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVpcFlowLogsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVpcFlowLogsConfigsResponse message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVpcFlowLogsConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.vpcFlowLogsConfigs != null && message.hasOwnProperty("vpcFlowLogsConfigs")) { + if (!Array.isArray(message.vpcFlowLogsConfigs)) + return "vpcFlowLogsConfigs: array expected"; + for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfigs[i]); + if (error) + return "vpcFlowLogsConfigs." + 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 ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse + */ + ListVpcFlowLogsConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); + if (object.vpcFlowLogsConfigs) { + if (!Array.isArray(object.vpcFlowLogsConfigs)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: array expected"); + message.vpcFlowLogsConfigs = []; + for (var i = 0; i < object.vpcFlowLogsConfigs.length; ++i) { + if (typeof object.vpcFlowLogsConfigs[i] !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: object expected"); + message.vpcFlowLogsConfigs[i] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.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 ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVpcFlowLogsConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.vpcFlowLogsConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length) { + object.vpcFlowLogsConfigs = []; + for (var j = 0; j < message.vpcFlowLogsConfigs.length; ++j) + object.vpcFlowLogsConfigs[j] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListVpcFlowLogsConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVpcFlowLogsConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVpcFlowLogsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse"; + }; + + return ListVpcFlowLogsConfigsResponse; + })(); + + v1beta1.GetVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of a GetVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IGetVpcFlowLogsConfigRequest + * @property {string|null} [name] GetVpcFlowLogsConfigRequest name + */ + + /** + * Constructs a new GetVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a GetVpcFlowLogsConfigRequest. + * @implements IGetVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function GetVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVpcFlowLogsConfigRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @instance + */ + GetVpcFlowLogsConfigRequest.prototype.name = ""; + + /** + * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest instance + */ + GetVpcFlowLogsConfigRequest.create = function create(properties) { + return new GetVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVpcFlowLogsConfigRequest.encode = function encode(message, writer) { + 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 GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); + 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 GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVpcFlowLogsConfigRequest.verify = function verify(message) { + if (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 GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest + */ + GetVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVpcFlowLogsConfigRequest.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 GetVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest"; + }; + + return GetVpcFlowLogsConfigRequest; + })(); + + v1beta1.CreateVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of a CreateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface ICreateVpcFlowLogsConfigRequest + * @property {string|null} [parent] CreateVpcFlowLogsConfigRequest parent + * @property {string|null} [vpcFlowLogsConfigId] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId + * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig + */ + + /** + * Constructs a new CreateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a CreateVpcFlowLogsConfigRequest. + * @implements ICreateVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function CreateVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVpcFlowLogsConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + */ + CreateVpcFlowLogsConfigRequest.prototype.parent = ""; + + /** + * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. + * @member {string} vpcFlowLogsConfigId + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + */ + CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfigId = ""; + + /** + * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. + * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + */ + CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; + + /** + * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest instance + */ + CreateVpcFlowLogsConfigRequest.create = function create(properties) { + return new CreateVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfigId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.vpcFlowLogsConfigId); + if (message.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) + $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.vpcFlowLogsConfigId = reader.string(); + break; + } + case 3: { + message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) + if (!$util.isString(message.vpcFlowLogsConfigId)) + return "vpcFlowLogsConfigId: string expected"; + if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); + if (error) + return "vpcFlowLogsConfig." + error; + } + return null; + }; + + /** + * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest + */ + CreateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.vpcFlowLogsConfigId != null) + message.vpcFlowLogsConfigId = String(object.vpcFlowLogsConfigId); + if (object.vpcFlowLogsConfig != null) { + if (typeof object.vpcFlowLogsConfig !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); + message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); + } + return message; + }; + + /** + * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.vpcFlowLogsConfigId = ""; + object.vpcFlowLogsConfig = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) + object.vpcFlowLogsConfigId = message.vpcFlowLogsConfigId; + if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) + object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); + return object; + }; + + /** + * Converts this CreateVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest"; + }; + + return CreateVpcFlowLogsConfigRequest; + })(); + + v1beta1.UpdateVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of an UpdateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IUpdateVpcFlowLogsConfigRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVpcFlowLogsConfigRequest updateMask + * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig + */ + + /** + * Constructs a new UpdateVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents an UpdateVpcFlowLogsConfigRequest. + * @implements IUpdateVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function UpdateVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateVpcFlowLogsConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @instance + */ + UpdateVpcFlowLogsConfigRequest.prototype.updateMask = null; + + /** + * UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. + * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @instance + */ + UpdateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; + + /** + * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest instance + */ + UpdateVpcFlowLogsConfigRequest.create = function create(properties) { + return new UpdateVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) + $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); + 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.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { + var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); + if (error) + return "vpcFlowLogsConfig." + error; + } + return null; + }; + + /** + * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest + */ + UpdateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.vpcFlowLogsConfig != null) { + if (typeof object.vpcFlowLogsConfig !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); + message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); + } + return message; + }; + + /** + * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.vpcFlowLogsConfig = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) + object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); + return object; + }; + + /** + * Converts this UpdateVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest"; + }; + + return UpdateVpcFlowLogsConfigRequest; + })(); + + v1beta1.DeleteVpcFlowLogsConfigRequest = (function() { + + /** + * Properties of a DeleteVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IDeleteVpcFlowLogsConfigRequest + * @property {string|null} [name] DeleteVpcFlowLogsConfigRequest name + */ + + /** + * Constructs a new DeleteVpcFlowLogsConfigRequest. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a DeleteVpcFlowLogsConfigRequest. + * @implements IDeleteVpcFlowLogsConfigRequest + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set + */ + function DeleteVpcFlowLogsConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVpcFlowLogsConfigRequest name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @instance + */ + DeleteVpcFlowLogsConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest instance + */ + DeleteVpcFlowLogsConfigRequest.create = function create(properties) { + return new DeleteVpcFlowLogsConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVpcFlowLogsConfigRequest.encode = function encode(message, writer) { + 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 DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVpcFlowLogsConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); + 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 DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVpcFlowLogsConfigRequest message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVpcFlowLogsConfigRequest.verify = function verify(message) { + if (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 DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest + */ + DeleteVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVpcFlowLogsConfigRequest.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 DeleteVpcFlowLogsConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVpcFlowLogsConfigRequest + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest"; + }; + + return DeleteVpcFlowLogsConfigRequest; + })(); + + v1beta1.VpcFlowLogsConfig = (function() { + + /** + * Properties of a VpcFlowLogsConfig. + * @memberof google.cloud.networkmanagement.v1beta1 + * @interface IVpcFlowLogsConfig + * @property {string|null} [name] VpcFlowLogsConfig name + * @property {string|null} [description] VpcFlowLogsConfig description + * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null} [state] VpcFlowLogsConfig state + * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null} [aggregationInterval] VpcFlowLogsConfig aggregationInterval + * @property {number|null} [flowSampling] VpcFlowLogsConfig flowSampling + * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null} [metadata] VpcFlowLogsConfig metadata + * @property {Array.|null} [metadataFields] VpcFlowLogsConfig metadataFields + * @property {string|null} [filterExpr] VpcFlowLogsConfig filterExpr + * @property {string|null} [interconnectAttachment] VpcFlowLogsConfig interconnectAttachment + * @property {string|null} [vpnTunnel] VpcFlowLogsConfig vpnTunnel + * @property {Object.|null} [labels] VpcFlowLogsConfig labels + * @property {google.protobuf.ITimestamp|null} [createTime] VpcFlowLogsConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] VpcFlowLogsConfig updateTime + */ + + /** + * Constructs a new VpcFlowLogsConfig. + * @memberof google.cloud.networkmanagement.v1beta1 + * @classdesc Represents a VpcFlowLogsConfig. + * @implements IVpcFlowLogsConfig + * @constructor + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set + */ + function VpcFlowLogsConfig(properties) { + this.metadataFields = []; + 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]]; + } + + /** + * VpcFlowLogsConfig name. + * @member {string} name + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.name = ""; + + /** + * VpcFlowLogsConfig description. + * @member {string|null|undefined} description + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.description = null; + + /** + * VpcFlowLogsConfig state. + * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null|undefined} state + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.state = null; + + /** + * VpcFlowLogsConfig aggregationInterval. + * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null|undefined} aggregationInterval + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.aggregationInterval = null; + + /** + * VpcFlowLogsConfig flowSampling. + * @member {number|null|undefined} flowSampling + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.flowSampling = null; + + /** + * VpcFlowLogsConfig metadata. + * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null|undefined} metadata + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.metadata = null; + + /** + * VpcFlowLogsConfig metadataFields. + * @member {Array.} metadataFields + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.metadataFields = $util.emptyArray; + + /** + * VpcFlowLogsConfig filterExpr. + * @member {string|null|undefined} filterExpr + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.filterExpr = null; + + /** + * VpcFlowLogsConfig interconnectAttachment. + * @member {string|null|undefined} interconnectAttachment + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.interconnectAttachment = null; + + /** + * VpcFlowLogsConfig vpnTunnel. + * @member {string|null|undefined} vpnTunnel + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.vpnTunnel = null; + + /** + * VpcFlowLogsConfig labels. + * @member {Object.} labels + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.labels = $util.emptyObject; + + /** + * VpcFlowLogsConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.createTime = null; + + /** + * VpcFlowLogsConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + VpcFlowLogsConfig.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VpcFlowLogsConfig _description. + * @member {"description"|undefined} _description + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_description", { + get: $util.oneOfGetter($oneOfFields = ["description"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _state. + * @member {"state"|undefined} _state + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_state", { + get: $util.oneOfGetter($oneOfFields = ["state"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _aggregationInterval. + * @member {"aggregationInterval"|undefined} _aggregationInterval + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_aggregationInterval", { + get: $util.oneOfGetter($oneOfFields = ["aggregationInterval"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _flowSampling. + * @member {"flowSampling"|undefined} _flowSampling + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_flowSampling", { + get: $util.oneOfGetter($oneOfFields = ["flowSampling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _metadata. + * @member {"metadata"|undefined} _metadata + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_metadata", { + get: $util.oneOfGetter($oneOfFields = ["metadata"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig _filterExpr. + * @member {"filterExpr"|undefined} _filterExpr + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "_filterExpr", { + get: $util.oneOfGetter($oneOfFields = ["filterExpr"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * VpcFlowLogsConfig targetResource. + * @member {"interconnectAttachment"|"vpnTunnel"|undefined} targetResource + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + */ + Object.defineProperty(VpcFlowLogsConfig.prototype, "targetResource", { + get: $util.oneOfGetter($oneOfFields = ["interconnectAttachment", "vpnTunnel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VpcFlowLogsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig instance + */ + VpcFlowLogsConfig.create = function create(properties) { + return new VpcFlowLogsConfig(properties); + }; + + /** + * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcFlowLogsConfig.encode = function encode(message, writer) { + if (!writer) + 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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.aggregationInterval != null && Object.hasOwnProperty.call(message, "aggregationInterval")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aggregationInterval); + if (message.flowSampling != null && Object.hasOwnProperty.call(message, "flowSampling")) + writer.uint32(/* id 5, wireType 5 =*/45).float(message.flowSampling); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.metadata); + if (message.metadataFields != null && message.metadataFields.length) + for (var i = 0; i < message.metadataFields.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.metadataFields[i]); + if (message.filterExpr != null && Object.hasOwnProperty.call(message, "filterExpr")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.filterExpr); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).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 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.interconnectAttachment != null && Object.hasOwnProperty.call(message, "interconnectAttachment")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.interconnectAttachment); + if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.vpnTunnel); + return writer; + }; + + /** + * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VpcFlowLogsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcFlowLogsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(), 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.state = reader.int32(); + break; + } + case 4: { + message.aggregationInterval = reader.int32(); + break; + } + case 5: { + message.flowSampling = reader.float(); + break; + } + case 6: { + message.metadata = reader.int32(); + break; + } + case 7: { + if (!(message.metadataFields && message.metadataFields.length)) + message.metadataFields = []; + message.metadataFields.push(reader.string()); + break; + } + case 8: { + message.filterExpr = reader.string(); + break; + } + case 102: { + message.interconnectAttachment = reader.string(); + break; + } + case 103: { + message.vpnTunnel = reader.string(); + break; + } + case 11: { + 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 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VpcFlowLogsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VpcFlowLogsConfig message. + * @function verify + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VpcFlowLogsConfig.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.state != null && message.hasOwnProperty("state")) { + properties._state = 1; + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { + properties._aggregationInterval = 1; + switch (message.aggregationInterval) { + default: + return "aggregationInterval: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { + properties._flowSampling = 1; + if (typeof message.flowSampling !== "number") + return "flowSampling: number expected"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + properties._metadata = 1; + switch (message.metadata) { + default: + return "metadata: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.metadataFields != null && message.hasOwnProperty("metadataFields")) { + if (!Array.isArray(message.metadataFields)) + return "metadataFields: array expected"; + for (var i = 0; i < message.metadataFields.length; ++i) + if (!$util.isString(message.metadataFields[i])) + return "metadataFields: string[] expected"; + } + if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { + properties._filterExpr = 1; + if (!$util.isString(message.filterExpr)) + return "filterExpr: string expected"; + } + if (message.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { + properties.targetResource = 1; + if (!$util.isString(message.interconnectAttachment)) + return "interconnectAttachment: string expected"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + if (properties.targetResource === 1) + return "targetResource: multiple values"; + properties.targetResource = 1; + if (!$util.isString(message.vpnTunnel)) + return "vpnTunnel: 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; + } + return null; + }; + + /** + * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig + */ + VpcFlowLogsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) + return object; + var message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ENABLED": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + } + switch (object.aggregationInterval) { + default: + if (typeof object.aggregationInterval === "number") { + message.aggregationInterval = object.aggregationInterval; + break; + } + break; + case "AGGREGATION_INTERVAL_UNSPECIFIED": + case 0: + message.aggregationInterval = 0; + break; + case "INTERVAL_5_SEC": + case 1: + message.aggregationInterval = 1; + break; + case "INTERVAL_30_SEC": + case 2: + message.aggregationInterval = 2; + break; + case "INTERVAL_1_MIN": + case 3: + message.aggregationInterval = 3; + break; + case "INTERVAL_5_MIN": + case 4: + message.aggregationInterval = 4; + break; + case "INTERVAL_10_MIN": + case 5: + message.aggregationInterval = 5; + break; + case "INTERVAL_15_MIN": + case 6: + message.aggregationInterval = 6; + break; + } + if (object.flowSampling != null) + message.flowSampling = Number(object.flowSampling); + switch (object.metadata) { + default: + if (typeof object.metadata === "number") { + message.metadata = object.metadata; + break; + } + break; + case "METADATA_UNSPECIFIED": + case 0: + message.metadata = 0; + break; + case "INCLUDE_ALL_METADATA": + case 1: + message.metadata = 1; + break; + case "EXCLUDE_ALL_METADATA": + case 2: + message.metadata = 2; + break; + case "CUSTOM_METADATA": + case 3: + message.metadata = 3; + break; + } + if (object.metadataFields) { + if (!Array.isArray(object.metadataFields)) + throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.metadataFields: array expected"); + message.metadataFields = []; + for (var i = 0; i < object.metadataFields.length; ++i) + message.metadataFields[i] = String(object.metadataFields[i]); + } + if (object.filterExpr != null) + message.filterExpr = String(object.filterExpr); + if (object.interconnectAttachment != null) + message.interconnectAttachment = String(object.interconnectAttachment); + if (object.vpnTunnel != null) + message.vpnTunnel = String(object.vpnTunnel); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} message VpcFlowLogsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VpcFlowLogsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.metadataFields = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + } + 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.state != null && message.hasOwnProperty("state")) { + object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] : message.state; + if (options.oneofs) + object._state = "state"; + } + if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { + object.aggregationInterval = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] === undefined ? message.aggregationInterval : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] : message.aggregationInterval; + if (options.oneofs) + object._aggregationInterval = "aggregationInterval"; + } + if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { + object.flowSampling = options.json && !isFinite(message.flowSampling) ? String(message.flowSampling) : message.flowSampling; + if (options.oneofs) + object._flowSampling = "flowSampling"; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + object.metadata = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] === undefined ? message.metadata : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] : message.metadata; + if (options.oneofs) + object._metadata = "metadata"; + } + if (message.metadataFields && message.metadataFields.length) { + object.metadataFields = []; + for (var j = 0; j < message.metadataFields.length; ++j) + object.metadataFields[j] = message.metadataFields[j]; + } + if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { + object.filterExpr = message.filterExpr; + if (options.oneofs) + object._filterExpr = "filterExpr"; + } + 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.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { + object.interconnectAttachment = message.interconnectAttachment; + if (options.oneofs) + object.targetResource = "interconnectAttachment"; + } + if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { + object.vpnTunnel = message.vpnTunnel; + if (options.oneofs) + object.targetResource = "vpnTunnel"; + } + return object; + }; + + /** + * Converts this VpcFlowLogsConfig to JSON. + * @function toJSON + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @instance + * @returns {Object.} JSON object + */ + VpcFlowLogsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VpcFlowLogsConfig + * @function getTypeUrl + * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VpcFlowLogsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig"; + }; + + /** + * State enum. + * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + */ + VpcFlowLogsConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + return values; + })(); + + /** + * AggregationInterval enum. + * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval + * @enum {number} + * @property {number} AGGREGATION_INTERVAL_UNSPECIFIED=0 AGGREGATION_INTERVAL_UNSPECIFIED value + * @property {number} INTERVAL_5_SEC=1 INTERVAL_5_SEC value + * @property {number} INTERVAL_30_SEC=2 INTERVAL_30_SEC value + * @property {number} INTERVAL_1_MIN=3 INTERVAL_1_MIN value + * @property {number} INTERVAL_5_MIN=4 INTERVAL_5_MIN value + * @property {number} INTERVAL_10_MIN=5 INTERVAL_10_MIN value + * @property {number} INTERVAL_15_MIN=6 INTERVAL_15_MIN value + */ + VpcFlowLogsConfig.AggregationInterval = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AGGREGATION_INTERVAL_UNSPECIFIED"] = 0; + values[valuesById[1] = "INTERVAL_5_SEC"] = 1; + values[valuesById[2] = "INTERVAL_30_SEC"] = 2; + values[valuesById[3] = "INTERVAL_1_MIN"] = 3; + values[valuesById[4] = "INTERVAL_5_MIN"] = 4; + values[valuesById[5] = "INTERVAL_10_MIN"] = 5; + values[valuesById[6] = "INTERVAL_15_MIN"] = 6; + return values; + })(); + + /** + * Metadata enum. + * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata + * @enum {number} + * @property {number} METADATA_UNSPECIFIED=0 METADATA_UNSPECIFIED value + * @property {number} INCLUDE_ALL_METADATA=1 INCLUDE_ALL_METADATA value + * @property {number} EXCLUDE_ALL_METADATA=2 EXCLUDE_ALL_METADATA value + * @property {number} CUSTOM_METADATA=3 CUSTOM_METADATA value + */ + VpcFlowLogsConfig.Metadata = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METADATA_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE_ALL_METADATA"] = 1; + values[valuesById[2] = "EXCLUDE_ALL_METADATA"] = 2; + values[valuesById[3] = "CUSTOM_METADATA"] = 3; + return values; + })(); + + return VpcFlowLogsConfig; + })(); + + return v1beta1; + })(); + + return networkmanagement; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + 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; + })(); + + 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.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; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + 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; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + 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"]); + } + 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.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.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.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.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-networkmanagement/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json new file mode 100644 index 00000000000..d0087788008 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json @@ -0,0 +1,4682 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "networkmanagement": { + "nested": { + "v1beta1": { + "options": { + "csharp_namespace": "Google.Cloud.NetworkManagement.V1Beta1", + "go_package": "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb", + "java_multiple_files": true, + "java_outer_classname": "VpcFlowLogsConfigProto", + "java_package": "com.google.cloud.networkmanagement.v1beta1", + "php_namespace": "Google\\Cloud\\NetworkManagement\\V1beta1", + "ruby_package": "Google::Cloud::NetworkManagement::V1beta1" + }, + "nested": { + "ConnectivityTest": { + "options": { + "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", + "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "description": { + "type": "string", + "id": 2 + }, + "source": { + "type": "Endpoint", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "destination": { + "type": "Endpoint", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "protocol": { + "type": "string", + "id": 5 + }, + "relatedProjects": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "reachabilityDetails": { + "type": "ReachabilityDetails", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "probingDetails": { + "type": "ProbingDetails", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bypassFirewallChecks": { + "type": "bool", + "id": 17 + } + } + }, + "Endpoint": { + "oneofs": { + "_forwardingRuleTarget": { + "oneof": [ + "forwardingRuleTarget" + ] + }, + "_loadBalancerId": { + "oneof": [ + "loadBalancerId" + ] + }, + "_loadBalancerType": { + "oneof": [ + "loadBalancerType" + ] + } + }, + "fields": { + "ipAddress": { + "type": "string", + "id": 1 + }, + "port": { + "type": "int32", + "id": 2 + }, + "instance": { + "type": "string", + "id": 3 + }, + "forwardingRule": { + "type": "string", + "id": 13 + }, + "forwardingRuleTarget": { + "type": "ForwardingRuleTarget", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerId": { + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "gkeMasterCluster": { + "type": "string", + "id": 7 + }, + "fqdn": { + "type": "string", + "id": 19 + }, + "cloudSqlInstance": { + "type": "string", + "id": 8 + }, + "redisInstance": { + "type": "string", + "id": 17 + }, + "redisCluster": { + "type": "string", + "id": 18 + }, + "cloudFunction": { + "type": "CloudFunctionEndpoint", + "id": 10 + }, + "appEngineVersion": { + "type": "AppEngineVersionEndpoint", + "id": 11 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionEndpoint", + "id": 12 + }, + "network": { + "type": "string", + "id": 4 + }, + "networkType": { + "type": "NetworkType", + "id": 5 + }, + "projectId": { + "type": "string", + "id": 6 + } + }, + "nested": { + "NetworkType": { + "values": { + "NETWORK_TYPE_UNSPECIFIED": 0, + "GCP_NETWORK": 1, + "NON_GCP_NETWORK": 2 + } + }, + "ForwardingRuleTarget": { + "values": { + "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "LOAD_BALANCER": 2, + "VPN_GATEWAY": 3, + "PSC": 4 + } + }, + "CloudFunctionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "AppEngineVersionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + }, + "CloudRunRevisionEndpoint": { + "fields": { + "uri": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ReachabilityDetails": { + "fields": { + "result": { + "type": "Result", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "traces": { + "rule": "repeated", + "type": "Trace", + "id": 5 + } + }, + "nested": { + "Result": { + "values": { + "RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "AMBIGUOUS": 4, + "UNDETERMINED": 5 + } + } + } + }, + "LatencyPercentile": { + "fields": { + "percent": { + "type": "int32", + "id": 1 + }, + "latencyMicros": { + "type": "int64", + "id": 2 + } + } + }, + "LatencyDistribution": { + "fields": { + "latencyPercentiles": { + "rule": "repeated", + "type": "LatencyPercentile", + "id": 1 + } + } + }, + "ProbingDetails": { + "fields": { + "result": { + "type": "ProbingResult", + "id": 1 + }, + "verifyTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "error": { + "type": "google.rpc.Status", + "id": 3 + }, + "abortCause": { + "type": "ProbingAbortCause", + "id": 4 + }, + "sentProbeCount": { + "type": "int32", + "id": 5 + }, + "successfulProbeCount": { + "type": "int32", + "id": 6 + }, + "endpointInfo": { + "type": "EndpointInfo", + "id": 7 + }, + "probingLatency": { + "type": "LatencyDistribution", + "id": 8 + }, + "destinationEgressLocation": { + "type": "EdgeLocation", + "id": 9 + } + }, + "nested": { + "ProbingResult": { + "values": { + "PROBING_RESULT_UNSPECIFIED": 0, + "REACHABLE": 1, + "UNREACHABLE": 2, + "REACHABILITY_INCONSISTENT": 3, + "UNDETERMINED": 4 + } + }, + "ProbingAbortCause": { + "values": { + "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, + "PERMISSION_DENIED": 1, + "NO_SOURCE_LOCATION": 2 + } + }, + "EdgeLocation": { + "fields": { + "metropolitanArea": { + "type": "string", + "id": 1 + } + } + } + } + }, + "Trace": { + "fields": { + "endpointInfo": { + "type": "EndpointInfo", + "id": 1 + }, + "steps": { + "rule": "repeated", + "type": "Step", + "id": 2 + }, + "forwardTraceId": { + "type": "int32", + "id": 4 + } + } + }, + "Step": { + "oneofs": { + "stepInfo": { + "oneof": [ + "instance", + "firewall", + "route", + "endpoint", + "googleService", + "forwardingRule", + "vpnGateway", + "vpnTunnel", + "vpcConnector", + "deliver", + "forward", + "abort", + "drop", + "loadBalancer", + "network", + "gkeMaster", + "cloudSqlInstance", + "redisInstance", + "redisCluster", + "cloudFunction", + "appEngineVersion", + "cloudRunRevision", + "nat", + "proxyConnection", + "loadBalancerBackendInfo", + "storageBucket", + "serverlessNeg" + ] + } + }, + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + }, + "causesDrop": { + "type": "bool", + "id": 3 + }, + "projectId": { + "type": "string", + "id": 4 + }, + "instance": { + "type": "InstanceInfo", + "id": 5 + }, + "firewall": { + "type": "FirewallInfo", + "id": 6 + }, + "route": { + "type": "RouteInfo", + "id": 7 + }, + "endpoint": { + "type": "EndpointInfo", + "id": 8 + }, + "googleService": { + "type": "GoogleServiceInfo", + "id": 24 + }, + "forwardingRule": { + "type": "ForwardingRuleInfo", + "id": 9 + }, + "vpnGateway": { + "type": "VpnGatewayInfo", + "id": 10 + }, + "vpnTunnel": { + "type": "VpnTunnelInfo", + "id": 11 + }, + "vpcConnector": { + "type": "VpcConnectorInfo", + "id": 21 + }, + "deliver": { + "type": "DeliverInfo", + "id": 12 + }, + "forward": { + "type": "ForwardInfo", + "id": 13 + }, + "abort": { + "type": "AbortInfo", + "id": 14 + }, + "drop": { + "type": "DropInfo", + "id": 15 + }, + "loadBalancer": { + "type": "LoadBalancerInfo", + "id": 16, + "options": { + "deprecated": true + } + }, + "network": { + "type": "NetworkInfo", + "id": 17 + }, + "gkeMaster": { + "type": "GKEMasterInfo", + "id": 18 + }, + "cloudSqlInstance": { + "type": "CloudSQLInstanceInfo", + "id": 19 + }, + "redisInstance": { + "type": "RedisInstanceInfo", + "id": 30 + }, + "redisCluster": { + "type": "RedisClusterInfo", + "id": 31 + }, + "cloudFunction": { + "type": "CloudFunctionInfo", + "id": 20 + }, + "appEngineVersion": { + "type": "AppEngineVersionInfo", + "id": 22 + }, + "cloudRunRevision": { + "type": "CloudRunRevisionInfo", + "id": 23 + }, + "nat": { + "type": "NatInfo", + "id": 25 + }, + "proxyConnection": { + "type": "ProxyConnectionInfo", + "id": 26 + }, + "loadBalancerBackendInfo": { + "type": "LoadBalancerBackendInfo", + "id": 27 + }, + "storageBucket": { + "type": "StorageBucketInfo", + "id": 28 + }, + "serverlessNeg": { + "type": "ServerlessNegInfo", + "id": 29 + } + }, + "nested": { + "State": { + "valuesOptions": { + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { + "deprecated": true + }, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { + "deprecated": true + } + }, + "values": { + "STATE_UNSPECIFIED": 0, + "START_FROM_INSTANCE": 1, + "START_FROM_INTERNET": 2, + "START_FROM_GOOGLE_SERVICE": 27, + "START_FROM_PRIVATE_NETWORK": 3, + "START_FROM_GKE_MASTER": 21, + "START_FROM_CLOUD_SQL_INSTANCE": 22, + "START_FROM_REDIS_INSTANCE": 32, + "START_FROM_REDIS_CLUSTER": 33, + "START_FROM_CLOUD_FUNCTION": 23, + "START_FROM_APP_ENGINE_VERSION": 25, + "START_FROM_CLOUD_RUN_REVISION": 26, + "START_FROM_STORAGE_BUCKET": 29, + "START_FROM_PSC_PUBLISHED_SERVICE": 30, + "START_FROM_SERVERLESS_NEG": 31, + "APPLY_INGRESS_FIREWALL_RULE": 4, + "APPLY_EGRESS_FIREWALL_RULE": 5, + "APPLY_ROUTE": 6, + "APPLY_FORWARDING_RULE": 7, + "ANALYZE_LOAD_BALANCER_BACKEND": 28, + "SPOOFING_APPROVED": 8, + "ARRIVE_AT_INSTANCE": 9, + "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, + "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, + "ARRIVE_AT_VPN_GATEWAY": 12, + "ARRIVE_AT_VPN_TUNNEL": 13, + "ARRIVE_AT_VPC_CONNECTOR": 24, + "NAT": 14, + "PROXY_CONNECTION": 15, + "DELIVER": 16, + "DROP": 17, + "FORWARD": 18, + "ABORT": 19, + "VIEWER_PERMISSION_MISSING": 20 + } + } + } + }, + "InstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "interface": { + "type": "string", + "id": 3 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "networkTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "serviceAccount": { + "type": "string", + "id": 8, + "options": { + "deprecated": true + } + }, + "pscNetworkAttachmentUri": { + "type": "string", + "id": 9 + } + } + }, + "NetworkInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedSubnetUri": { + "type": "string", + "id": 5 + }, + "matchedIpRange": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "FirewallInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "direction": { + "type": "string", + "id": 3 + }, + "action": { + "type": "string", + "id": 4 + }, + "priority": { + "type": "int32", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 6 + }, + "targetTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "targetServiceAccounts": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "policy": { + "type": "string", + "id": 9 + }, + "policyUri": { + "type": "string", + "id": 11 + }, + "firewallRuleType": { + "type": "FirewallRuleType", + "id": 10 + } + }, + "nested": { + "FirewallRuleType": { + "values": { + "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, + "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, + "VPC_FIREWALL_RULE": 2, + "IMPLIED_VPC_FIREWALL_RULE": 3, + "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, + "NETWORK_FIREWALL_POLICY_RULE": 5, + "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, + "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, + "TRACKING_STATE": 101 + } + } + } + }, + "RouteInfo": { + "oneofs": { + "_nccHubUri": { + "oneof": [ + "nccHubUri" + ] + }, + "_nccSpokeUri": { + "oneof": [ + "nccSpokeUri" + ] + }, + "_advertisedRouteSourceRouterUri": { + "oneof": [ + "advertisedRouteSourceRouterUri" + ] + }, + "_advertisedRouteNextHopUri": { + "oneof": [ + "advertisedRouteNextHopUri" + ] + } + }, + "fields": { + "routeType": { + "type": "RouteType", + "id": 8 + }, + "nextHopType": { + "type": "NextHopType", + "id": 9 + }, + "routeScope": { + "type": "RouteScope", + "id": 14 + }, + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "region": { + "type": "string", + "id": 19 + }, + "destIpRange": { + "type": "string", + "id": 3 + }, + "nextHop": { + "type": "string", + "id": 4 + }, + "networkUri": { + "type": "string", + "id": 5 + }, + "priority": { + "type": "int32", + "id": 6 + }, + "instanceTags": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "srcIpRange": { + "type": "string", + "id": 10 + }, + "destPortRanges": { + "rule": "repeated", + "type": "string", + "id": 11 + }, + "srcPortRanges": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "protocols": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "nccHubUri": { + "type": "string", + "id": 15, + "options": { + "proto3_optional": true + } + }, + "nccSpokeUri": { + "type": "string", + "id": 16, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteSourceRouterUri": { + "type": "string", + "id": 17, + "options": { + "proto3_optional": true + } + }, + "advertisedRouteNextHopUri": { + "type": "string", + "id": 18, + "options": { + "proto3_optional": true + } + } + }, + "nested": { + "RouteType": { + "values": { + "ROUTE_TYPE_UNSPECIFIED": 0, + "SUBNET": 1, + "STATIC": 2, + "DYNAMIC": 3, + "PEERING_SUBNET": 4, + "PEERING_STATIC": 5, + "PEERING_DYNAMIC": 6, + "POLICY_BASED": 7, + "ADVERTISED": 101 + } + }, + "NextHopType": { + "values": { + "NEXT_HOP_TYPE_UNSPECIFIED": 0, + "NEXT_HOP_IP": 1, + "NEXT_HOP_INSTANCE": 2, + "NEXT_HOP_NETWORK": 3, + "NEXT_HOP_PEERING": 4, + "NEXT_HOP_INTERCONNECT": 5, + "NEXT_HOP_VPN_TUNNEL": 6, + "NEXT_HOP_VPN_GATEWAY": 7, + "NEXT_HOP_INTERNET_GATEWAY": 8, + "NEXT_HOP_BLACKHOLE": 9, + "NEXT_HOP_ILB": 10, + "NEXT_HOP_ROUTER_APPLIANCE": 11, + "NEXT_HOP_NCC_HUB": 12 + } + }, + "RouteScope": { + "values": { + "ROUTE_SCOPE_UNSPECIFIED": 0, + "NETWORK": 1, + "NCC_HUB": 2 + } + } + } + }, + "GoogleServiceInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "googleServiceType": { + "type": "GoogleServiceType", + "id": 2 + } + }, + "nested": { + "GoogleServiceType": { + "values": { + "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, + "IAP": 1, + "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, + "CLOUD_DNS": 3, + "GOOGLE_API": 4, + "GOOGLE_API_PSC": 5, + "GOOGLE_API_VPC_SC": 6 + } + } + } + }, + "ForwardingRuleInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "matchedProtocol": { + "type": "string", + "id": 3 + }, + "matchedPortRange": { + "type": "string", + "id": 6 + }, + "vip": { + "type": "string", + "id": 4 + }, + "target": { + "type": "string", + "id": 5 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "loadBalancerName": { + "type": "string", + "id": 9 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 10 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerInfo": { + "fields": { + "loadBalancerType": { + "type": "LoadBalancerType", + "id": 1 + }, + "healthCheckUri": { + "type": "string", + "id": 2, + "options": { + "deprecated": true + } + }, + "backends": { + "rule": "repeated", + "type": "LoadBalancerBackend", + "id": 3 + }, + "backendType": { + "type": "BackendType", + "id": 4 + }, + "backendUri": { + "type": "string", + "id": 5 + } + }, + "nested": { + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "INTERNAL_TCP_UDP": 1, + "NETWORK_TCP_UDP": 2, + "HTTP_PROXY": 3, + "TCP_PROXY": 4, + "SSL_PROXY": 5 + } + }, + "BackendType": { + "values": { + "BACKEND_TYPE_UNSPECIFIED": 0, + "BACKEND_SERVICE": 1, + "TARGET_POOL": 2, + "TARGET_INSTANCE": 3 + } + } + } + }, + "LoadBalancerBackend": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "healthCheckFirewallState": { + "type": "HealthCheckFirewallState", + "id": 3 + }, + "healthCheckAllowingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "healthCheckBlockingFirewallRules": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "HealthCheckFirewallState": { + "values": { + "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, + "CONFIGURED": 1, + "MISCONFIGURED": 2 + } + } + } + }, + "VpnGatewayInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "ipAddress": { + "type": "string", + "id": 4 + }, + "vpnTunnelUri": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "VpnTunnelInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "sourceGateway": { + "type": "string", + "id": 3 + }, + "remoteGateway": { + "type": "string", + "id": 4 + }, + "remoteGatewayIp": { + "type": "string", + "id": 5 + }, + "sourceGatewayIp": { + "type": "string", + "id": 6 + }, + "networkUri": { + "type": "string", + "id": 7 + }, + "region": { + "type": "string", + "id": 8 + }, + "routingType": { + "type": "RoutingType", + "id": 9 + } + }, + "nested": { + "RoutingType": { + "values": { + "ROUTING_TYPE_UNSPECIFIED": 0, + "ROUTE_BASED": 1, + "POLICY_BASED": 2, + "DYNAMIC": 3 + } + } + } + }, + "EndpointInfo": { + "fields": { + "sourceIp": { + "type": "string", + "id": 1 + }, + "destinationIp": { + "type": "string", + "id": 2 + }, + "protocol": { + "type": "string", + "id": 3 + }, + "sourcePort": { + "type": "int32", + "id": 4 + }, + "destinationPort": { + "type": "int32", + "id": 5 + }, + "sourceNetworkUri": { + "type": "string", + "id": 6 + }, + "destinationNetworkUri": { + "type": "string", + "id": 7 + }, + "sourceAgentUri": { + "type": "string", + "id": 8 + } + } + }, + "DeliverInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "storageBucket": { + "type": "string", + "id": 4 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Target": { + "values": { + "TARGET_UNSPECIFIED": 0, + "INSTANCE": 1, + "INTERNET": 2, + "GOOGLE_API": 3, + "GKE_MASTER": 4, + "CLOUD_SQL_INSTANCE": 5, + "PSC_PUBLISHED_SERVICE": 6, + "PSC_GOOGLE_API": 7, + "PSC_VPC_SC": 8, + "SERVERLESS_NEG": 9, + "STORAGE_BUCKET": 10, + "PRIVATE_NETWORK": 11, + "CLOUD_FUNCTION": 12, + "APP_ENGINE_VERSION": 13, + "CLOUD_RUN_REVISION": 14, + "GOOGLE_MANAGED_SERVICE": 15, + "REDIS_INSTANCE": 16, + "REDIS_CLUSTER": 17 + } + } + } + }, + "ForwardInfo": { + "fields": { + "target": { + "type": "Target", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + } + }, + "nested": { + "Target": { + "valuesOptions": { + "GKE_MASTER": { + "deprecated": true + }, + "CLOUD_SQL_INSTANCE": { + "deprecated": true + } + }, + "values": { + "TARGET_UNSPECIFIED": 0, + "PEERING_VPC": 1, + "VPN_GATEWAY": 2, + "INTERCONNECT": 3, + "GKE_MASTER": 4, + "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, + "CLOUD_SQL_INSTANCE": 6, + "ANOTHER_PROJECT": 7, + "NCC_HUB": 8, + "ROUTER_APPLIANCE": 9 + } + } + } + }, + "AbortInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "ipAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "projectsMissingPermission": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "Cause": { + "valuesOptions": { + "UNKNOWN_NETWORK": { + "deprecated": true + }, + "UNKNOWN_PROJECT": { + "deprecated": true + }, + "NO_EXTERNAL_IP": { + "deprecated": true + }, + "UNINTENDED_DESTINATION": { + "deprecated": true + }, + "SOURCE_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_SOURCE_NETWORK": { + "deprecated": true + }, + "DESTINATION_ENDPOINT_NOT_FOUND": { + "deprecated": true + }, + "MISMATCHED_DESTINATION_NETWORK": { + "deprecated": true + } + }, + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_NETWORK": 1, + "UNKNOWN_PROJECT": 3, + "NO_EXTERNAL_IP": 7, + "UNINTENDED_DESTINATION": 8, + "SOURCE_ENDPOINT_NOT_FOUND": 11, + "MISMATCHED_SOURCE_NETWORK": 12, + "DESTINATION_ENDPOINT_NOT_FOUND": 13, + "MISMATCHED_DESTINATION_NETWORK": 14, + "UNKNOWN_IP": 2, + "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, + "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, + "PERMISSION_DENIED": 4, + "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, + "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, + "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, + "NO_SOURCE_LOCATION": 5, + "INVALID_ARGUMENT": 6, + "TRACE_TOO_LONG": 9, + "INTERNAL_ERROR": 10, + "UNSUPPORTED": 15, + "MISMATCHED_IP_VERSION": 16, + "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, + "RESOURCE_CONFIG_NOT_FOUND": 18, + "VM_INSTANCE_CONFIG_NOT_FOUND": 24, + "NETWORK_CONFIG_NOT_FOUND": 25, + "FIREWALL_CONFIG_NOT_FOUND": 26, + "ROUTE_CONFIG_NOT_FOUND": 27, + "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, + "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, + "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, + "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, + "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, + "NON_ROUTABLE_IP_ADDRESS": 22, + "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, + "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 + } + } + } + }, + "DropInfo": { + "fields": { + "cause": { + "type": "Cause", + "id": 1 + }, + "resourceUri": { + "type": "string", + "id": 2 + }, + "sourceIp": { + "type": "string", + "id": 3 + }, + "destinationIp": { + "type": "string", + "id": 4 + }, + "region": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Cause": { + "values": { + "CAUSE_UNSPECIFIED": 0, + "UNKNOWN_EXTERNAL_ADDRESS": 1, + "FOREIGN_IP_DISALLOWED": 2, + "FIREWALL_RULE": 3, + "NO_ROUTE": 4, + "ROUTE_BLACKHOLE": 5, + "ROUTE_WRONG_NETWORK": 6, + "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, + "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, + "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, + "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, + "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, + "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, + "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, + "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, + "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, + "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, + "PRIVATE_TRAFFIC_TO_INTERNET": 7, + "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, + "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, + "NO_EXTERNAL_ADDRESS": 9, + "UNKNOWN_INTERNAL_ADDRESS": 10, + "FORWARDING_RULE_MISMATCH": 11, + "FORWARDING_RULE_NO_INSTANCES": 12, + "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, + "INSTANCE_NOT_RUNNING": 14, + "GKE_CLUSTER_NOT_RUNNING": 27, + "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, + "REDIS_INSTANCE_NOT_RUNNING": 68, + "REDIS_CLUSTER_NOT_RUNNING": 69, + "TRAFFIC_TYPE_BLOCKED": 15, + "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, + "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, + "DROPPED_INSIDE_GKE_SERVICE": 18, + "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, + "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, + "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, + "GKE_PSC_ENDPOINT_MISSING": 36, + "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, + "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, + "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, + "GKE_CONTROL_PLANE_NO_ROUTE": 32, + "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, + "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, + "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, + "CLOUD_SQL_CONNECTOR_REQUIRED": 63, + "CLOUD_FUNCTION_NOT_ACTIVE": 22, + "VPC_CONNECTOR_NOT_SET": 23, + "VPC_CONNECTOR_NOT_RUNNING": 24, + "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, + "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, + "FORWARDING_RULE_REGION_MISMATCH": 25, + "PSC_CONNECTION_NOT_ACCEPTED": 26, + "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, + "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, + "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, + "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, + "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, + "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, + "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, + "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, + "CLOUD_RUN_REVISION_NOT_READY": 29, + "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, + "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, + "CLOUD_NAT_NO_ADDRESSES": 40, + "ROUTING_LOOP": 59, + "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, + "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, + "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, + "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, + "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, + "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, + "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, + "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, + "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, + "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, + "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, + "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, + "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, + "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, + "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, + "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, + "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, + "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 + } + } + } + }, + "GKEMasterInfo": { + "fields": { + "clusterUri": { + "type": "string", + "id": 2 + }, + "clusterNetworkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "dnsEndpoint": { + "type": "string", + "id": 7 + } + } + }, + "CloudSQLInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 4 + }, + "internalIp": { + "type": "string", + "id": 5 + }, + "externalIp": { + "type": "string", + "id": 6 + }, + "region": { + "type": "string", + "id": 7 + } + } + }, + "RedisInstanceInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "primaryEndpointIp": { + "type": "string", + "id": 4 + }, + "readEndpointIp": { + "type": "string", + "id": 5 + }, + "region": { + "type": "string", + "id": 6 + } + } + }, + "RedisClusterInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "discoveryEndpointIpAddress": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "secondaryEndpointIpAddress": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_info).format": "IPV4_OR_IPV6" + } + }, + "location": { + "type": "string", + "id": 6 + } + } + }, + "CloudFunctionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + }, + "versionId": { + "type": "int64", + "id": 4 + } + } + }, + "CloudRunRevisionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 4 + }, + "serviceUri": { + "type": "string", + "id": 5 + } + } + }, + "AppEngineVersionInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "runtime": { + "type": "string", + "id": 3 + }, + "environment": { + "type": "string", + "id": 4 + } + } + }, + "VpcConnectorInfo": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "uri": { + "type": "string", + "id": 2 + }, + "location": { + "type": "string", + "id": 3 + } + } + }, + "NatInfo": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "protocol": { + "type": "string", + "id": 2 + }, + "networkUri": { + "type": "string", + "id": 3 + }, + "oldSourceIp": { + "type": "string", + "id": 4 + }, + "newSourceIp": { + "type": "string", + "id": 5 + }, + "oldDestinationIp": { + "type": "string", + "id": 6 + }, + "newDestinationIp": { + "type": "string", + "id": 7 + }, + "oldSourcePort": { + "type": "int32", + "id": 8 + }, + "newSourcePort": { + "type": "int32", + "id": 9 + }, + "oldDestinationPort": { + "type": "int32", + "id": 10 + }, + "newDestinationPort": { + "type": "int32", + "id": 11 + }, + "routerUri": { + "type": "string", + "id": 12 + }, + "natGatewayName": { + "type": "string", + "id": 13 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "INTERNAL_TO_EXTERNAL": 1, + "EXTERNAL_TO_INTERNAL": 2, + "CLOUD_NAT": 3, + "PRIVATE_SERVICE_CONNECT": 4 + } + } + } + }, + "ProxyConnectionInfo": { + "fields": { + "protocol": { + "type": "string", + "id": 1 + }, + "oldSourceIp": { + "type": "string", + "id": 2 + }, + "newSourceIp": { + "type": "string", + "id": 3 + }, + "oldDestinationIp": { + "type": "string", + "id": 4 + }, + "newDestinationIp": { + "type": "string", + "id": 5 + }, + "oldSourcePort": { + "type": "int32", + "id": 6 + }, + "newSourcePort": { + "type": "int32", + "id": 7 + }, + "oldDestinationPort": { + "type": "int32", + "id": 8 + }, + "newDestinationPort": { + "type": "int32", + "id": 9 + }, + "subnetUri": { + "type": "string", + "id": 10 + }, + "networkUri": { + "type": "string", + "id": 11 + } + } + }, + "LoadBalancerBackendInfo": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "instanceUri": { + "type": "string", + "id": 2 + }, + "backendServiceUri": { + "type": "string", + "id": 3 + }, + "instanceGroupUri": { + "type": "string", + "id": 4 + }, + "networkEndpointGroupUri": { + "type": "string", + "id": 5 + }, + "backendBucketUri": { + "type": "string", + "id": 8 + }, + "pscServiceAttachmentUri": { + "type": "string", + "id": 9 + }, + "pscGoogleApiTarget": { + "type": "string", + "id": 10 + }, + "healthCheckUri": { + "type": "string", + "id": 6 + }, + "healthCheckFirewallsConfigState": { + "type": "HealthCheckFirewallsConfigState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "HealthCheckFirewallsConfigState": { + "values": { + "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, + "FIREWALLS_CONFIGURED": 1, + "FIREWALLS_PARTIALLY_CONFIGURED": 2, + "FIREWALLS_NOT_CONFIGURED": 3, + "FIREWALLS_UNSUPPORTED": 4 + } + } + } + }, + "LoadBalancerType": { + "values": { + "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, + "HTTPS_ADVANCED_LOAD_BALANCER": 1, + "HTTPS_LOAD_BALANCER": 2, + "REGIONAL_HTTPS_LOAD_BALANCER": 3, + "INTERNAL_HTTPS_LOAD_BALANCER": 4, + "SSL_PROXY_LOAD_BALANCER": 5, + "TCP_PROXY_LOAD_BALANCER": 6, + "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, + "NETWORK_LOAD_BALANCER": 8, + "LEGACY_NETWORK_LOAD_BALANCER": 9, + "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 + } + }, + "StorageBucketInfo": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + } + } + }, + "ServerlessNegInfo": { + "fields": { + "negUri": { + "type": "string", + "id": 1 + } + } + }, + "ReachabilityService": { + "options": { + "(google.api.default_host)": "networkmanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListConnectivityTests": { + "requestType": "ListConnectivityTestsRequest", + "responseType": "ListConnectivityTestsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" + } + } + ] + }, + "GetConnectivityTest": { + "requestType": "GetConnectivityTestRequest", + "responseType": "ConnectivityTest", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + } + } + ] + }, + "CreateConnectivityTest": { + "requestType": "CreateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", + "(google.api.http).body": "resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", + "body": "resource" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConnectivityTest": { + "requestType": "UpdateConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "(google.api.http).body": "resource", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", + "body": "resource" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "RerunConnectivityTest": { + "requestType": "RerunConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConnectivityTest": { + "requestType": "DeleteConnectivityTestRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "ListConnectivityTestsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + }, + "orderBy": { + "type": "string", + "id": 5 + } + } + }, + "ListConnectivityTestsResponse": { + "fields": { + "resources": { + "rule": "repeated", + "type": "ConnectivityTest", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "CreateConnectivityTestRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" + } + }, + "testId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateConnectivityTestRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "resource": { + "type": "ConnectivityTest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "RerunConnectivityTestRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "target": { + "type": "string", + "id": 3 + }, + "verb": { + "type": "string", + "id": 4 + }, + "statusDetail": { + "type": "string", + "id": 5 + }, + "cancelRequested": { + "type": "bool", + "id": 6 + }, + "apiVersion": { + "type": "string", + "id": 7 + } + } + }, + "VpcFlowLogsService": { + "options": { + "(google.api.default_host)": "networkmanagement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListVpcFlowLogsConfigs": { + "requestType": "ListVpcFlowLogsConfigsRequest", + "responseType": "ListVpcFlowLogsConfigsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetVpcFlowLogsConfig": { + "requestType": "GetVpcFlowLogsConfigRequest", + "responseType": "VpcFlowLogsConfig", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateVpcFlowLogsConfig": { + "requestType": "CreateVpcFlowLogsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", + "(google.api.http).body": "vpc_flow_logs_config", + "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id", + "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", + "body": "vpc_flow_logs_config" + } + }, + { + "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "VpcFlowLogsConfig", + "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + } + } + ] + }, + "UpdateVpcFlowLogsConfig": { + "requestType": "UpdateVpcFlowLogsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "(google.api.http).body": "vpc_flow_logs_config", + "(google.api.method_signature)": "vpc_flow_logs_config,update_mask", + "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "body": "vpc_flow_logs_config" + } + }, + { + "(google.api.method_signature)": "vpc_flow_logs_config,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "VpcFlowLogsConfig", + "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + } + } + ] + }, + "DeleteVpcFlowLogsConfig": { + "requestType": "DeleteVpcFlowLogsConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" + } + } + ] + } + } + }, + "ListVpcFlowLogsConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + }, + "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" + } + } + } + }, + "ListVpcFlowLogsConfigsResponse": { + "fields": { + "vpcFlowLogsConfigs": { + "rule": "repeated", + "type": "VpcFlowLogsConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetVpcFlowLogsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + } + } + }, + "CreateVpcFlowLogsConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + }, + "vpcFlowLogsConfigId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + }, + "vpcFlowLogsConfig": { + "type": "VpcFlowLogsConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateVpcFlowLogsConfigRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "vpcFlowLogsConfig": { + "type": "VpcFlowLogsConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteVpcFlowLogsConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" + } + } + } + }, + "VpcFlowLogsConfig": { + "options": { + "(google.api.resource).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}", + "(google.api.resource).plural": "vpcFlowLogsConfigs", + "(google.api.resource).singular": "vpcFlowLogsConfig" + }, + "oneofs": { + "_description": { + "oneof": [ + "description" + ] + }, + "_state": { + "oneof": [ + "state" + ] + }, + "_aggregationInterval": { + "oneof": [ + "aggregationInterval" + ] + }, + "_flowSampling": { + "oneof": [ + "flowSampling" + ] + }, + "_metadata": { + "oneof": [ + "metadata" + ] + }, + "_filterExpr": { + "oneof": [ + "filterExpr" + ] + }, + "targetResource": { + "oneof": [ + "interconnectAttachment", + "vpnTunnel" + ] + } + }, + "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 + } + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "aggregationInterval": { + "type": "AggregationInterval", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "flowSampling": { + "type": "float", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadata": { + "type": "Metadata", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "metadataFields": { + "rule": "repeated", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filterExpr": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "interconnectAttachment": { + "type": "string", + "id": 102 + }, + "vpnTunnel": { + "type": "string", + "id": 103 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2 + } + }, + "AggregationInterval": { + "values": { + "AGGREGATION_INTERVAL_UNSPECIFIED": 0, + "INTERVAL_5_SEC": 1, + "INTERVAL_30_SEC": 2, + "INTERVAL_1_MIN": 3, + "INTERVAL_5_MIN": 4, + "INTERVAL_10_MIN": 5, + "INTERVAL_15_MIN": 6 + } + }, + "Metadata": { + "values": { + "METADATA_UNSPECIFIED": 0, + "INCLUDE_ALL_METADATA": 1, + "EXCLUDE_ALL_METADATA": 2, + "CUSTOM_METADATA": 3 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api;api", + "java_multiple_files": true, + "java_outer_classname": "LaunchStageProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + }, + "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 + } + } + } + } + } + }, + "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 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js new file mode 100644 index 00000000000..05458c89c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js @@ -0,0 +1,79 @@ +// 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, testId, resource) { + // [START networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + */ + // const testId = 'abc123' + /** + * Required. A `ConnectivityTest` resource + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callCreateConnectivityTest() { + // Construct request + const request = { + parent, + testId, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.createConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js new file mode 100644 index 00000000000..22a9e8e6bcc --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callDeleteConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.deleteConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js new file mode 100644 index 00000000000..136815a174a --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.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 networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callGetConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networkmanagementClient.getConnectivityTest(request); + console.log(response); + } + + callGetConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js new file mode 100644 index 00000000000..0f13d2d7bd8 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.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(parent) { + // [START networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Number of `ConnectivityTests` to return. + */ + // const pageSize = 1234 + /** + * Page token from an earlier query, as returned in `next_page_token`. + */ + // const pageToken = 'abc123' + /** + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + */ + // const filter = 'abc123' + /** + * Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callListConnectivityTests() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networkmanagementClient.listConnectivityTestsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnectivityTests(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js new file mode 100644 index 00000000000..060a9e295e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callRerunConnectivityTest() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.rerunConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRerunConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js new file mode 100644 index 00000000000..f6925cd1908 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js @@ -0,0 +1,68 @@ +// 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, resource) { + // [START networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. Only fields specified in update_mask are updated. + */ + // const resource = {} + + // Imports the Networkmanagement library + const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new ReachabilityServiceClient(); + + async function callUpdateConnectivityTest() { + // Construct request + const request = { + updateMask, + resource, + }; + + // Run request + const [operation] = await networkmanagementClient.updateConnectivityTest(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConnectivityTest(); + // [END networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json new file mode 100644 index 00000000000..526ea089821 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json @@ -0,0 +1,511 @@ +{ + "clientLibrary": { + "name": "nodejs-networkmanagement", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.networkmanagement.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async", + "title": "ReachabilityService listConnectivityTests Sample", + "origin": "API_DEFINITION", + "description": " Lists all Connectivity Tests owned by a project.", + "canonical": true, + "file": "reachability_service.list_connectivity_tests.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 87, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", + "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.networkmanagement.v1beta1.ListConnectivityTestsResponse", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "ListConnectivityTests", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async", + "title": "ReachabilityService getConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific Connectivity Test.", + "canonical": true, + "file": "reachability_service.get_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "GetConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async", + "title": "ReachabilityService createConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", + "canonical": true, + "file": "reachability_service.create_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "test_id", + "type": "TYPE_STRING" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "CreateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async", + "title": "ReachabilityService updateConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", + "canonical": true, + "file": "reachability_service.update_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "resource", + "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "UpdateConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async", + "title": "ReachabilityService rerunConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", + "canonical": true, + "file": "reachability_service.rerun_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "RerunConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async", + "title": "ReachabilityService deleteConnectivityTest Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific `ConnectivityTest`.", + "canonical": true, + "file": "reachability_service.delete_connectivity_test.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ReachabilityServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" + }, + "method": { + "shortName": "DeleteConnectivityTest", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", + "service": { + "shortName": "ReachabilityService", + "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async", + "title": "ReachabilityService listVpcFlowLogsConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists all `VpcFlowLogsConfigs` in a given project.", + "canonical": true, + "file": "vpc_flow_logs_service.list_vpc_flow_logs_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 75, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVpcFlowLogsConfigs", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", + "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.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "ListVpcFlowLogsConfigs", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async", + "title": "ReachabilityService getVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Gets the details of a specific `VpcFlowLogsConfig`.", + "canonical": true, + "file": "vpc_flow_logs_service.get_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "GetVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async", + "title": "ReachabilityService createVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", + "canonical": true, + "file": "vpc_flow_logs_service.create_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "vpc_flow_logs_config_id", + "type": "TYPE_STRING" + }, + { + "name": "vpc_flow_logs_config", + "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "CreateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async", + "title": "ReachabilityService updateVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", + "canonical": true, + "file": "vpc_flow_logs_service.update_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "vpc_flow_logs_config", + "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "UpdateVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + }, + { + "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async", + "title": "ReachabilityService deleteVpcFlowLogsConfig Sample", + "origin": "API_DEFINITION", + "description": " Deletes a specific `VpcFlowLogsConfig`.", + "canonical": true, + "file": "vpc_flow_logs_service.delete_vpc_flow_logs_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "VpcFlowLogsServiceClient", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" + }, + "method": { + "shortName": "DeleteVpcFlowLogsConfig", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", + "service": { + "shortName": "VpcFlowLogsService", + "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js new file mode 100644 index 00000000000..be3d5827f4b --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js @@ -0,0 +1,73 @@ +// 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, vpcFlowLogsConfigId, vpcFlowLogsConfig) { + // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the VPC Flow Logs configuration to create: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Required. ID of the `VpcFlowLogsConfig`. + */ + // const vpcFlowLogsConfigId = 'abc123' + /** + * Required. A `VpcFlowLogsConfig` resource + */ + // const vpcFlowLogsConfig = {} + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callCreateVpcFlowLogsConfig() { + // Construct request + const request = { + parent, + vpcFlowLogsConfigId, + vpcFlowLogsConfig, + }; + + // Run request + const [operation] = await networkmanagementClient.createVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js new file mode 100644 index 00000000000..5c029e6248c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callDeleteVpcFlowLogsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networkmanagementClient.deleteVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js new file mode 100644 index 00000000000..7fca2193c11 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.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 networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + */ + // const name = 'abc123' + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callGetVpcFlowLogsConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networkmanagementClient.getVpcFlowLogsConfig(request); + console.log(response); + } + + callGetVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js new file mode 100644 index 00000000000..79caacd62bf --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js @@ -0,0 +1,83 @@ +// 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 networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + */ + // const parent = 'abc123' + /** + * Optional. Number of `VpcFlowLogsConfigs` to return. + */ + // const pageSize = 1234 + /** + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported CEL logic operators + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callListVpcFlowLogsConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networkmanagementClient.listVpcFlowLogsConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListVpcFlowLogsConfigs(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js new file mode 100644 index 00000000000..ee3fbc9e1fb --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js @@ -0,0 +1,68 @@ +// 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, vpcFlowLogsConfig) { + // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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. Mask of fields to update. At least one path must be supplied in + * this field. + */ + // const updateMask = {} + /** + * Required. Only fields specified in update_mask are updated. + */ + // const vpcFlowLogsConfig = {} + + // Imports the Networkmanagement library + const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; + + // Instantiates a client + const networkmanagementClient = new VpcFlowLogsServiceClient(); + + async function callUpdateVpcFlowLogsConfig() { + // Construct request + const request = { + updateMask, + vpcFlowLogsConfig, + }; + + // Run request + const [operation] = await networkmanagementClient.updateVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateVpcFlowLogsConfig(); + // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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-networkmanagement/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts new file mode 100644 index 00000000000..cdc6c3b552c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts @@ -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. ** + +import * as v1beta1 from './v1beta1'; +const ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; +type ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; +const VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; +type VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; +export {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; +export default {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..8318960dbe5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json @@ -0,0 +1,155 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.networkmanagement.v1beta1", + "libraryPackage": "@google-cloud/network-management", + "services": { + "ReachabilityService": { + "clients": { + "grpc": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ReachabilityServiceClient", + "rpcs": { + "GetConnectivityTest": { + "methods": [ + "getConnectivityTest" + ] + }, + "CreateConnectivityTest": { + "methods": [ + "createConnectivityTest" + ] + }, + "UpdateConnectivityTest": { + "methods": [ + "updateConnectivityTest" + ] + }, + "RerunConnectivityTest": { + "methods": [ + "rerunConnectivityTest" + ] + }, + "DeleteConnectivityTest": { + "methods": [ + "deleteConnectivityTest" + ] + }, + "ListConnectivityTests": { + "methods": [ + "listConnectivityTests", + "listConnectivityTestsStream", + "listConnectivityTestsAsync" + ] + } + } + } + } + }, + "VpcFlowLogsService": { + "clients": { + "grpc": { + "libraryClient": "VpcFlowLogsServiceClient", + "rpcs": { + "GetVpcFlowLogsConfig": { + "methods": [ + "getVpcFlowLogsConfig" + ] + }, + "CreateVpcFlowLogsConfig": { + "methods": [ + "createVpcFlowLogsConfig" + ] + }, + "UpdateVpcFlowLogsConfig": { + "methods": [ + "updateVpcFlowLogsConfig" + ] + }, + "DeleteVpcFlowLogsConfig": { + "methods": [ + "deleteVpcFlowLogsConfig" + ] + }, + "ListVpcFlowLogsConfigs": { + "methods": [ + "listVpcFlowLogsConfigs", + "listVpcFlowLogsConfigsStream", + "listVpcFlowLogsConfigsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "VpcFlowLogsServiceClient", + "rpcs": { + "GetVpcFlowLogsConfig": { + "methods": [ + "getVpcFlowLogsConfig" + ] + }, + "CreateVpcFlowLogsConfig": { + "methods": [ + "createVpcFlowLogsConfig" + ] + }, + "UpdateVpcFlowLogsConfig": { + "methods": [ + "updateVpcFlowLogsConfig" + ] + }, + "DeleteVpcFlowLogsConfig": { + "methods": [ + "deleteVpcFlowLogsConfig" + ] + }, + "ListVpcFlowLogsConfigs": { + "methods": [ + "listVpcFlowLogsConfigs", + "listVpcFlowLogsConfigsStream", + "listVpcFlowLogsConfigsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts new file mode 100644 index 00000000000..f8ad762c8da --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts @@ -0,0 +1,20 @@ +// 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 {ReachabilityServiceClient} from './reachability_service_client'; +export {VpcFlowLogsServiceClient} from './vpc_flow_logs_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts new file mode 100644 index 00000000000..b0e51c2f99b --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts @@ -0,0 +1,1647 @@ +// 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/v1beta1/reachability_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './reachability_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The Reachability service in the Google Cloud Network Management API provides + * services that analyze the reachability within a single Google Virtual Private + * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises + * networks, or between VPC networks and internet hosts. A reachability analysis + * is based on Google Cloud network configurations. + * + * You can use the analysis results to verify these configurations and + * to troubleshoot connectivity issues. + * @class + * @memberof v1beta1 + */ +export class ReachabilityServiceClient { + 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; + reachabilityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ReachabilityServiceClient. + * + * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; + 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 = 'networkmanagement.' + 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 = { + connectivityTestPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/global/connectivityTests/{test}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' + ), + }; + + // 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 = { + listConnectivityTests: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') + }; + + 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; + const createConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const updateConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; + const updateConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const rerunConnectivityTestResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; + const rerunConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const deleteConnectivityTestResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteConnectivityTestMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), + createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), + updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), + updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), + rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), + rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), + deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), + deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networkmanagement.v1beta1.ReachabilityService', 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.reachabilityServiceStub) { + return this.reachabilityServiceStub; + } + + // Put together the "service stub" for + // google.cloud.networkmanagement.v1beta1.ReachabilityService. + this.reachabilityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.ReachabilityService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networkmanagement.v1beta1.ReachabilityService, + 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 reachabilityServiceStubMethods = + ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; + for (const methodName of reachabilityServiceStubMethods) { + const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; + } + + /** + * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `ConnectivityTest` resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. + * 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/v1beta1/reachability_service.get_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async + */ + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|undefined, {}|undefined + ]>; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): void; + getConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, + protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); + } + +/** + * Creates a new Connectivity Test. + * After you create a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, containing non-existent resources in the network, or you + * don't have read permissions to the network configurations of listed + * projects), then the reachability result returns a value of `UNKNOWN`. + * + * If the endpoint specifications in `ConnectivityTest` are + * incomplete, the reachability result returns a value of + * AMBIGUOUS. For more information, + * see the Connectivity Test documentation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Test to create: + * `projects/{project_id}/locations/global` + * @param {string} request.testId + * Required. The logical name of the Connectivity Test in your project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-40 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource + * Required. A `ConnectivityTest` 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 + * 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/v1beta1/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async + */ + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, + 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.createConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createConnectivityTest()`. + * @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/v1beta1/reachability_service.create_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async + */ + async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the configuration of an existing `ConnectivityTest`. + * After you update a test, the reachability analysis is performed as part + * of the long running operation, which completes when the analysis completes. + * The Reachability state in the test resource is updated with the new result. + * + * If the endpoint specifications in `ConnectivityTest` are invalid + * (for example, they contain non-existent resources in the network, or the + * user does not have read permissions to the network configurations of + * listed projects), then the reachability result returns a value of + * UNKNOWN. + * + * If the endpoint specifications in `ConnectivityTest` are incomplete, the + * reachability result returns a value of `AMBIGUOUS`. See the documentation + * in `ConnectivityTest` for more details. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource + * Required. Only fields specified in update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, + 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({ + 'resource.name': request.resource!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateConnectivityTest()`. + * @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/v1beta1/reachability_service.update_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async + */ + async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Rerun an existing `ConnectivityTest`. + * After the user triggers the rerun, the reachability analysis is performed + * as part of the long running operation, which completes when the analysis + * completes. + * + * Even though the test configuration remains the same, the reachability + * result may change due to underlying network configuration changes. + * + * If the endpoint specifications in `ConnectivityTest` become invalid (for + * example, specified resources are deleted in the network, or you lost + * read permissions to the network configurations of listed projects), then + * the reachability result returns a value of `UNKNOWN`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async + */ + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + rerunConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, + 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.rerunConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `rerunConnectivityTest()`. + * @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/v1beta1/reachability_service.rerun_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async + */ + async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific `ConnectivityTest`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Connectivity Test resource name using the form: + * `projects/{project_id}/locations/global/connectivityTests/{test_id}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConnectivityTest( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, + 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.deleteConnectivityTest(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteConnectivityTest()`. + * @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/v1beta1/reachability_service.delete_connectivity_test.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async + */ + async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all Connectivity Tests owned by a project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. + * 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse + ]>; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; + listConnectivityTests( + request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; + listConnectivityTests( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>, + callback?: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` + * 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. + */ + listConnectivityTestsStream( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.createStream( + this.innerApiCalls.listConnectivityTests as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConnectivityTests`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the Connectivity Tests: + * `projects/{project_id}/locations/global` + * @param {number} request.pageSize + * Number of `ConnectivityTests` to return. + * @param {string} request.pageToken + * Page token from an earlier query, as returned in `next_page_token`. + * @param {string} request.filter + * Lists the `ConnectivityTests` that match the filter expression. A filter + * expression filters the resources listed in the response. The expression + * must be of the form ` ` where operators: `<`, `>`, + * `<=`, + * `>=`, + * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is + * roughly synonymous with equality). can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = "projects/proj-1/locations/global/connectivityTests/test-1 + * + * - Filter by labels: + * - Resources that have a key called `foo` + * labels.foo:* + * - Resources that have a key called `foo` whose value is `bar` + * labels.foo = bar + * @param {string} request.orderBy + * Field to use to sort the list. + * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. 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/v1beta1/reachability_service.list_connectivity_tests.js + * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async + */ + listConnectivityTestsAsync( + request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, + 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['listConnectivityTests']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConnectivityTests.asyncIterate( + this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. + * + * @param {string} project + * @param {string} test + * @returns {string} Resource name string. + */ + connectivityTestPath(project:string,test:string) { + return this.pathTemplates.connectivityTestPathTemplate.render({ + project: project, + test: test, + }); + } + + /** + * Parse the project from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; + } + + /** + * Parse the test from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the test. + */ + matchTestFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified vpcFlowLogsConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vpc_flow_logs_config + * @returns {string} Resource name string. + */ + vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ + project: project, + location: location, + vpc_flow_logs_config: vpcFlowLogsConfig, + }); + } + + /** + * Parse the project from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; + } + + /** + * Parse the location from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; + } + + /** + * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the vpc_flow_logs_config. + */ + matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; + } + + /** + * 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.reachabilityServiceStub && !this._terminated) { + return this.reachabilityServiceStub.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-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json new file mode 100644 index 00000000000..0d2fd849ae5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1beta1.ReachabilityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListConnectivityTests": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RerunConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnectivityTest": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json new file mode 100644 index 00000000000..54de9f63455 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" +] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts new file mode 100644 index 00000000000..d69b58611c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts @@ -0,0 +1,1523 @@ +// 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/v1beta1/vpc_flow_logs_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './vpc_flow_logs_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * The VPC Flow Logs service in the Google Cloud Network Management API provides + * configurations that generate Flow Logs. The service and the configuration + * resources created using this service are global. + * @class + * @memberof v1beta1 + */ +export class VpcFlowLogsServiceClient { + 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; + vpcFlowLogsServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of VpcFlowLogsServiceClient. + * + * @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 VpcFlowLogsServiceClient({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 VpcFlowLogsServiceClient; + 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 = 'networkmanagement.' + 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 = { + connectivityTestPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/global/connectivityTests/{test}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' + ), + }; + + // 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 = { + listVpcFlowLogsConfigs: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'vpcFlowLogsConfigs') + }; + + 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createVpcFlowLogsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; + const createVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const updateVpcFlowLogsConfigResponse = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; + const updateVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + const deleteVpcFlowLogsConfigResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createVpcFlowLogsConfigResponse.decode.bind(createVpcFlowLogsConfigResponse), + createVpcFlowLogsConfigMetadata.decode.bind(createVpcFlowLogsConfigMetadata)), + updateVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateVpcFlowLogsConfigResponse.decode.bind(updateVpcFlowLogsConfigResponse), + updateVpcFlowLogsConfigMetadata.decode.bind(updateVpcFlowLogsConfigMetadata)), + deleteVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteVpcFlowLogsConfigResponse.decode.bind(deleteVpcFlowLogsConfigResponse), + deleteVpcFlowLogsConfigMetadata.decode.bind(deleteVpcFlowLogsConfigMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networkmanagement.v1beta1.VpcFlowLogsService', 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.vpcFlowLogsServiceStub) { + return this.vpcFlowLogsServiceStub; + } + + // Put together the "service stub" for + // google.cloud.networkmanagement.v1beta1.VpcFlowLogsService. + this.vpcFlowLogsServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.VpcFlowLogsService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networkmanagement.v1beta1.VpcFlowLogsService, + 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 vpcFlowLogsServiceStubMethods = + ['listVpcFlowLogsConfigs', 'getVpcFlowLogsConfig', 'createVpcFlowLogsConfig', 'updateVpcFlowLogsConfig', 'deleteVpcFlowLogsConfig']; + for (const methodName of vpcFlowLogsServiceStubMethods) { + const callPromise = this.vpcFlowLogsServiceStub.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.vpcFlowLogsServiceStub; + } + + /** + * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific `VpcFlowLogsConfig`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. + * 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/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async + */ + getVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|undefined, {}|undefined + ]>; + getVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>): void; + getVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + callback: Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>): void; + getVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, + protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|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.getVpcFlowLogsConfig(request, options, callback); + } + +/** + * Creates a new `VpcFlowLogsConfig`. + * If a configuration with the exact same settings already exists (even if the + * ID is different), the creation fails. + * Notes: + * 1. Creating a configuration with state=DISABLED will fail. + * 2. The following fields are not considrered as `settings` for the purpose + * of the check mentioned above, therefore - creating another configuration + * with the same fields but different values for the following fields will + * fail as well: + * - name + * - create_time + * - update_time + * - labels + * - description + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VPC Flow Logs configuration to create: + * `projects/{project_id}/locations/global` + * @param {string} request.vpcFlowLogsConfigId + * Required. ID of the `VpcFlowLogsConfig`. + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig + * Required. A `VpcFlowLogsConfig` 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 + * 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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async + */ + createVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, + 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.createVpcFlowLogsConfig(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createVpcFlowLogsConfig()`. + * @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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async + */ + async checkCreateVpcFlowLogsConfigProgress(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.createVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an existing `VpcFlowLogsConfig`. + * If a configuration with the exact same settings already exists (even if the + * ID is different), the creation fails. + * Notes: + * 1. The following fields are not considrered as `settings` for the purpose + * of the check mentioned above, therefore - updating another configuration + * with the same fields but different values for the following fields will + * fail as well: + * - name + * - create_time + * - update_time + * - labels + * - description + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. + * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig + * Required. Only fields specified in update_mask are updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async + */ + updateVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, + 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({ + 'vpc_flow_logs_config.name': request.vpcFlowLogsConfig!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateVpcFlowLogsConfig(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateVpcFlowLogsConfig()`. + * @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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async + */ + async checkUpdateVpcFlowLogsConfigProgress(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.updateVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a specific `VpcFlowLogsConfig`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. `VpcFlowLogsConfig` resource name using the form: + * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async + */ + deleteVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVpcFlowLogsConfig( + request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteVpcFlowLogsConfig( + request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, + 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.deleteVpcFlowLogsConfig(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteVpcFlowLogsConfig()`. + * @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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async + */ + async checkDeleteVpcFlowLogsConfigProgress(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.deleteVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists all `VpcFlowLogsConfigs` in a given project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + * @param {number} [request.pageSize] + * Optional. Number of `VpcFlowLogsConfigs` to return. + * @param {string} [request.pageToken] + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + * @param {string} [request.filter] + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported [CEL logic operators] + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. + * 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 `listVpcFlowLogsConfigsAsync()` + * 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. + */ + listVpcFlowLogsConfigs( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse + ]>; + listVpcFlowLogsConfigs( + request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; + listVpcFlowLogsConfigs( + request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; + listVpcFlowLogsConfigs( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>, + callback?: PaginationCallback< + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): + Promise<[ + protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, + protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as 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.listVpcFlowLogsConfigs(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + * @param {number} [request.pageSize] + * Optional. Number of `VpcFlowLogsConfigs` to return. + * @param {string} [request.pageToken] + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + * @param {string} [request.filter] + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported [CEL logic operators] + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig} 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 `listVpcFlowLogsConfigsAsync()` + * 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. + */ + listVpcFlowLogsConfigsStream( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + 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['listVpcFlowLogsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVpcFlowLogsConfigs.createStream( + this.innerApiCalls.listVpcFlowLogsConfigs as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listVpcFlowLogsConfigs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the VpcFlowLogsConfig: + * `projects/{project_id}/locations/global` + * @param {number} [request.pageSize] + * Optional. Number of `VpcFlowLogsConfigs` to return. + * @param {string} [request.pageToken] + * Optional. Page token from an earlier query, as returned in + * `next_page_token`. + * @param {string} [request.filter] + * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. + * A filter expression must use the supported [CEL logic operators] + * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. 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/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js + * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async + */ + listVpcFlowLogsConfigsAsync( + request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, + 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['listVpcFlowLogsConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listVpcFlowLogsConfigs.asyncIterate( + this.innerApiCalls['listVpcFlowLogsConfigs'] 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 connectivityTest resource name string. + * + * @param {string} project + * @param {string} test + * @returns {string} Resource name string. + */ + connectivityTestPath(project:string,test:string) { + return this.pathTemplates.connectivityTestPathTemplate.render({ + project: project, + test: test, + }); + } + + /** + * Parse the project from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; + } + + /** + * Parse the test from ConnectivityTest resource. + * + * @param {string} connectivityTestName + * A fully-qualified path representing ConnectivityTest resource. + * @returns {string} A string representing the test. + */ + matchTestFromConnectivityTestName(connectivityTestName: string) { + return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; + } + + /** + * 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 project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified vpcFlowLogsConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} vpc_flow_logs_config + * @returns {string} Resource name string. + */ + vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ + project: project, + location: location, + vpc_flow_logs_config: vpcFlowLogsConfig, + }); + } + + /** + * Parse the project from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; + } + + /** + * Parse the location from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; + } + + /** + * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. + * + * @param {string} vpcFlowLogsConfigName + * A fully-qualified path representing VpcFlowLogsConfig resource. + * @returns {string} A string representing the vpc_flow_logs_config. + */ + matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { + return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; + } + + /** + * 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.vpcFlowLogsServiceStub && !this._terminated) { + return this.vpcFlowLogsServiceStub.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-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json new file mode 100644 index 00000000000..fd883cb5ab0 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListVpcFlowLogsConfigs": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVpcFlowLogsConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json new file mode 100644 index 00000000000..54de9f63455 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json @@ -0,0 +1,7 @@ +[ + "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", + "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" +] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..c429b7bd73d --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// 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 networkmanagement = require('@google-cloud/network-management'); + +function main() { + const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); + const vpcFlowLogsServiceClient = new networkmanagement.VpcFlowLogsServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..6ec4f20b4c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,38 @@ +// 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 {ReachabilityServiceClient, VpcFlowLogsServiceClient} from '@google-cloud/network-management'; + +// check that the client class type name can be used +function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { + client.close(); +} +function doStuffWithVpcFlowLogsServiceClient(client: VpcFlowLogsServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const reachabilityServiceClient = new ReachabilityServiceClient(); + doStuffWithReachabilityServiceClient(reachabilityServiceClient); + // check that the client instance can be created + const vpcFlowLogsServiceClient = new VpcFlowLogsServiceClient(); + doStuffWithVpcFlowLogsServiceClient(vpcFlowLogsServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts new file mode 100644 index 00000000000..279ec3242ac --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts @@ -0,0 +1,2064 @@ +// 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 reachabilityserviceModule 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('v1beta1.ReachabilityServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + 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 = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.servicePath; + assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + await client.initialize(); + assert(client.reachabilityServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.reachabilityServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.reachabilityServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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('getConnectivityTest', () => { + it('invokes getConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); + const [response] = await client.getConnectivityTest(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() + ); + client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnectivityTest( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnectivityTest with closed client', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConnectivityTest(request), expectedError); + }); + }); + + describe('createConnectivityTest', () => { + it('invokes createConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.createConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnectivityTest( + 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.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkCreateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateConnectivityTest', () => { + it('invokes updateConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnectivityTest( + 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.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() + ); + request.resource ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); + request.resource.name = defaultValue1; + const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkUpdateConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('rerunConnectivityTest', () => { + it('invokes rerunConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.rerunConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.rerunConnectivityTest( + 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.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.rerunConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes rerunConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.rerunConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRerunConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRerunConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkRerunConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteConnectivityTest', () => { + it('invokes deleteConnectivityTest without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConnectivityTest(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnectivityTest( + 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.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with call error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteConnectivityTest(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnectivityTest with LRO error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteConnectivityTest(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConnectivityTestProgress without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConnectivityTestProgress with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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.checkDeleteConnectivityTestProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listConnectivityTests', () => { + it('invokes listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); + const [response] = await client.listConnectivityTests(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests without error using callback', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnectivityTests( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConnectivityTests(request), expectedError); + const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectivityTestsStream without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { + 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.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConnectivityTestsStream with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectivityTestsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); + assert( + (client.descriptors.page.listConnectivityTests.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests without error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), + ]; + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; + const iterable = client.listConnectivityTestsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConnectivityTests with error', async () => { + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectivityTestsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + 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('connectivityTest', () => { + const fakePath = "/rendered/path/connectivityTest"; + const expectedParameters = { + project: "projectValue", + test: "testValue", + }; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectivityTestPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.connectivityTestPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('connectivityTestPath', () => { + const result = client.connectivityTestPath("projectValue", "testValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConnectivityTestName', () => { + const result = client.matchProjectFromConnectivityTestName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestFromConnectivityTestName', () => { + const result = client.matchTestFromConnectivityTestName(fakePath); + assert.strictEqual(result, "testValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('vpcFlowLogsConfig', () => { + const fakePath = "/rendered/path/vpcFlowLogsConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + vpc_flow_logs_config: "vpcFlowLogsConfigValue", + }; + const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('vpcFlowLogsConfigPath', () => { + const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVpcFlowLogsConfigName', () => { + const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVpcFlowLogsConfigName', () => { + const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { + const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "vpcFlowLogsConfigValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts new file mode 100644 index 00000000000..e972bc7a15c --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts @@ -0,0 +1,1948 @@ +// 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 vpcflowlogsserviceModule 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('v1beta1.VpcFlowLogsServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + 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 = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.servicePath; + assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); + await client.initialize(); + assert(client.vpcFlowLogsServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.vpcFlowLogsServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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('getVpcFlowLogsConfig', () => { + it('invokes getVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() + ); + client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getVpcFlowLogsConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() + ); + client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVpcFlowLogsConfig( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVpcFlowLogsConfig with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVpcFlowLogsConfig with closed client', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); + }); + }); + + describe('createVpcFlowLogsConfig', () => { + it('invokes createVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.createVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createVpcFlowLogsConfig( + 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.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVpcFlowLogsConfig with call error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVpcFlowLogsConfig with LRO error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createVpcFlowLogsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateVpcFlowLogsConfigProgress without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkCreateVpcFlowLogsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateVpcFlowLogsConfigProgress with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkCreateVpcFlowLogsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateVpcFlowLogsConfig', () => { + it('invokes updateVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateVpcFlowLogsConfig( + 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.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVpcFlowLogsConfig with call error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateVpcFlowLogsConfig with LRO error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() + ); + request.vpcFlowLogsConfig ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); + request.vpcFlowLogsConfig.name = defaultValue1; + const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateVpcFlowLogsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateVpcFlowLogsConfigProgress without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkUpdateVpcFlowLogsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateVpcFlowLogsConfigProgress with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkUpdateVpcFlowLogsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteVpcFlowLogsConfig', () => { + it('invokes deleteVpcFlowLogsConfig without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteVpcFlowLogsConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVpcFlowLogsConfig without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVpcFlowLogsConfig( + 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.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVpcFlowLogsConfig with call error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteVpcFlowLogsConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVpcFlowLogsConfig with LRO error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteVpcFlowLogsConfig(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteVpcFlowLogsConfigProgress without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkDeleteVpcFlowLogsConfigProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteVpcFlowLogsConfigProgress with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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.checkDeleteVpcFlowLogsConfigProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listVpcFlowLogsConfigs', () => { + it('invokes listVpcFlowLogsConfigs without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(expectedResponse); + const [response] = await client.listVpcFlowLogsConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVpcFlowLogsConfigs without error using callback', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVpcFlowLogsConfigs( + request, + (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVpcFlowLogsConfigs with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listVpcFlowLogsConfigs(request), expectedError); + const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVpcFlowLogsConfigsStream without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listVpcFlowLogsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { + 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.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listVpcFlowLogsConfigsStream with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listVpcFlowLogsConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; + stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVpcFlowLogsConfigs without error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), + ]; + client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; + const iterable = client.listVpcFlowLogsConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listVpcFlowLogsConfigs with error', async () => { + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listVpcFlowLogsConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listVpcFlowLogsConfigs.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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('connectivityTest', () => { + const fakePath = "/rendered/path/connectivityTest"; + const expectedParameters = { + project: "projectValue", + test: "testValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.connectivityTestPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.connectivityTestPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('connectivityTestPath', () => { + const result = client.connectivityTestPath("projectValue", "testValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConnectivityTestName', () => { + const result = client.matchProjectFromConnectivityTestName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTestFromConnectivityTestName', () => { + const result = client.matchTestFromConnectivityTestName(fakePath); + assert.strictEqual(result, "testValue"); + assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + 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('project', () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('vpcFlowLogsConfig', () => { + const fakePath = "/rendered/path/vpcFlowLogsConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + vpc_flow_logs_config: "vpcFlowLogsConfigValue", + }; + const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('vpcFlowLogsConfigPath', () => { + const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromVpcFlowLogsConfigName', () => { + const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromVpcFlowLogsConfigName', () => { + const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { + const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); + assert.strictEqual(result, "vpcFlowLogsConfigValue"); + assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js new file mode 100644 index 00000000000..d975be0ab73 --- /dev/null +++ b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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: 'ReachabilityService', + filename: './reachability-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From 2dcc48c0368950eba599f907ae70994cfbe5d2b7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 8 Nov 2024 09:13:35 +0000 Subject: [PATCH 4/4] =?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 --- .../v1/.eslintignore | 7 - .../v1/.eslintrc.json | 3 - .../v1/.gitignore | 14 - .../v1/.jsdoc.js | 55 - .../v1/.mocharc.js | 33 - .../v1/.prettierrc.js | 22 - .../v1/README.md | 1 - .../v1/package.json | 58 - .../v1/connectivity_test.proto | 422 - .../networkmanagement/v1/reachability.proto | 309 - .../cloud/networkmanagement/v1/trace.proto | 1872 - .../v1/protos/protos.d.ts | 14653 ------ .../v1/protos/protos.js | 40473 --------------- .../v1/protos/protos.json | 4280 -- ...bility_service.create_connectivity_test.js | 79 - ...bility_service.delete_connectivity_test.js | 63 - ...chability_service.get_connectivity_test.js | 62 - ...ability_service.list_connectivity_tests.js | 95 - ...ability_service.rerun_connectivity_test.js | 63 - ...bility_service.update_connectivity_test.js | 68 - ...ata_google.cloud.networkmanagement.v1.json | 283 - .../v1/src/index.ts | 25 - .../v1/src/v1/gapic_metadata.json | 87 - .../v1/src/v1/index.ts | 19 - .../v1/src/v1/reachability_service_client.ts | 1595 - .../reachability_service_client_config.json | 56 - .../v1/reachability_service_proto_list.json | 5 - .../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_reachability_service_v1.ts | 2018 - .../v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../v1beta1/.eslintignore | 7 - .../v1beta1/.eslintrc.json | 3 - .../v1beta1/.gitignore | 14 - .../v1beta1/.jsdoc.js | 55 - .../v1beta1/.mocharc.js | 33 - .../v1beta1/.prettierrc.js | 22 - .../v1beta1/README.md | 1 - .../v1beta1/package.json | 59 - .../v1beta1/connectivity_test.proto | 422 - .../v1beta1/reachability.proto | 304 - .../networkmanagement/v1beta1/trace.proto | 1876 - .../v1beta1/vpc_flow_logs.proto | 228 - .../v1beta1/vpc_flow_logs_config.proto | 152 - .../v1beta1/protos/protos.d.ts | 15637 ------ .../v1beta1/protos/protos.js | 42968 ---------------- .../v1beta1/protos/protos.json | 4682 -- ...bility_service.create_connectivity_test.js | 79 - ...bility_service.delete_connectivity_test.js | 63 - ...chability_service.get_connectivity_test.js | 62 - ...ability_service.list_connectivity_tests.js | 95 - ...ability_service.rerun_connectivity_test.js | 63 - ...bility_service.update_connectivity_test.js | 68 - ...oogle.cloud.networkmanagement.v1beta1.json | 511 - ...ogs_service.create_vpc_flow_logs_config.js | 73 - ...ogs_service.delete_vpc_flow_logs_config.js | 63 - ...w_logs_service.get_vpc_flow_logs_config.js | 62 - ...logs_service.list_vpc_flow_logs_configs.js | 83 - ...ogs_service.update_vpc_flow_logs_config.js | 68 - .../v1beta1/src/index.ts | 27 - .../v1beta1/src/v1beta1/gapic_metadata.json | 155 - .../v1beta1/src/v1beta1/index.ts | 20 - .../v1beta1/reachability_service_client.ts | 1647 - .../reachability_service_client_config.json | 56 - .../reachability_service_proto_list.json | 7 - .../v1beta1/vpc_flow_logs_service_client.ts | 1523 - .../vpc_flow_logs_service_client_config.json | 46 - .../vpc_flow_logs_service_proto_list.json | 7 - .../system-test/fixtures/sample/src/index.js | 28 - .../system-test/fixtures/sample/src/index.ts | 38 - .../v1beta1/system-test/install.ts | 49 - .../gapic_reachability_service_v1beta1.ts | 2064 - .../gapic_vpc_flow_logs_service_v1beta1.ts | 1948 - .../v1beta1/tsconfig.json | 19 - .../v1beta1/webpack.config.js | 64 - .../v1/connectivity_test.proto | 10 +- .../cloud/networkmanagement/v1/trace.proto | 11 +- .../protos/protos.d.ts | 15 +- .../protos/protos.js | 53 + .../protos/protos.json | 11 +- 82 files changed, 94 insertions(+), 142368 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.jsdoc.js deleted file mode 100644 index 22d92e8132c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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/network-management', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1/README.md deleted file mode 100644 index 90c3778ad46..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1/package.json deleted file mode 100644 index 607215c940a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "@google-cloud/network-management", - "version": "0.1.0", - "description": "Networkmanagement client for Node.js", - "repository": "googleapis/nodejs-networkmanagement", - "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 networkmanagement", - "networkmanagement", - "reachability service" - ], - "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-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto deleted file mode 100644 index e52ec167970..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/connectivity_test.proto +++ /dev/null @@ -1,422 +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.networkmanagement.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1/trace.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TestOuterClass"; -option java_package = "com.google.cloud.networkmanagement.v1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1"; - -// A Connectivity Test for a network reachability analysis. -message ConnectivityTest { - option (google.api.resource) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - pattern: "projects/{project}/locations/global/connectivityTests/{test}" - }; - - // Identifier. Unique name of the resource using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The user-supplied description of the Connectivity Test. - // Maximum of 512 characters. - string description = 2; - - // Required. Source specification of the Connectivity Test. - // - // You can use a combination of source IP address, virtual machine - // (VM) instance, or Compute Engine network to uniquely identify - // the source location. - // - // Examples: - // If the source IP address is an internal IP address within a Google Cloud - // Virtual Private Cloud (VPC) network, then you must also specify the VPC - // network. Otherwise, specify the VM instance, which already contains its - // internal IP address and VPC network information. - // - // If the source of the test is within an on-premises network, then you must - // provide the destination VPC network. - // - // If the source endpoint is a Compute Engine VM instance with multiple - // network interfaces, the instance itself is not sufficient to identify the - // endpoint. So, you must also specify the source IP address or VPC network. - // - // A reachability analysis proceeds even if the source location is - // ambiguous. However, the test result may include endpoints that you don't - // intend to test. - Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination specification of the Connectivity Test. - // - // You can use a combination of destination IP address, Compute Engine - // VM instance, or VPC network to uniquely identify the destination - // location. - // - // Even if the destination IP address is not unique, the source IP - // location is unique. Usually, the analysis can infer the destination - // endpoint from route information. - // - // If the destination you specify is a VM instance and the instance has - // multiple network interfaces, then you must also specify either - // a destination IP address or VPC network to identify the destination - // interface. - // - // A reachability analysis proceeds even if the destination location is - // ambiguous. However, the result can include endpoints that you don't - // intend to test. - Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; - - // IP Protocol of the test. When not provided, "TCP" is assumed. - string protocol = 5; - - // Other projects that may be relevant for reachability analysis. - // This is applicable to scenarios where a test can cross project boundaries. - repeated string related_projects = 6; - - // Output only. The display name of a Connectivity Test. - string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user-provided metadata. - map labels = 8; - - // Output only. The time the test was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the test's configuration was updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The reachability details of this test from the latest run. - // The details are updated when creating a new test, updating an - // existing test, or triggering a one-time rerun of an existing test. - ReachabilityDetails reachability_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The probing details of this test from the latest run, present - // for applicable tests only. The details are updated when creating a new - // test, updating an existing test, or triggering a one-time rerun of an - // existing test. - ProbingDetails probing_details = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether the test should skip firewall checking. - // If not provided, we assume false. - bool bypass_firewall_checks = 17; -} - -// Source or destination of the Connectivity Test. -message Endpoint { - // The type definition of an endpoint's network. Use one of the - // following choices: - enum NetworkType { - // Default type if unspecified. - NETWORK_TYPE_UNSPECIFIED = 0; - - // A network hosted within Google Cloud. - // To receive more detailed output, specify the URI for the source or - // destination network. - GCP_NETWORK = 1; - - // A network hosted outside of Google Cloud. - // This can be an on-premises network, or a network hosted by another cloud - // provider. - NON_GCP_NETWORK = 2; - } - - // Type of the target of a forwarding rule. - enum ForwardingRuleTarget { - // Forwarding rule target is unknown. - FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - - // Compute Engine instance for protocol forwarding. - INSTANCE = 1; - - // Load Balancer. The specific type can be found from [load_balancer_type] - // [google.cloud.networkmanagement.v1.Endpoint.load_balancer_type]. - LOAD_BALANCER = 2; - - // Classic Cloud VPN Gateway. - VPN_GATEWAY = 3; - - // Forwarding Rule is a Private Service Connect endpoint. - PSC = 4; - } - - // Wrapper for Cloud Function attributes. - message CloudFunctionEndpoint { - // A [Cloud Function](https://cloud.google.com/functions) name. - string uri = 1; - } - - // Wrapper for the App Engine service version attributes. - message AppEngineVersionEndpoint { - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - // name. - string uri = 1; - } - - // Wrapper for Cloud Run revision attributes. - message CloudRunRevisionEndpoint { - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - // URI. The format is: - // projects/{project}/locations/{location}/revisions/{revision} - string uri = 1; - } - - // The IP address of the endpoint, which can be an external or internal IP. - string ip_address = 1; - - // The IP protocol port of the endpoint. - // Only applicable when protocol is TCP or UDP. - int32 port = 2; - - // A Compute Engine instance URI. - string instance = 3; - - // A forwarding rule and its corresponding IP address represent the frontend - // configuration of a Google Cloud load balancer. Forwarding rules are also - // used for protocol forwarding, Private Service Connect and other network - // services to provide forwarding information in the control plane. Format: - // projects/{project}/global/forwardingRules/{id} or - // projects/{project}/regions/{region}/forwardingRules/{id} - string forwarding_rule = 13; - - // Output only. Specifies the type of the target of the forwarding rule. - optional ForwardingRuleTarget forwarding_rule_target = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the load balancer the forwarding rule points to. Empty - // for forwarding rules not related to load balancers. - optional string load_balancer_id = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Type of the load balancer the forwarding rule points to. - optional LoadBalancerType load_balancer_type = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A cluster URI for [Google Kubernetes Engine cluster control - // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - string gke_master_cluster = 7; - - // DNS endpoint of [Google Kubernetes Engine cluster control - // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - // Requires gke_master_cluster to be set, can't be used simultaneoulsly with - // ip_address or network. Applicable only to destination endpoint. - string fqdn = 19; - - // A [Cloud SQL](https://cloud.google.com/sql) instance URI. - string cloud_sql_instance = 8; - - // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - // URI. - string redis_instance = 17; - - // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - // URI. - string redis_cluster = 18; - - // A [Cloud Function](https://cloud.google.com/functions). - CloudFunctionEndpoint cloud_function = 10; - - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - AppEngineVersionEndpoint app_engine_version = 11; - - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - CloudRunRevisionEndpoint cloud_run_revision = 12; - - // A Compute Engine network URI. - string network = 4; - - // Type of the network where the endpoint is located. - // Applicable only to source endpoint, as destination network type can be - // inferred from the source. - NetworkType network_type = 5; - - // Project ID where the endpoint is located. - // The Project ID can be derived from the URI if you provide a VM instance or - // network URI. - // The following are two cases where you must provide the project ID: - // 1. Only the IP address is specified, and the IP address is within a Google - // Cloud project. - // 2. When you are using Shared VPC and the IP address that you provide is - // from the service project. In this case, the network that the IP address - // resides in is defined in the host project. - string project_id = 6; -} - -// Results of the configuration analysis from the last run of the test. -message ReachabilityDetails { - // The overall result of the test's configuration analysis. - enum Result { - // No result was specified. - RESULT_UNSPECIFIED = 0; - - // Possible scenarios are: - // - // * The configuration analysis determined that a packet originating from - // the source is expected to reach the destination. - // * The analysis didn't complete because the user lacks permission for - // some of the resources in the trace. However, at the time the user's - // permission became insufficient, the trace had been successful so far. - REACHABLE = 1; - - // A packet originating from the source is expected to be dropped before - // reaching the destination. - UNREACHABLE = 2; - - // The source and destination endpoints do not uniquely identify - // the test location in the network, and the reachability result contains - // multiple traces. For some traces, a packet could be delivered, and for - // others, it would not be. This result is also assigned to - // configuration analysis of return path if on its own it should be - // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. - AMBIGUOUS = 4; - - // The configuration analysis did not complete. Possible reasons are: - // - // * A permissions error occurred--for example, the user might not have - // read permission for all of the resources named in the test. - // * An internal error occurred. - // * The analyzer received an invalid or unsupported argument or was unable - // to identify a known endpoint. - UNDETERMINED = 5; - } - - // The overall result of the test's configuration analysis. - Result result = 1; - - // The time of the configuration analysis. - google.protobuf.Timestamp verify_time = 2; - - // The details of a failure or a cancellation of reachability analysis. - google.rpc.Status error = 3; - - // Result may contain a list of traces if a test has multiple possible - // paths in the network, such as when destination endpoint is a load balancer - // with multiple backends. - repeated Trace traces = 5; -} - -// Latency percentile rank and value. -message LatencyPercentile { - // Percentage of samples this data point applies to. - int32 percent = 1; - - // percent-th percentile of latency observed, in microseconds. - // Fraction of percent/100 of samples have latency lower or - // equal to the value of this field. - int64 latency_micros = 2; -} - -// Describes measured latency distribution. -message LatencyDistribution { - // Representative latency percentiles. - repeated LatencyPercentile latency_percentiles = 1; -} - -// Results of active probing from the last run of the test. -message ProbingDetails { - // Overall probing result of the test. - enum ProbingResult { - // No result was specified. - PROBING_RESULT_UNSPECIFIED = 0; - - // At least 95% of packets reached the destination. - REACHABLE = 1; - - // No packets reached the destination. - UNREACHABLE = 2; - - // Less than 95% of packets reached the destination. - REACHABILITY_INCONSISTENT = 3; - - // Reachability could not be determined. Possible reasons are: - // * The user lacks permission to access some of the network resources - // required to run the test. - // * No valid source endpoint could be derived from the request. - // * An internal error occurred. - UNDETERMINED = 4; - } - - // Abort cause types. - enum ProbingAbortCause { - // No reason was specified. - PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - - // The user lacks permission to access some of the - // network resources required to run the test. - PERMISSION_DENIED = 1; - - // No valid source endpoint could be derived from the request. - NO_SOURCE_LOCATION = 2; - } - - // Representation of a network edge location as per - // https://cloud.google.com/vpc/docs/edge-locations. - message EdgeLocation { - // Name of the metropolitan area. - string metropolitan_area = 1; - } - - // The overall result of active probing. - ProbingResult result = 1; - - // The time that reachability was assessed through active probing. - google.protobuf.Timestamp verify_time = 2; - - // Details about an internal failure or the cancellation of active probing. - google.rpc.Status error = 3; - - // The reason probing was aborted. - ProbingAbortCause abort_cause = 4; - - // Number of probes sent. - int32 sent_probe_count = 5; - - // Number of probes that reached the destination. - int32 successful_probe_count = 6; - - // The source and destination endpoints derived from the test input and used - // for active probing. - EndpointInfo endpoint_info = 7; - - // Latency as measured by active probing in one direction: - // from the source to the destination endpoint. - LatencyDistribution probing_latency = 8; - - // The EdgeLocation from which a packet destined for/originating from the - // internet will egress/ingress the Google network. - // This will only be populated for a connectivity test which has an internet - // destination/source address. - // The absence of this field *must not* be used as an indication that the - // destination/source is part of the Google network. - EdgeLocation destination_egress_location = 9; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto deleted file mode 100644 index e6ece7d335f..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/reachability.proto +++ /dev/null @@ -1,309 +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.networkmanagement.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1/connectivity_test.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "ReachabilityServiceProto"; -option java_package = "com.google.cloud.networkmanagement.v1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1"; - -// The Reachability service in Google Cloud Network Management API - -// The Reachability service in the Google Cloud Network Management API provides -// services that analyze the reachability within a single Google Virtual Private -// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises -// networks, or between VPC networks and internet hosts. A reachability analysis -// is based on Google Cloud network configurations. -// -// You can use the analysis results to verify these configurations and -// to troubleshoot connectivity issues. -service ReachabilityService { - option (google.api.default_host) = "networkmanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all Connectivity Tests owned by a project. - rpc ListConnectivityTests(ListConnectivityTestsRequest) - returns (ListConnectivityTestsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/global}/connectivityTests" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific Connectivity Test. - rpc GetConnectivityTest(GetConnectivityTestRequest) - returns (ConnectivityTest) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/global/connectivityTests/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new Connectivity Test. - // After you create a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, containing non-existent resources in the network, or you - // don't have read permissions to the network configurations of listed - // projects), then the reachability result returns a value of `UNKNOWN`. - // - // If the endpoint specifications in `ConnectivityTest` are - // incomplete, the reachability result returns a value of - // AMBIGUOUS. For more information, - // see the Connectivity Test documentation. - rpc CreateConnectivityTest(CreateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/global}/connectivityTests" - body: "resource" - }; - option (google.api.method_signature) = "parent,test_id,resource"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Updates the configuration of an existing `ConnectivityTest`. - // After you update a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // The Reachability state in the test resource is updated with the new result. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, they contain non-existent resources in the network, or the - // user does not have read permissions to the network configurations of - // listed projects), then the reachability result returns a value of - // UNKNOWN. - // - // If the endpoint specifications in `ConnectivityTest` are incomplete, the - // reachability result returns a value of `AMBIGUOUS`. See the documentation - // in `ConnectivityTest` for more details. - rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}" - body: "resource" - }; - option (google.api.method_signature) = "update_mask,resource"; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Rerun an existing `ConnectivityTest`. - // After the user triggers the rerun, the reachability analysis is performed - // as part of the long running operation, which completes when the analysis - // completes. - // - // Even though the test configuration remains the same, the reachability - // result may change due to underlying network configuration changes. - // - // If the endpoint specifications in `ConnectivityTest` become invalid (for - // example, specified resources are deleted in the network, or you lost - // read permissions to the network configurations of listed projects), then - // the reachability result returns a value of `UNKNOWN`. - rpc RerunConnectivityTest(RerunConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a specific `ConnectivityTest`. - rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/global/connectivityTests/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } -} - -// Request for the `ListConnectivityTests` method. -message ListConnectivityTestsRequest { - // Required. The parent resource of the Connectivity Tests: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Number of `ConnectivityTests` to return. - int32 page_size = 2; - - // Page token from an earlier query, as returned in `next_page_token`. - string page_token = 3; - - // Lists the `ConnectivityTests` that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form ` ` where operators: `<`, `>`, - // `<=`, - // `>=`, - // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - // roughly synonymous with equality). can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/proj-1/locations/global/connectivityTests/test-1 - // - // - Filter by labels: - // - Resources that have a key called `foo` - // labels.foo:* - // - Resources that have a key called `foo` whose value is `bar` - // labels.foo = bar - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -// Response for the `ListConnectivityTests` method. -message ListConnectivityTestsResponse { - // List of Connectivity Tests. - repeated ConnectivityTest resources = 1; - - // Page token to fetch the next set of Connectivity Tests. - string next_page_token = 2; - - // Locations that could not be reached (when querying all locations with `-`). - repeated string unreachable = 3; -} - -// Request for the `GetConnectivityTest` method. -message GetConnectivityTestRequest { - // Required. `ConnectivityTest` resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `CreateConnectivityTest` method. -message CreateConnectivityTestRequest { - // Required. The parent resource of the Connectivity Test to create: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The logical name of the Connectivity Test in your project - // with the following restrictions: - // - // * Must contain only lowercase letters, numbers, and hyphens. - // * Must start with a letter. - // * Must be between 1-40 characters. - // * Must end with a number or a letter. - // * Must be unique within the customer project - string test_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A `ConnectivityTest` resource - ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `UpdateConnectivityTest` method. -message UpdateConnectivityTestRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `DeleteConnectivityTest` method. -message DeleteConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `RerunConnectivityTest` method. -message RerunConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Metadata describing an [Operation][google.longrunning.Operation] -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Target of the operation - for example - // projects/project-1/locations/global/connectivityTests/test-1 - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // Human-readable status of the operation, if any. - string status_detail = 5; - - // Specifies if cancellation was requested for the operation. - bool cancel_requested = 6; - - // API version. - string api_version = 7; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto deleted file mode 100644 index 64494adefe2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/google/cloud/networkmanagement/v1/trace.proto +++ /dev/null @@ -1,1872 +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.networkmanagement.v1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TraceProto"; -option java_package = "com.google.cloud.networkmanagement.v1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1"; - -// Trace represents one simulated packet forwarding path. -// -// * Each trace contains multiple ordered steps. -// * Each step is in a particular state with associated configuration. -// * State is categorized as final or non-final states. -// * Each final state has a reason associated. -// * Each trace must end with a final state (the last step). -// ``` -// |---------------------Trace----------------------| -// Step1(State) Step2(State) --- StepN(State(final)) -// ``` -message Trace { - // Derived from the source and destination endpoints definition specified by - // user request, and validated by the data plane model. - // If there are multiple traces starting from different source locations, then - // the endpoint_info may be different between traces. - EndpointInfo endpoint_info = 1; - - // A trace of a test contains multiple steps from the initial state to the - // final state (delivered, dropped, forwarded, or aborted). - // - // The steps are ordered by the processing sequence within the simulated - // network state machine. It is critical to preserve the order of the steps - // and avoid reordering or sorting them. - repeated Step steps = 2; - - // ID of trace. For forward traces, this ID is unique for each trace. For - // return traces, it matches ID of associated forward trace. A single forward - // trace can be associated with none, one or more than one return trace. - int32 forward_trace_id = 4; -} - -// A simulated forwarding path is composed of multiple steps. -// Each step has a well-defined state and an associated configuration. -message Step { - // Type of states that are defined in the network state machine. - // Each step in the packet trace is in a specific state. - enum State { - // Unspecified state. - STATE_UNSPECIFIED = 0; - - // Initial state: packet originating from a Compute Engine instance. - // An InstanceInfo is populated with starting instance information. - START_FROM_INSTANCE = 1; - - // Initial state: packet originating from the internet. - // The endpoint information is populated. - START_FROM_INTERNET = 2; - - // Initial state: packet originating from a Google service. - // The google_service information is populated. - START_FROM_GOOGLE_SERVICE = 27; - - // Initial state: packet originating from a VPC or on-premises network - // with internal source IP. - // If the source is a VPC network visible to the user, a NetworkInfo - // is populated with details of the network. - START_FROM_PRIVATE_NETWORK = 3; - - // Initial state: packet originating from a Google Kubernetes Engine cluster - // master. A GKEMasterInfo is populated with starting instance information. - START_FROM_GKE_MASTER = 21; - - // Initial state: packet originating from a Cloud SQL instance. - // A CloudSQLInstanceInfo is populated with starting instance information. - START_FROM_CLOUD_SQL_INSTANCE = 22; - - // Initial state: packet originating from a Redis instance. - // A RedisInstanceInfo is populated with starting instance information. - START_FROM_REDIS_INSTANCE = 32; - - // Initial state: packet originating from a Redis Cluster. - // A RedisClusterInfo is populated with starting Cluster information. - START_FROM_REDIS_CLUSTER = 33; - - // Initial state: packet originating from a Cloud Function. - // A CloudFunctionInfo is populated with starting function information. - START_FROM_CLOUD_FUNCTION = 23; - - // Initial state: packet originating from an App Engine service version. - // An AppEngineVersionInfo is populated with starting version information. - START_FROM_APP_ENGINE_VERSION = 25; - - // Initial state: packet originating from a Cloud Run revision. - // A CloudRunRevisionInfo is populated with starting revision information. - START_FROM_CLOUD_RUN_REVISION = 26; - - // Initial state: packet originating from a Storage Bucket. Used only for - // return traces. - // The storage_bucket information is populated. - START_FROM_STORAGE_BUCKET = 29; - - // Initial state: packet originating from a published service that uses - // Private Service Connect. Used only for return traces. - START_FROM_PSC_PUBLISHED_SERVICE = 30; - - // Initial state: packet originating from a serverless network endpoint - // group backend. Used only for return traces. - // The serverless_neg information is populated. - START_FROM_SERVERLESS_NEG = 31; - - // Config checking state: verify ingress firewall rule. - APPLY_INGRESS_FIREWALL_RULE = 4; - - // Config checking state: verify egress firewall rule. - APPLY_EGRESS_FIREWALL_RULE = 5; - - // Config checking state: verify route. - APPLY_ROUTE = 6; - - // Config checking state: match forwarding rule. - APPLY_FORWARDING_RULE = 7; - - // Config checking state: verify load balancer backend configuration. - ANALYZE_LOAD_BALANCER_BACKEND = 28; - - // Config checking state: packet sent or received under foreign IP - // address and allowed. - SPOOFING_APPROVED = 8; - - // Forwarding state: arriving at a Compute Engine instance. - ARRIVE_AT_INSTANCE = 9; - - // Forwarding state: arriving at a Compute Engine internal load balancer. - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; - - // Forwarding state: arriving at a Compute Engine external load balancer. - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; - - // Forwarding state: arriving at a Cloud VPN gateway. - ARRIVE_AT_VPN_GATEWAY = 12; - - // Forwarding state: arriving at a Cloud VPN tunnel. - ARRIVE_AT_VPN_TUNNEL = 13; - - // Forwarding state: arriving at a VPC connector. - ARRIVE_AT_VPC_CONNECTOR = 24; - - // Transition state: packet header translated. - NAT = 14; - - // Transition state: original connection is terminated and a new proxied - // connection is initiated. - PROXY_CONNECTION = 15; - - // Final state: packet could be delivered. - DELIVER = 16; - - // Final state: packet could be dropped. - DROP = 17; - - // Final state: packet could be forwarded to a network with an unknown - // configuration. - FORWARD = 18; - - // Final state: analysis is aborted. - ABORT = 19; - - // Special state: viewer of the test result does not have permission to - // see the configuration in this step. - VIEWER_PERMISSION_MISSING = 20; - } - - // A description of the step. Usually this is a summary of the state. - string description = 1; - - // Each step is in one of the pre-defined states. - State state = 2; - - // This is a step that leads to the final state Drop. - bool causes_drop = 3; - - // Project ID that contains the configuration this step is validating. - string project_id = 4; - - // Configuration or metadata associated with each step. - // The configuration is filtered based on viewer's permission. If a viewer - // has no permission to view the configuration in this step, for non-final - // states a special state is populated (VIEWER_PERMISSION_MISSING), and for - // final state the configuration is cleared. - oneof step_info { - // Display information of a Compute Engine instance. - InstanceInfo instance = 5; - - // Display information of a Compute Engine firewall rule. - FirewallInfo firewall = 6; - - // Display information of a Compute Engine route. - RouteInfo route = 7; - - // Display information of the source and destination under analysis. - // The endpoint information in an intermediate state may differ with the - // initial input, as it might be modified by state like NAT, - // or Connection Proxy. - EndpointInfo endpoint = 8; - - // Display information of a Google service - GoogleServiceInfo google_service = 24; - - // Display information of a Compute Engine forwarding rule. - ForwardingRuleInfo forwarding_rule = 9; - - // Display information of a Compute Engine VPN gateway. - VpnGatewayInfo vpn_gateway = 10; - - // Display information of a Compute Engine VPN tunnel. - VpnTunnelInfo vpn_tunnel = 11; - - // Display information of a VPC connector. - VpcConnectorInfo vpc_connector = 21; - - // Display information of the final state "deliver" and reason. - DeliverInfo deliver = 12; - - // Display information of the final state "forward" and reason. - ForwardInfo forward = 13; - - // Display information of the final state "abort" and reason. - AbortInfo abort = 14; - - // Display information of the final state "drop" and reason. - DropInfo drop = 15; - - // Display information of the load balancers. Deprecated in favor of the - // `load_balancer_backend_info` field, not used in new tests. - LoadBalancerInfo load_balancer = 16 [deprecated = true]; - - // Display information of a Google Cloud network. - NetworkInfo network = 17; - - // Display information of a Google Kubernetes Engine cluster master. - GKEMasterInfo gke_master = 18; - - // Display information of a Cloud SQL instance. - CloudSQLInstanceInfo cloud_sql_instance = 19; - - // Display information of a Redis Instance. - RedisInstanceInfo redis_instance = 30; - - // Display information of a Redis Cluster. - RedisClusterInfo redis_cluster = 31; - - // Display information of a Cloud Function. - CloudFunctionInfo cloud_function = 20; - - // Display information of an App Engine service version. - AppEngineVersionInfo app_engine_version = 22; - - // Display information of a Cloud Run revision. - CloudRunRevisionInfo cloud_run_revision = 23; - - // Display information of a NAT. - NatInfo nat = 25; - - // Display information of a ProxyConnection. - ProxyConnectionInfo proxy_connection = 26; - - // Display information of a specific load balancer backend. - LoadBalancerBackendInfo load_balancer_backend_info = 27; - - // Display information of a Storage Bucket. Used only for return traces. - StorageBucketInfo storage_bucket = 28; - - // Display information of a Serverless network endpoint group backend. Used - // only for return traces. - ServerlessNegInfo serverless_neg = 29; - } -} - -// For display only. Metadata associated with a Compute Engine instance. -message InstanceInfo { - // Name of a Compute Engine instance. - string display_name = 1; - - // URI of a Compute Engine instance. - string uri = 2; - - // Name of the network interface of a Compute Engine instance. - string interface = 3; - - // URI of a Compute Engine network. - string network_uri = 4; - - // Internal IP address of the network interface. - string internal_ip = 5; - - // External IP address of the network interface. - string external_ip = 6; - - // Network tags configured on the instance. - repeated string network_tags = 7; - - // Service account authorized for the instance. - string service_account = 8 [deprecated = true]; - - // URI of the PSC network attachment the NIC is attached to (if relevant). - string psc_network_attachment_uri = 9; -} - -// For display only. Metadata associated with a Compute Engine network. -// Next ID: 7 -message NetworkInfo { - // Name of a Compute Engine network. - string display_name = 1; - - // URI of a Compute Engine network. - string uri = 2; - - // URI of the subnet matching the source IP address of the test. - string matched_subnet_uri = 5; - - // The IP range of the subnet matching the source IP address of the test. - string matched_ip_range = 4; - - // The region of the subnet matching the source IP address of the test. - string region = 6; -} - -// For display only. Metadata associated with a VPC firewall rule, an implied -// VPC firewall rule, or a firewall policy rule. -message FirewallInfo { - // The firewall rule's type. - enum FirewallRuleType { - // Unspecified type. - FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - - // Hierarchical firewall policy rule. For details, see - // [Hierarchical firewall policies - // overview](https://cloud.google.com/vpc/docs/firewall-policies). - HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - - // VPC firewall rule. For details, see - // [VPC firewall rules - // overview](https://cloud.google.com/vpc/docs/firewalls). - VPC_FIREWALL_RULE = 2; - - // Implied VPC firewall rule. For details, see - // [Implied - // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - IMPLIED_VPC_FIREWALL_RULE = 3; - - // Implicit firewall rules that are managed by serverless VPC access to - // allow ingress access. They are not visible in the Google Cloud console. - // For details, see [VPC connector's implicit - // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; - - // Global network firewall policy rule. - // For details, see [Network firewall - // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - NETWORK_FIREWALL_POLICY_RULE = 5; - - // Regional network firewall policy rule. - // For details, see [Regional network firewall - // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; - - // Firewall policy rule containing attributes not yet supported in - // Connectivity tests. Firewall analysis is skipped if such a rule can - // potentially be matched. Please see the [list of unsupported - // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). - UNSUPPORTED_FIREWALL_POLICY_RULE = 100; - - // Tracking state for response traffic created when request traffic goes - // through allow firewall rule. - // For details, see [firewall rules - // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) - TRACKING_STATE = 101; - } - - // The display name of the firewall rule. This field might be empty for - // firewall policy rules. - string display_name = 1; - - // The URI of the firewall rule. This field is not applicable to implied - // VPC firewall rules. - string uri = 2; - - // Possible values: INGRESS, EGRESS - string direction = 3; - - // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - string action = 4; - - // The priority of the firewall rule. - int32 priority = 5; - - // The URI of the VPC network that the firewall rule is associated with. - // This field is not applicable to hierarchical firewall policy rules. - string network_uri = 6; - - // The target tags defined by the VPC firewall rule. This field is not - // applicable to firewall policy rules. - repeated string target_tags = 7; - - // The target service accounts specified by the firewall rule. - repeated string target_service_accounts = 8; - - // The name of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy = 9; - - // The URI of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy_uri = 11; - - // The firewall rule's type. - FirewallRuleType firewall_rule_type = 10; -} - -// For display only. Metadata associated with a Compute Engine route. -message RouteInfo { - // Type of route: - enum RouteType { - // Unspecified type. Default value. - ROUTE_TYPE_UNSPECIFIED = 0; - - // Route is a subnet route automatically created by the system. - SUBNET = 1; - - // Static route created by the user, including the default route to the - // internet. - STATIC = 2; - - // Dynamic route exchanged between BGP peers. - DYNAMIC = 3; - - // A subnet route received from peering network. - PEERING_SUBNET = 4; - - // A static route received from peering network. - PEERING_STATIC = 5; - - // A dynamic route received from peering network. - PEERING_DYNAMIC = 6; - - // Policy based route. - POLICY_BASED = 7; - - // Advertised route. Synthetic route which is used to transition from the - // StartFromPrivateNetwork state in Connectivity tests. - ADVERTISED = 101; - } - - // Type of next hop: - enum NextHopType { - // Unspecified type. Default value. - NEXT_HOP_TYPE_UNSPECIFIED = 0; - - // Next hop is an IP address. - NEXT_HOP_IP = 1; - - // Next hop is a Compute Engine instance. - NEXT_HOP_INSTANCE = 2; - - // Next hop is a VPC network gateway. - NEXT_HOP_NETWORK = 3; - - // Next hop is a peering VPC. - NEXT_HOP_PEERING = 4; - - // Next hop is an interconnect. - NEXT_HOP_INTERCONNECT = 5; - - // Next hop is a VPN tunnel. - NEXT_HOP_VPN_TUNNEL = 6; - - // Next hop is a VPN gateway. This scenario only happens when tracing - // connectivity from an on-premises network to Google Cloud through a VPN. - // The analysis simulates a packet departing from the on-premises network - // through a VPN tunnel and arriving at a Cloud VPN gateway. - NEXT_HOP_VPN_GATEWAY = 7; - - // Next hop is an internet gateway. - NEXT_HOP_INTERNET_GATEWAY = 8; - - // Next hop is blackhole; that is, the next hop either does not exist or is - // not running. - NEXT_HOP_BLACKHOLE = 9; - - // Next hop is the forwarding rule of an Internal Load Balancer. - NEXT_HOP_ILB = 10; - - // Next hop is a - // [router appliance - // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - NEXT_HOP_ROUTER_APPLIANCE = 11; - - // Next hop is an NCC hub. - NEXT_HOP_NCC_HUB = 12; - } - - // Indicates where routes are applicable. - enum RouteScope { - // Unspecified scope. Default value. - ROUTE_SCOPE_UNSPECIFIED = 0; - - // Route is applicable to packets in Network. - NETWORK = 1; - - // Route is applicable to packets using NCC Hub's routing table. - NCC_HUB = 2; - } - - // Type of route. - RouteType route_type = 8; - - // Type of next hop. - NextHopType next_hop_type = 9; - - // Indicates where route is applicable. - RouteScope route_scope = 14; - - // Name of a route. - string display_name = 1; - - // URI of a route (if applicable). - string uri = 2; - - // Region of the route (if applicable). - string region = 19; - - // Destination IP range of the route. - string dest_ip_range = 3; - - // Next hop of the route. - string next_hop = 4; - - // URI of a Compute Engine network. NETWORK routes only. - string network_uri = 5; - - // Priority of the route. - int32 priority = 6; - - // Instance tags of the route. - repeated string instance_tags = 7; - - // Source IP address range of the route. Policy based routes only. - string src_ip_range = 10; - - // Destination port ranges of the route. Policy based routes only. - repeated string dest_port_ranges = 11; - - // Source port ranges of the route. Policy based routes only. - repeated string src_port_ranges = 12; - - // Protocols of the route. Policy based routes only. - repeated string protocols = 13; - - // URI of a NCC Hub. NCC_HUB routes only. - optional string ncc_hub_uri = 15; - - // URI of a NCC Spoke. NCC_HUB routes only. - optional string ncc_spoke_uri = 16; - - // For advertised dynamic routes, the URI of the Cloud Router that advertised - // the corresponding IP prefix. - optional string advertised_route_source_router_uri = 17; - - // For advertised routes, the URI of their next hop, i.e. the URI of the - // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - // the advertised prefix is advertised through, or URI of the source peered - // network. - optional string advertised_route_next_hop_uri = 18; -} - -// For display only. Details of a Google Service sending packets to a -// VPC network. Although the source IP might be a publicly routable address, -// some Google Services use special routes within Google production -// infrastructure to reach Compute Engine Instances. -// https://cloud.google.com/vpc/docs/routes#special_return_paths -message GoogleServiceInfo { - // Recognized type of a Google Service. - enum GoogleServiceType { - // Unspecified Google Service. - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; - - // Identity aware proxy. - // https://cloud.google.com/iap/docs/using-tcp-forwarding - IAP = 1; - - // One of two services sharing IP ranges: - // * Load Balancer proxy - // * Centralized Health Check prober - // https://cloud.google.com/load-balancing/docs/firewall-rules - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; - - // Connectivity from Cloud DNS to forwarding targets or alternate name - // servers that use private routing. - // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - // https://cloud.google.com/dns/docs/policies#firewall-rules - CLOUD_DNS = 3; - - // private.googleapis.com and restricted.googleapis.com - GOOGLE_API = 4; - - // Google API via Private Service Connect. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_PSC = 5; - - // Google API via VPC Service Controls. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_VPC_SC = 6; - } - - // Source IP address. - string source_ip = 1; - - // Recognized type of a Google Service. - GoogleServiceType google_service_type = 2; -} - -// For display only. Metadata associated with a Compute Engine forwarding rule. -message ForwardingRuleInfo { - // Name of the forwarding rule. - string display_name = 1; - - // URI of the forwarding rule. - string uri = 2; - - // Protocol defined in the forwarding rule that matches the packet. - string matched_protocol = 3; - - // Port range defined in the forwarding rule that matches the packet. - string matched_port_range = 6; - - // VIP of the forwarding rule. - string vip = 4; - - // Target type of the forwarding rule. - string target = 5; - - // Network URI. - string network_uri = 7; - - // Region of the forwarding rule. Set only for regional forwarding rules. - string region = 8; - - // Name of the load balancer the forwarding rule belongs to. Empty for - // forwarding rules not related to load balancers (like PSC forwarding rules). - string load_balancer_name = 9; - - // URI of the PSC service attachment this forwarding rule targets (if - // applicable). - string psc_service_attachment_uri = 10; - - // PSC Google API target this forwarding rule targets (if applicable). - string psc_google_api_target = 11; -} - -// For display only. Metadata associated with a load balancer. -message LoadBalancerInfo { - // The type definition for a load balancer: - enum LoadBalancerType { - // Type is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Internal TCP/UDP load balancer. - INTERNAL_TCP_UDP = 1; - - // Network TCP/UDP load balancer. - NETWORK_TCP_UDP = 2; - - // HTTP(S) proxy load balancer. - HTTP_PROXY = 3; - - // TCP proxy load balancer. - TCP_PROXY = 4; - - // SSL proxy load balancer. - SSL_PROXY = 5; - } - - // The type definition for a load balancer backend configuration: - enum BackendType { - // Type is unspecified. - BACKEND_TYPE_UNSPECIFIED = 0; - - // Backend Service as the load balancer's backend. - BACKEND_SERVICE = 1; - - // Target Pool as the load balancer's backend. - TARGET_POOL = 2; - - // Target Instance as the load balancer's backend. - TARGET_INSTANCE = 3; - } - - // Type of the load balancer. - LoadBalancerType load_balancer_type = 1; - - // URI of the health check for the load balancer. Deprecated and no longer - // populated as different load balancer backends might have different health - // checks. - string health_check_uri = 2 [deprecated = true]; - - // Information for the loadbalancer backends. - repeated LoadBalancerBackend backends = 3; - - // Type of load balancer's backend configuration. - BackendType backend_type = 4; - - // Backend configuration URI. - string backend_uri = 5; -} - -// For display only. Metadata associated with a specific load balancer backend. -message LoadBalancerBackend { - // State of a health check firewall configuration: - enum HealthCheckFirewallState { - // State is unspecified. Default state if not populated. - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - - // There are configured firewall rules to allow health check probes to the - // backend. - CONFIGURED = 1; - - // There are firewall rules configured to allow partial health check ranges - // or block all health check ranges. - // If a health check probe is sent from denied IP ranges, - // the health check to the backend will fail. Then, the backend will be - // marked unhealthy and will not receive traffic sent to the load balancer. - MISCONFIGURED = 2; - } - - // Name of a Compute Engine instance or network endpoint. - string display_name = 1; - - // URI of a Compute Engine instance or network endpoint. - string uri = 2; - - // State of the health check firewall configuration. - HealthCheckFirewallState health_check_firewall_state = 3; - - // A list of firewall rule URIs allowing probes from health check IP ranges. - repeated string health_check_allowing_firewall_rules = 4; - - // A list of firewall rule URIs blocking probes from health check IP ranges. - repeated string health_check_blocking_firewall_rules = 5; -} - -// For display only. Metadata associated with a Compute Engine VPN gateway. -message VpnGatewayInfo { - // Name of a VPN gateway. - string display_name = 1; - - // URI of a VPN gateway. - string uri = 2; - - // URI of a Compute Engine network where the VPN gateway is configured. - string network_uri = 3; - - // IP address of the VPN gateway. - string ip_address = 4; - - // A VPN tunnel that is associated with this VPN gateway. - // There may be multiple VPN tunnels configured on a VPN gateway, and only - // the one relevant to the test is displayed. - string vpn_tunnel_uri = 5; - - // Name of a Google Cloud region where this VPN gateway is configured. - string region = 6; -} - -// For display only. Metadata associated with a Compute Engine VPN tunnel. -message VpnTunnelInfo { - // Types of VPN routing policy. For details, refer to [Networks and Tunnel - // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). - enum RoutingType { - // Unspecified type. Default value. - ROUTING_TYPE_UNSPECIFIED = 0; - - // Route based VPN. - ROUTE_BASED = 1; - - // Policy based routing. - POLICY_BASED = 2; - - // Dynamic (BGP) routing. - DYNAMIC = 3; - } - - // Name of a VPN tunnel. - string display_name = 1; - - // URI of a VPN tunnel. - string uri = 2; - - // URI of the VPN gateway at local end of the tunnel. - string source_gateway = 3; - - // URI of a VPN gateway at remote end of the tunnel. - string remote_gateway = 4; - - // Remote VPN gateway's IP address. - string remote_gateway_ip = 5; - - // Local VPN gateway's IP address. - string source_gateway_ip = 6; - - // URI of a Compute Engine network where the VPN tunnel is configured. - string network_uri = 7; - - // Name of a Google Cloud region where this VPN tunnel is configured. - string region = 8; - - // Type of the routing policy. - RoutingType routing_type = 9; -} - -// For display only. The specification of the endpoints for the test. -// EndpointInfo is derived from source and destination Endpoint and validated -// by the backend data plane model. -message EndpointInfo { - // Source IP address. - string source_ip = 1; - - // Destination IP address. - string destination_ip = 2; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 3; - - // Source port. Only valid when protocol is TCP or UDP. - int32 source_port = 4; - - // Destination port. Only valid when protocol is TCP or UDP. - int32 destination_port = 5; - - // URI of the network where this packet originates from. - string source_network_uri = 6; - - // URI of the network where this packet is sent to. - string destination_network_uri = 7; - - // URI of the source telemetry agent this packet originates from. - string source_agent_uri = 8; -} - -// Details of the final state "deliver" and associated resource. -message DeliverInfo { - // Deliver target types: - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Target is a Compute Engine instance. - INSTANCE = 1; - - // Target is the internet. - INTERNET = 2; - - // Target is a Google API. - GOOGLE_API = 3; - - // Target is a Google Kubernetes Engine cluster master. - GKE_MASTER = 4; - - // Target is a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 5; - - // Target is a published service that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - PSC_PUBLISHED_SERVICE = 6; - - // Target is Google APIs that use [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_GOOGLE_API = 7; - - // Target is a VPC-SC that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_VPC_SC = 8; - - // Target is a serverless network endpoint group. - SERVERLESS_NEG = 9; - - // Target is a Cloud Storage bucket. - STORAGE_BUCKET = 10; - - // Target is a private network. Used only for return traces. - PRIVATE_NETWORK = 11; - - // Target is a Cloud Function. Used only for return traces. - CLOUD_FUNCTION = 12; - - // Target is a App Engine service version. Used only for return traces. - APP_ENGINE_VERSION = 13; - - // Target is a Cloud Run revision. Used only for return traces. - CLOUD_RUN_REVISION = 14; - - // Target is a Google-managed service. Used only for return traces. - GOOGLE_MANAGED_SERVICE = 15; - - // Target is a Redis Instance. - REDIS_INSTANCE = 16; - - // Target is a Redis Cluster. - REDIS_CLUSTER = 17; - } - - // Target type where the packet is delivered to. - Target target = 1; - - // URI of the resource that the packet is delivered to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the Cloud Storage Bucket the packet is delivered to (if - // applicable). - string storage_bucket = 4; - - // PSC Google API target the packet is delivered to (if applicable). - string psc_google_api_target = 5; -} - -// Details of the final state "forward" and associated resource. -message ForwardInfo { - // Forward target types. - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Forwarded to a VPC peering network. - PEERING_VPC = 1; - - // Forwarded to a Cloud VPN gateway. - VPN_GATEWAY = 2; - - // Forwarded to a Cloud Interconnect connection. - INTERCONNECT = 3; - - // Forwarded to a Google Kubernetes Engine Container cluster master. - GKE_MASTER = 4 [deprecated = true]; - - // Forwarded to the next hop of a custom route imported from a peering VPC. - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - - // Forwarded to a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 6 [deprecated = true]; - - // Forwarded to a VPC network in another project. - ANOTHER_PROJECT = 7; - - // Forwarded to an NCC Hub. - NCC_HUB = 8; - - // Forwarded to a router appliance. - ROUTER_APPLIANCE = 9; - } - - // Target type where this packet is forwarded to. - Target target = 1; - - // URI of the resource that the packet is forwarded to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; -} - -// Details of the final state "abort" and associated resource. -message AbortInfo { - // Abort cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Aborted due to unknown network. Deprecated, not used in the new tests. - UNKNOWN_NETWORK = 1 [deprecated = true]; - - // Aborted because no project information can be derived from the test - // input. Deprecated, not used in the new tests. - UNKNOWN_PROJECT = 3 [deprecated = true]; - - // Aborted because traffic is sent from a public IP to an instance without - // an external IP. Deprecated, not used in the new tests. - NO_EXTERNAL_IP = 7 [deprecated = true]; - - // Aborted because none of the traces matches destination information - // specified in the input test request. Deprecated, not used in the new - // tests. - UNINTENDED_DESTINATION = 8 [deprecated = true]; - - // Aborted because the source endpoint could not be found. Deprecated, not - // used in the new tests. - SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; - - // Aborted because the source network does not match the source endpoint. - // Deprecated, not used in the new tests. - MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; - - // Aborted because the destination endpoint could not be found. Deprecated, - // not used in the new tests. - DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; - - // Aborted because the destination network does not match the destination - // endpoint. Deprecated, not used in the new tests. - MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; - - // Aborted because no endpoint with the packet's destination IP address is - // found. - UNKNOWN_IP = 2; - - // Aborted because no endpoint with the packet's destination IP is found in - // the Google-managed project. - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; - - // Aborted because the source IP address doesn't belong to any of the - // subnets of the source VPC network. - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - - // Aborted because user lacks permission to access all or part of the - // network configurations required to run the test. - PERMISSION_DENIED = 4; - - // Aborted because user lacks permission to access Cloud NAT configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - - // Aborted because user lacks permission to access Network endpoint group - // endpoint configs required to run the test. - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - - // Aborted because user lacks permission to access Cloud Router configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; - - // Aborted because no valid source or destination endpoint is derived from - // the input test request. - NO_SOURCE_LOCATION = 5; - - // Aborted because the source or destination endpoint specified in - // the request is invalid. Some examples: - // - The request might contain malformed resource URI, project ID, or IP - // address. - // - The request might contain inconsistent information (for example, the - // request might include both the instance and the network, but the instance - // might not have a NIC in that network). - INVALID_ARGUMENT = 6; - - // Aborted because the number of steps in the trace exceeds a certain - // limit. It might be caused by a routing loop. - TRACE_TOO_LONG = 9; - - // Aborted due to internal server error. - INTERNAL_ERROR = 10; - - // Aborted because the test scenario is not supported. - UNSUPPORTED = 15; - - // Aborted because the source and destination resources have no common IP - // version. - MISMATCHED_IP_VERSION = 16; - - // Aborted because the connection between the control plane and the node of - // the source cluster is initiated by the node and managed by the - // Konnectivity proxy. - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - - // Aborted because expected resource configuration was missing. - RESOURCE_CONFIG_NOT_FOUND = 18; - - // Aborted because expected VM instance configuration was missing. - VM_INSTANCE_CONFIG_NOT_FOUND = 24; - - // Aborted because expected network configuration was missing. - NETWORK_CONFIG_NOT_FOUND = 25; - - // Aborted because expected firewall configuration was missing. - FIREWALL_CONFIG_NOT_FOUND = 26; - - // Aborted because expected route configuration was missing. - ROUTE_CONFIG_NOT_FOUND = 27; - - // Aborted because a PSC endpoint selection for the Google-managed service - // is ambiguous (several PSC endpoints satisfy test input). - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - - // Aborted because tests with a PSC-based Cloud SQL instance as a source are - // not supported. - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - - // Aborted because tests with a Redis Cluster as a source are not supported. - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; - - // Aborted because tests with a Redis Instance as a source are not - // supported. - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; - - // Aborted because tests with a forwarding rule as a source are not - // supported. - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - - // Aborted because one of the endpoints is a non-routable IP address - // (loopback, link-local, etc). - NON_ROUTABLE_IP_ADDRESS = 22; - - // Aborted due to an unknown issue in the Google-managed project. - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - - // Aborted due to an unsupported configuration of the Google-managed - // project. - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - } - - // Causes that the analysis is aborted. - Cause cause = 1; - - // URI of the resource that caused the abort. - string resource_uri = 2; - - // IP address that caused the abort. - string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // List of project IDs the user specified in the request but lacks access to. - // In this case, analysis is aborted with the PERMISSION_DENIED cause. - repeated string projects_missing_permission = 3; -} - -// Details of the final state "drop" and associated resource. -message DropInfo { - // Drop cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Destination external address cannot be resolved to a known target. If - // the address is used in a Google Cloud project, provide the project ID - // as test input. - UNKNOWN_EXTERNAL_ADDRESS = 1; - - // A Compute Engine instance can only send or receive a packet with a - // foreign IP address if ip_forward is enabled. - FOREIGN_IP_DISALLOWED = 2; - - // Dropped due to a firewall rule, unless allowed due to connection - // tracking. - FIREWALL_RULE = 3; - - // Dropped due to no matching routes. - NO_ROUTE = 4; - - // Dropped due to invalid route. Route's next hop is a blackhole. - ROUTE_BLACKHOLE = 5; - - // Packet is sent to a wrong (unintended) network. Example: you trace a - // packet from VM1:Network1 to VM2:Network2, however, the route configured - // in Network1 sends the packet destined for VM2's IP address to Network3. - ROUTE_WRONG_NETWORK = 6; - - // Route's next hop IP address cannot be resolved to a GCP resource. - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - - // Route's next hop resource is not found. - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - - // Route's next hop instance doesn't have a NIC in the route's network. - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - - // Route's next hop IP address is not a primary IP address of the next hop - // instance. - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - - // Route's next hop forwarding rule doesn't match next hop IP address. - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - - // Route's next hop VPN tunnel is down (does not have valid IKE SAs). - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - - // Route's next hop forwarding rule type is invalid (it's not a forwarding - // rule of the internal passthrough load balancer). - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - - // Packet is sent from the Internet to the private IPv6 address. - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - - // The packet does not match a policy-based VPN tunnel local selector. - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - - // The packet does not match a policy-based VPN tunnel remote selector. - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - - // Packet with internal destination address sent to the internet gateway. - PRIVATE_TRAFFIC_TO_INTERNET = 7; - - // Instance with only an internal IP address tries to access Google API and - // services, but private Google access is not enabled in the subnet. - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - - // Source endpoint tries to access Google API and services through the VPN - // tunnel to another network, but Private Google Access needs to be enabled - // in the source endpoint network. - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - - // Instance with only an internal IP address tries to access external hosts, - // but Cloud NAT is not enabled in the subnet, unless special configurations - // on a VM allow this connection. - NO_EXTERNAL_ADDRESS = 9; - - // Destination internal address cannot be resolved to a known target. If - // this is a shared VPC scenario, verify if the service project ID is - // provided as test input. Otherwise, verify if the IP address is being - // used in the project. - UNKNOWN_INTERNAL_ADDRESS = 10; - - // Forwarding rule's protocol and ports do not match the packet header. - FORWARDING_RULE_MISMATCH = 11; - - // Forwarding rule does not have backends configured. - FORWARDING_RULE_NO_INSTANCES = 12; - - // Firewalls block the health check probes to the backends and cause - // the backends to be unavailable for traffic from the load balancer. - // For more details, see [Health check firewall - // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - - // Packet is sent from or to a Compute Engine instance that is not in a - // running state. - INSTANCE_NOT_RUNNING = 14; - - // Packet sent from or to a GKE cluster that is not in running state. - GKE_CLUSTER_NOT_RUNNING = 27; - - // Packet sent from or to a Cloud SQL instance that is not in running state. - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - - // Packet sent from or to a Redis Instance that is not in running state. - REDIS_INSTANCE_NOT_RUNNING = 68; - - // Packet sent from or to a Redis Cluster that is not in running state. - REDIS_CLUSTER_NOT_RUNNING = 69; - - // The type of traffic is blocked and the user cannot configure a firewall - // rule to enable it. See [Always blocked - // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - // more details. - TRAFFIC_TYPE_BLOCKED = 15; - - // Access to Google Kubernetes Engine cluster master's endpoint is not - // authorized. See [Access to the cluster - // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - // for more details. - GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - - // Access to the Cloud SQL instance endpoint is not authorized. - // See [Authorizing with authorized - // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - // more details. - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - - // Packet was dropped inside Google Kubernetes Engine Service. - DROPPED_INSIDE_GKE_SERVICE = 18; - - // Packet was dropped inside Cloud SQL Service. - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - - // Packet was dropped because there is no peering between the originating - // network and the Google Managed Services Network. - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - - // Packet was dropped because the Google-managed service uses Private - // Service Connect (PSC), but the PSC endpoint is not found in the project. - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - - // Packet was dropped because the GKE cluster uses Private Service Connect - // (PSC), but the PSC endpoint is not found in the project. - GKE_PSC_ENDPOINT_MISSING = 36; - - // Packet was dropped because the Cloud SQL instance has neither a private - // nor a public IP address. - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - - // Packet was dropped because a GKE cluster private endpoint is - // unreachable from a region different from the cluster's region. - GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - - // Packet sent from a public GKE cluster control plane to a private - // IP address. - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - - // Packet was dropped because there is no route from a GKE cluster - // control plane to a destination network. - GKE_CONTROL_PLANE_NO_ROUTE = 32; - - // Packet sent from a Cloud SQL instance to an external IP address is not - // allowed. The Cloud SQL instance is not configured to send packets to - // external IP addresses. - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - - // Packet sent from a Cloud SQL instance with only a public IP address to a - // private IP address. - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - - // Packet was dropped because there is no route from a Cloud SQL - // instance to a destination network. - CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - - // Packet was dropped because the Cloud SQL instance requires all - // connections to use Cloud SQL connectors and to target the Cloud SQL proxy - // port (3307). - CLOUD_SQL_CONNECTOR_REQUIRED = 63; - - // Packet could be dropped because the Cloud Function is not in an active - // status. - CLOUD_FUNCTION_NOT_ACTIVE = 22; - - // Packet could be dropped because no VPC connector is set. - VPC_CONNECTOR_NOT_SET = 23; - - // Packet could be dropped because the VPC connector is not in a running - // state. - VPC_CONNECTOR_NOT_RUNNING = 24; - - // Packet could be dropped because the traffic from the serverless service - // to the VPC connector is not allowed. - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; - - // Packet could be dropped because the health check traffic to the VPC - // connector is not allowed. - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; - - // Packet could be dropped because it was sent from a different region - // to a regional forwarding without global access. - FORWARDING_RULE_REGION_MISMATCH = 25; - - // The Private Service Connect endpoint is in a project that is not approved - // to connect to the service. - PSC_CONNECTION_NOT_ACCEPTED = 26; - - // The packet is sent to the Private Service Connect endpoint over the - // peering, but [it's not - // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule does not have - // global access enabled. - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule has multiple ports - // specified. - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group) targeting a Cloud SQL service attachment, but this - // configuration is not supported. - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - - // No NAT subnets are defined for the PSC service attachment. - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - - // PSC endpoint is accessed via NCC, but PSC transitivity configuration is - // not yet propagated. - PSC_TRANSITIVITY_NOT_PROPAGATED = 64; - - // The packet sent from the hybrid NEG proxy matches a non-dynamic route, - // but such a configuration is not supported. - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - - // The packet sent from the hybrid NEG proxy matches a dynamic route with a - // next hop in a different region, but such a configuration is not - // supported. - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - - // Packet sent from a Cloud Run revision that is not ready. - CLOUD_RUN_REVISION_NOT_READY = 29; - - // Packet was dropped inside Private Service Connect service producer. - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - - // Packet sent to a load balancer, which requires a proxy-only subnet and - // the subnet is not found. - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - - // Packet sent to Cloud Nat without active NAT IPs. - CLOUD_NAT_NO_ADDRESSES = 40; - - // Packet is stuck in a routing loop. - ROUTING_LOOP = 59; - - // Packet is dropped inside a Google-managed service due to being delivered - // in return trace to an endpoint that doesn't match the endpoint the packet - // was sent from in forward trace. Used only for return traces. - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; - - // Packet is dropped due to a load balancer backend instance not having a - // network interface in the network expected by the load balancer. - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; - - // Packet is dropped due to a backend service named port not being defined - // on the instance group level. - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; - - // Packet is dropped due to a destination IP range being part of a Private - // NAT IP range. - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; - - // Generic drop cause for a packet being dropped inside a Redis Instance - // service project. - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Instance. Port 6379 should be used to connect to a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PORT = 71; - - // Packet is dropped due to connecting from PUPI address to a PSA based - // Redis Instance. - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; - - // Packet is dropped due to no route to the destination network. - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; - - // Redis Instance does not have an external IP address. - REDIS_INSTANCE_NO_EXTERNAL_IP = 74; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Instance. Only TCP connections are accepted by a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; - - // Generic drop cause for a packet being dropped inside a Redis Cluster - // service project. - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to - // a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PORT = 76; - - // Redis Cluster does not have an external IP address. - REDIS_CLUSTER_NO_EXTERNAL_IP = 77; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix advertised - // via BGP by the Cloud Router. - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix included to - // the local traffic selector of the VPN tunnel. - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; - - // Packet from the unknown peered network is dropped due to no known route - // from the source network to the destination IP address. - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; - - // Sending packets processed by the Private NAT Gateways to the Private - // Service Connect endpoints is not supported. - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; - } - - // Cause that the packet is dropped. - Cause cause = 1; - - // URI of the resource that caused the drop. - string resource_uri = 2; - - // Source IP address of the dropped packet (if relevant). - string source_ip = 3; - - // Destination IP address of the dropped packet (if relevant). - string destination_ip = 4; - - // Region of the dropped packet (if relevant). - string region = 5; -} - -// For display only. Metadata associated with a Google Kubernetes Engine (GKE) -// cluster master. -message GKEMasterInfo { - // URI of a GKE cluster. - string cluster_uri = 2; - - // URI of a GKE cluster network. - string cluster_network_uri = 4; - - // Internal IP address of a GKE cluster control plane. - string internal_ip = 5; - - // External IP address of a GKE cluster control plane. - string external_ip = 6; - - // DNS endpoint of a GKE cluster control plane. - string dns_endpoint = 7; -} - -// For display only. Metadata associated with a Cloud SQL instance. -message CloudSQLInstanceInfo { - // Name of a Cloud SQL instance. - string display_name = 1; - - // URI of a Cloud SQL instance. - string uri = 2; - - // URI of a Cloud SQL instance network or empty string if the instance does - // not have one. - string network_uri = 4; - - // Internal IP address of a Cloud SQL instance. - string internal_ip = 5; - - // External IP address of a Cloud SQL instance. - string external_ip = 6; - - // Region in which the Cloud SQL instance is running. - string region = 7; -} - -// For display only. Metadata associated with a Cloud Redis Instance. -message RedisInstanceInfo { - // Name of a Cloud Redis Instance. - string display_name = 1; - - // URI of a Cloud Redis Instance. - string uri = 2; - - // URI of a Cloud Redis Instance network. - string network_uri = 3; - - // Primary endpoint IP address of a Cloud Redis Instance. - string primary_endpoint_ip = 4; - - // Read endpoint IP address of a Cloud Redis Instance (if applicable). - string read_endpoint_ip = 5; - - // Region in which the Cloud Redis Instance is defined. - string region = 6; -} - -// For display only. Metadata associated with a Redis Cluster. -message RedisClusterInfo { - // Name of a Redis Cluster. - string display_name = 1; - - // URI of a Redis Cluster in format - // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - string uri = 2; - - // URI of a Redis Cluster network in format - // "projects/{project_id}/global/networks/{network_id}". - string network_uri = 3; - - // Discovery endpoint IP address of a Redis Cluster. - string discovery_endpoint_ip_address = 4 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Secondary endpoint IP address of a Redis Cluster. - string secondary_endpoint_ip_address = 5 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the region in which the Redis Cluster is defined. For example, - // "us-central1". - string location = 6; -} - -// For display only. Metadata associated with a Cloud Function. -message CloudFunctionInfo { - // Name of a Cloud Function. - string display_name = 1; - - // URI of a Cloud Function. - string uri = 2; - - // Location in which the Cloud Function is deployed. - string location = 3; - - // Latest successfully deployed version id of the Cloud Function. - int64 version_id = 4; -} - -// For display only. Metadata associated with a Cloud Run revision. -message CloudRunRevisionInfo { - // Name of a Cloud Run revision. - string display_name = 1; - - // URI of a Cloud Run revision. - string uri = 2; - - // Location in which this revision is deployed. - string location = 4; - - // URI of Cloud Run service this revision belongs to. - string service_uri = 5; -} - -// For display only. Metadata associated with an App Engine version. -message AppEngineVersionInfo { - // Name of an App Engine version. - string display_name = 1; - - // URI of an App Engine version. - string uri = 2; - - // Runtime of the App Engine version. - string runtime = 3; - - // App Engine execution environment for a version. - string environment = 4; -} - -// For display only. Metadata associated with a VPC connector. -message VpcConnectorInfo { - // Name of a VPC connector. - string display_name = 1; - - // URI of a VPC connector. - string uri = 2; - - // Location in which the VPC connector is deployed. - string location = 3; -} - -// For display only. Metadata associated with NAT. -message NatInfo { - // Types of NAT. - enum Type { - // Type is unspecified. - TYPE_UNSPECIFIED = 0; - - // From Compute Engine instance's internal address to external address. - INTERNAL_TO_EXTERNAL = 1; - - // From Compute Engine instance's external address to internal address. - EXTERNAL_TO_INTERNAL = 2; - - // Cloud NAT Gateway. - CLOUD_NAT = 3; - - // Private service connect NAT. - PRIVATE_SERVICE_CONNECT = 4; - } - - // Type of NAT. - Type type = 1; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 2; - - // URI of the network where NAT translation takes place. - string network_uri = 3; - - // Source IP address before NAT translation. - string old_source_ip = 4; - - // Source IP address after NAT translation. - string new_source_ip = 5; - - // Destination IP address before NAT translation. - string old_destination_ip = 6; - - // Destination IP address after NAT translation. - string new_destination_ip = 7; - - // Source port before NAT translation. Only valid when protocol is TCP or UDP. - int32 old_source_port = 8; - - // Source port after NAT translation. Only valid when protocol is TCP or UDP. - int32 new_source_port = 9; - - // Destination port before NAT translation. Only valid when protocol is TCP or - // UDP. - int32 old_destination_port = 10; - - // Destination port after NAT translation. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 11; - - // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - string router_uri = 12; - - // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - string nat_gateway_name = 13; -} - -// For display only. Metadata associated with ProxyConnection. -message ProxyConnectionInfo { - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 1; - - // Source IP address of an original connection. - string old_source_ip = 2; - - // Source IP address of a new connection. - string new_source_ip = 3; - - // Destination IP address of an original connection - string old_destination_ip = 4; - - // Destination IP address of a new connection. - string new_destination_ip = 5; - - // Source port of an original connection. Only valid when protocol is TCP or - // UDP. - int32 old_source_port = 6; - - // Source port of a new connection. Only valid when protocol is TCP or UDP. - int32 new_source_port = 7; - - // Destination port of an original connection. Only valid when protocol is TCP - // or UDP. - int32 old_destination_port = 8; - - // Destination port of a new connection. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 9; - - // Uri of proxy subnet. - string subnet_uri = 10; - - // URI of the network where connection is proxied. - string network_uri = 11; -} - -// For display only. Metadata associated with the load balancer backend. -message LoadBalancerBackendInfo { - // Health check firewalls configuration state enum. - enum HealthCheckFirewallsConfigState { - // Configuration state unspecified. It usually means that the backend has - // no health check attached, or there was an unexpected configuration error - // preventing Connectivity tests from verifying health check configuration. - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - - // Firewall rules (policies) allowing health check traffic from all required - // IP ranges to the backend are configured. - FIREWALLS_CONFIGURED = 1; - - // Firewall rules (policies) allow health check traffic only from a part of - // required IP ranges. - FIREWALLS_PARTIALLY_CONFIGURED = 2; - - // Firewall rules (policies) deny health check traffic from all required - // IP ranges to the backend. - FIREWALLS_NOT_CONFIGURED = 3; - - // The network contains firewall rules of unsupported types, so Connectivity - // tests were not able to verify health check configuration status. Please - // refer to the documentation for the list of unsupported configurations: - // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - FIREWALLS_UNSUPPORTED = 4; - } - - // Display name of the backend. For example, it might be an instance name for - // the instance group backends, or an IP address and port for zonal network - // endpoint group backends. - string name = 1; - - // URI of the backend instance (if applicable). Populated for instance group - // backends, and zonal NEG backends. - string instance_uri = 2; - - // URI of the backend service this backend belongs to (if applicable). - string backend_service_uri = 3; - - // URI of the instance group this backend belongs to (if applicable). - string instance_group_uri = 4; - - // URI of the network endpoint group this backend belongs to (if applicable). - string network_endpoint_group_uri = 5; - - // URI of the backend bucket this backend targets (if applicable). - string backend_bucket_uri = 8; - - // URI of the PSC service attachment this PSC NEG backend targets (if - // applicable). - string psc_service_attachment_uri = 9; - - // PSC Google API target this PSC NEG backend targets (if applicable). - string psc_google_api_target = 10; - - // URI of the health check attached to this backend (if applicable). - string health_check_uri = 6; - - // Output only. Health check firewalls configuration state for the backend. - // This is a result of the static firewall analysis (verifying that health - // check traffic from required IP ranges to the backend is allowed or not). - // The backend might still be unhealthy even if these firewalls are - // configured. Please refer to the documentation for more information: - // https://cloud.google.com/load-balancing/docs/firewall-rules - HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Type of a load balancer. For more information, see [Summary of Google Cloud -// load -// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). -enum LoadBalancerType { - // Forwarding rule points to a different target than a load balancer or a - // load balancer type is unknown. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Global external HTTP(S) load balancer. - HTTPS_ADVANCED_LOAD_BALANCER = 1; - - // Global external HTTP(S) load balancer (classic) - HTTPS_LOAD_BALANCER = 2; - - // Regional external HTTP(S) load balancer. - REGIONAL_HTTPS_LOAD_BALANCER = 3; - - // Internal HTTP(S) load balancer. - INTERNAL_HTTPS_LOAD_BALANCER = 4; - - // External SSL proxy load balancer. - SSL_PROXY_LOAD_BALANCER = 5; - - // External TCP proxy load balancer. - TCP_PROXY_LOAD_BALANCER = 6; - - // Internal regional TCP proxy load balancer. - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - - // External TCP/UDP Network load balancer. - NETWORK_LOAD_BALANCER = 8; - - // Target-pool based external TCP/UDP Network load balancer. - LEGACY_NETWORK_LOAD_BALANCER = 9; - - // Internal TCP/UDP load balancer. - TCP_UDP_INTERNAL_LOAD_BALANCER = 10; -} - -// For display only. Metadata associated with Storage Bucket. -message StorageBucketInfo { - // Cloud Storage Bucket name. - string bucket = 1; -} - -// For display only. Metadata associated with the serverless network endpoint -// group backend. -message ServerlessNegInfo { - // URI of the serverless network endpoint group. - string neg_uri = 1; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts deleted file mode 100644 index 79cfe7142dd..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.d.ts +++ /dev/null @@ -1,14653 +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 networkmanagement. */ - namespace networkmanagement { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ConnectivityTest. */ - interface IConnectivityTest { - - /** ConnectivityTest name */ - name?: (string|null); - - /** ConnectivityTest description */ - description?: (string|null); - - /** ConnectivityTest source */ - source?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest destination */ - destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest protocol */ - protocol?: (string|null); - - /** ConnectivityTest relatedProjects */ - relatedProjects?: (string[]|null); - - /** ConnectivityTest displayName */ - displayName?: (string|null); - - /** ConnectivityTest labels */ - labels?: ({ [k: string]: string }|null); - - /** ConnectivityTest createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails */ - reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails */ - probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks */ - bypassFirewallChecks?: (boolean|null); - } - - /** Represents a ConnectivityTest. */ - class ConnectivityTest implements IConnectivityTest { - - /** - * Constructs a new ConnectivityTest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IConnectivityTest); - - /** ConnectivityTest name. */ - public name: string; - - /** ConnectivityTest description. */ - public description: string; - - /** ConnectivityTest source. */ - public source?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest destination. */ - public destination?: (google.cloud.networkmanagement.v1.IEndpoint|null); - - /** ConnectivityTest protocol. */ - public protocol: string; - - /** ConnectivityTest relatedProjects. */ - public relatedProjects: string[]; - - /** ConnectivityTest displayName. */ - public displayName: string; - - /** ConnectivityTest labels. */ - public labels: { [k: string]: string }; - - /** ConnectivityTest createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails. */ - public reachabilityDetails?: (google.cloud.networkmanagement.v1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails. */ - public probingDetails?: (google.cloud.networkmanagement.v1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks. */ - public bypassFirewallChecks: boolean; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectivityTest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IConnectivityTest): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Verifies a ConnectivityTest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectivityTest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ConnectivityTest; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @param message ConnectivityTest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectivityTest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectivityTest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoint. */ - interface IEndpoint { - - /** Endpoint ipAddress */ - ipAddress?: (string|null); - - /** Endpoint port */ - port?: (number|null); - - /** Endpoint instance */ - instance?: (string|null); - - /** Endpoint forwardingRule */ - forwardingRule?: (string|null); - - /** Endpoint forwardingRuleTarget */ - forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId */ - loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster */ - gkeMasterCluster?: (string|null); - - /** Endpoint fqdn */ - fqdn?: (string|null); - - /** Endpoint cloudSqlInstance */ - cloudSqlInstance?: (string|null); - - /** Endpoint redisInstance */ - redisInstance?: (string|null); - - /** Endpoint redisCluster */ - redisCluster?: (string|null); - - /** Endpoint cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network */ - network?: (string|null); - - /** Endpoint networkType */ - networkType?: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType|null); - - /** Endpoint projectId */ - projectId?: (string|null); - } - - /** Represents an Endpoint. */ - class Endpoint implements IEndpoint { - - /** - * Constructs a new Endpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IEndpoint); - - /** Endpoint ipAddress. */ - public ipAddress: string; - - /** Endpoint port. */ - public port: number; - - /** Endpoint instance. */ - public instance: string; - - /** Endpoint forwardingRule. */ - public forwardingRule: string; - - /** Endpoint forwardingRuleTarget. */ - public forwardingRuleTarget?: (google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId. */ - public loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType. */ - public loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster. */ - public gkeMasterCluster: string; - - /** Endpoint fqdn. */ - public fqdn: string; - - /** Endpoint cloudSqlInstance. */ - public cloudSqlInstance: string; - - /** Endpoint redisInstance. */ - public redisInstance: string; - - /** Endpoint redisCluster. */ - public redisCluster: string; - - /** Endpoint cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network. */ - public network: string; - - /** Endpoint networkType. */ - public networkType: (google.cloud.networkmanagement.v1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1.Endpoint.NetworkType); - - /** Endpoint projectId. */ - public projectId: string; - - /** Endpoint _forwardingRuleTarget. */ - public _forwardingRuleTarget?: "forwardingRuleTarget"; - - /** Endpoint _loadBalancerId. */ - public _loadBalancerId?: "loadBalancerId"; - - /** Endpoint _loadBalancerType. */ - public _loadBalancerType?: "loadBalancerType"; - - /** - * Creates a new Endpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IEndpoint): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Verifies an Endpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Endpoint { - - /** NetworkType enum. */ - enum NetworkType { - NETWORK_TYPE_UNSPECIFIED = 0, - GCP_NETWORK = 1, - NON_GCP_NETWORK = 2 - } - - /** ForwardingRuleTarget enum. */ - enum ForwardingRuleTarget { - FORWARDING_RULE_TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - LOAD_BALANCER = 2, - VPN_GATEWAY = 3, - PSC = 4 - } - - /** Properties of a CloudFunctionEndpoint. */ - interface ICloudFunctionEndpoint { - - /** CloudFunctionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudFunctionEndpoint. */ - class CloudFunctionEndpoint implements ICloudFunctionEndpoint { - - /** - * Constructs a new CloudFunctionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint); - - /** CloudFunctionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Verifies a CloudFunctionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @param message CloudFunctionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionEndpoint. */ - interface IAppEngineVersionEndpoint { - - /** AppEngineVersionEndpoint uri */ - uri?: (string|null); - } - - /** Represents an AppEngineVersionEndpoint. */ - class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { - - /** - * Constructs a new AppEngineVersionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint); - - /** AppEngineVersionEndpoint uri. */ - public uri: string; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @param message AppEngineVersionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionEndpoint. */ - interface ICloudRunRevisionEndpoint { - - /** CloudRunRevisionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudRunRevisionEndpoint. */ - class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint); - - /** CloudRunRevisionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @param message CloudRunRevisionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ReachabilityDetails. */ - interface IReachabilityDetails { - - /** ReachabilityDetails result */ - result?: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null); - - /** ReachabilityDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error */ - error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces */ - traces?: (google.cloud.networkmanagement.v1.ITrace[]|null); - } - - /** Represents a ReachabilityDetails. */ - class ReachabilityDetails implements IReachabilityDetails { - - /** - * Constructs a new ReachabilityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails); - - /** ReachabilityDetails result. */ - public result: (google.cloud.networkmanagement.v1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1.ReachabilityDetails.Result); - - /** ReachabilityDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces. */ - public traces: google.cloud.networkmanagement.v1.ITrace[]; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ReachabilityDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IReachabilityDetails): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Verifies a ReachabilityDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReachabilityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ReachabilityDetails; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @param message ReachabilityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReachabilityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReachabilityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReachabilityDetails { - - /** Result enum. */ - enum Result { - RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - AMBIGUOUS = 4, - UNDETERMINED = 5 - } - } - - /** Properties of a LatencyPercentile. */ - interface ILatencyPercentile { - - /** LatencyPercentile percent */ - percent?: (number|null); - - /** LatencyPercentile latencyMicros */ - latencyMicros?: (number|Long|string|null); - } - - /** Represents a LatencyPercentile. */ - class LatencyPercentile implements ILatencyPercentile { - - /** - * Constructs a new LatencyPercentile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile); - - /** LatencyPercentile percent. */ - public percent: number; - - /** LatencyPercentile latencyMicros. */ - public latencyMicros: (number|Long|string); - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyPercentile instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILatencyPercentile): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Verifies a LatencyPercentile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyPercentile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyPercentile; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @param message LatencyPercentile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyPercentile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyPercentile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LatencyDistribution. */ - interface ILatencyDistribution { - - /** LatencyDistribution latencyPercentiles */ - latencyPercentiles?: (google.cloud.networkmanagement.v1.ILatencyPercentile[]|null); - } - - /** Represents a LatencyDistribution. */ - class LatencyDistribution implements ILatencyDistribution { - - /** - * Constructs a new LatencyDistribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution); - - /** LatencyDistribution latencyPercentiles. */ - public latencyPercentiles: google.cloud.networkmanagement.v1.ILatencyPercentile[]; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyDistribution instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILatencyDistribution): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Verifies a LatencyDistribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyDistribution - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LatencyDistribution; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @param message LatencyDistribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyDistribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyDistribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProbingDetails. */ - interface IProbingDetails { - - /** ProbingDetails result */ - result?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null); - - /** ProbingDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error */ - error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause */ - abortCause?: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null); - - /** ProbingDetails sentProbeCount */ - sentProbeCount?: (number|null); - - /** ProbingDetails successfulProbeCount */ - successfulProbeCount?: (number|null); - - /** ProbingDetails endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** ProbingDetails probingLatency */ - probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation */ - destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); - } - - /** Represents a ProbingDetails. */ - class ProbingDetails implements IProbingDetails { - - /** - * Constructs a new ProbingDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IProbingDetails); - - /** ProbingDetails result. */ - public result: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult); - - /** ProbingDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause. */ - public abortCause: (google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause); - - /** ProbingDetails sentProbeCount. */ - public sentProbeCount: number; - - /** ProbingDetails successfulProbeCount. */ - public successfulProbeCount: number; - - /** ProbingDetails endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** ProbingDetails probingLatency. */ - public probingLatency?: (google.cloud.networkmanagement.v1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation. */ - public destinationEgressLocation?: (google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null); - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ProbingDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IProbingDetails): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Verifies a ProbingDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProbingDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @param message ProbingDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProbingDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProbingDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProbingDetails { - - /** ProbingResult enum. */ - enum ProbingResult { - PROBING_RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - REACHABILITY_INCONSISTENT = 3, - UNDETERMINED = 4 - } - - /** ProbingAbortCause enum. */ - enum ProbingAbortCause { - PROBING_ABORT_CAUSE_UNSPECIFIED = 0, - PERMISSION_DENIED = 1, - NO_SOURCE_LOCATION = 2 - } - - /** Properties of an EdgeLocation. */ - interface IEdgeLocation { - - /** EdgeLocation metropolitanArea */ - metropolitanArea?: (string|null); - } - - /** Represents an EdgeLocation. */ - class EdgeLocation implements IEdgeLocation { - - /** - * Constructs a new EdgeLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation); - - /** EdgeLocation metropolitanArea. */ - public metropolitanArea: string; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns EdgeLocation instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Verifies an EdgeLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EdgeLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @param message EdgeLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EdgeLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EdgeLocation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Trace. */ - interface ITrace { - - /** Trace endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Trace steps */ - steps?: (google.cloud.networkmanagement.v1.IStep[]|null); - - /** Trace forwardTraceId */ - forwardTraceId?: (number|null); - } - - /** Represents a Trace. */ - class Trace implements ITrace { - - /** - * Constructs a new Trace. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ITrace); - - /** Trace endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Trace steps. */ - public steps: google.cloud.networkmanagement.v1.IStep[]; - - /** Trace forwardTraceId. */ - public forwardTraceId: number; - - /** - * Creates a new Trace instance using the specified properties. - * @param [properties] Properties to set - * @returns Trace instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ITrace): google.cloud.networkmanagement.v1.Trace; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Trace; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Trace; - - /** - * Verifies a Trace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trace - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Trace; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @param message Trace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trace - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Step. */ - interface IStep { - - /** Step description */ - description?: (string|null); - - /** Step state */ - state?: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State|null); - - /** Step causesDrop */ - causesDrop?: (boolean|null); - - /** Step projectId */ - projectId?: (string|null); - - /** Step instance */ - instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); - - /** Step firewall */ - firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); - - /** Step route */ - route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); - - /** Step endpoint */ - endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Step googleService */ - googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); - - /** Step forwardingRule */ - forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); - - /** Step vpnGateway */ - vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); - - /** Step vpnTunnel */ - vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); - - /** Step vpcConnector */ - vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); - - /** Step deliver */ - deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); - - /** Step forward */ - forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); - - /** Step abort */ - abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); - - /** Step drop */ - drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); - - /** Step loadBalancer */ - loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); - - /** Step network */ - network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); - - /** Step gkeMaster */ - gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance */ - cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance */ - redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); - - /** Step redisCluster */ - redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); - - /** Step cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); - - /** Step appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); - - /** Step nat */ - nat?: (google.cloud.networkmanagement.v1.INatInfo|null); - - /** Step proxyConnection */ - proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo */ - loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket */ - storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); - - /** Step serverlessNeg */ - serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); - } - - /** Represents a Step. */ - class Step implements IStep { - - /** - * Constructs a new Step. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IStep); - - /** Step description. */ - public description: string; - - /** Step state. */ - public state: (google.cloud.networkmanagement.v1.Step.State|keyof typeof google.cloud.networkmanagement.v1.Step.State); - - /** Step causesDrop. */ - public causesDrop: boolean; - - /** Step projectId. */ - public projectId: string; - - /** Step instance. */ - public instance?: (google.cloud.networkmanagement.v1.IInstanceInfo|null); - - /** Step firewall. */ - public firewall?: (google.cloud.networkmanagement.v1.IFirewallInfo|null); - - /** Step route. */ - public route?: (google.cloud.networkmanagement.v1.IRouteInfo|null); - - /** Step endpoint. */ - public endpoint?: (google.cloud.networkmanagement.v1.IEndpointInfo|null); - - /** Step googleService. */ - public googleService?: (google.cloud.networkmanagement.v1.IGoogleServiceInfo|null); - - /** Step forwardingRule. */ - public forwardingRule?: (google.cloud.networkmanagement.v1.IForwardingRuleInfo|null); - - /** Step vpnGateway. */ - public vpnGateway?: (google.cloud.networkmanagement.v1.IVpnGatewayInfo|null); - - /** Step vpnTunnel. */ - public vpnTunnel?: (google.cloud.networkmanagement.v1.IVpnTunnelInfo|null); - - /** Step vpcConnector. */ - public vpcConnector?: (google.cloud.networkmanagement.v1.IVpcConnectorInfo|null); - - /** Step deliver. */ - public deliver?: (google.cloud.networkmanagement.v1.IDeliverInfo|null); - - /** Step forward. */ - public forward?: (google.cloud.networkmanagement.v1.IForwardInfo|null); - - /** Step abort. */ - public abort?: (google.cloud.networkmanagement.v1.IAbortInfo|null); - - /** Step drop. */ - public drop?: (google.cloud.networkmanagement.v1.IDropInfo|null); - - /** Step loadBalancer. */ - public loadBalancer?: (google.cloud.networkmanagement.v1.ILoadBalancerInfo|null); - - /** Step network. */ - public network?: (google.cloud.networkmanagement.v1.INetworkInfo|null); - - /** Step gkeMaster. */ - public gkeMaster?: (google.cloud.networkmanagement.v1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance. */ - public cloudSqlInstance?: (google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance. */ - public redisInstance?: (google.cloud.networkmanagement.v1.IRedisInstanceInfo|null); - - /** Step redisCluster. */ - public redisCluster?: (google.cloud.networkmanagement.v1.IRedisClusterInfo|null); - - /** Step cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1.ICloudFunctionInfo|null); - - /** Step appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null); - - /** Step nat. */ - public nat?: (google.cloud.networkmanagement.v1.INatInfo|null); - - /** Step proxyConnection. */ - public proxyConnection?: (google.cloud.networkmanagement.v1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo. */ - public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket. */ - public storageBucket?: (google.cloud.networkmanagement.v1.IStorageBucketInfo|null); - - /** Step serverlessNeg. */ - public serverlessNeg?: (google.cloud.networkmanagement.v1.IServerlessNegInfo|null); - - /** Step stepInfo. */ - public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); - - /** - * Creates a new Step instance using the specified properties. - * @param [properties] Properties to set - * @returns Step instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IStep): google.cloud.networkmanagement.v1.Step; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Step message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.Step; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.Step; - - /** - * Verifies a Step message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Step - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.Step; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @param message Step - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Step to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Step - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Step { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - START_FROM_INSTANCE = 1, - START_FROM_INTERNET = 2, - START_FROM_GOOGLE_SERVICE = 27, - START_FROM_PRIVATE_NETWORK = 3, - START_FROM_GKE_MASTER = 21, - START_FROM_CLOUD_SQL_INSTANCE = 22, - START_FROM_REDIS_INSTANCE = 32, - START_FROM_REDIS_CLUSTER = 33, - START_FROM_CLOUD_FUNCTION = 23, - START_FROM_APP_ENGINE_VERSION = 25, - START_FROM_CLOUD_RUN_REVISION = 26, - START_FROM_STORAGE_BUCKET = 29, - START_FROM_PSC_PUBLISHED_SERVICE = 30, - START_FROM_SERVERLESS_NEG = 31, - APPLY_INGRESS_FIREWALL_RULE = 4, - APPLY_EGRESS_FIREWALL_RULE = 5, - APPLY_ROUTE = 6, - APPLY_FORWARDING_RULE = 7, - ANALYZE_LOAD_BALANCER_BACKEND = 28, - SPOOFING_APPROVED = 8, - ARRIVE_AT_INSTANCE = 9, - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, - ARRIVE_AT_VPN_GATEWAY = 12, - ARRIVE_AT_VPN_TUNNEL = 13, - ARRIVE_AT_VPC_CONNECTOR = 24, - NAT = 14, - PROXY_CONNECTION = 15, - DELIVER = 16, - DROP = 17, - FORWARD = 18, - ABORT = 19, - VIEWER_PERMISSION_MISSING = 20 - } - } - - /** Properties of an InstanceInfo. */ - interface IInstanceInfo { - - /** InstanceInfo displayName */ - displayName?: (string|null); - - /** InstanceInfo uri */ - uri?: (string|null); - - /** InstanceInfo interface */ - "interface"?: (string|null); - - /** InstanceInfo networkUri */ - networkUri?: (string|null); - - /** InstanceInfo internalIp */ - internalIp?: (string|null); - - /** InstanceInfo externalIp */ - externalIp?: (string|null); - - /** InstanceInfo networkTags */ - networkTags?: (string[]|null); - - /** InstanceInfo serviceAccount */ - serviceAccount?: (string|null); - - /** InstanceInfo pscNetworkAttachmentUri */ - pscNetworkAttachmentUri?: (string|null); - } - - /** Represents an InstanceInfo. */ - class InstanceInfo implements IInstanceInfo { - - /** - * Constructs a new InstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IInstanceInfo); - - /** InstanceInfo displayName. */ - public displayName: string; - - /** InstanceInfo uri. */ - public uri: string; - - /** InstanceInfo interface. */ - public interface: string; - - /** InstanceInfo networkUri. */ - public networkUri: string; - - /** InstanceInfo internalIp. */ - public internalIp: string; - - /** InstanceInfo externalIp. */ - public externalIp: string; - - /** InstanceInfo networkTags. */ - public networkTags: string[]; - - /** InstanceInfo serviceAccount. */ - public serviceAccount: string; - - /** InstanceInfo pscNetworkAttachmentUri. */ - public pscNetworkAttachmentUri: string; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IInstanceInfo): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Verifies an InstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.InstanceInfo; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @param message InstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInfo. */ - interface INetworkInfo { - - /** NetworkInfo displayName */ - displayName?: (string|null); - - /** NetworkInfo uri */ - uri?: (string|null); - - /** NetworkInfo matchedSubnetUri */ - matchedSubnetUri?: (string|null); - - /** NetworkInfo matchedIpRange */ - matchedIpRange?: (string|null); - - /** NetworkInfo region */ - region?: (string|null); - } - - /** Represents a NetworkInfo. */ - class NetworkInfo implements INetworkInfo { - - /** - * Constructs a new NetworkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.INetworkInfo); - - /** NetworkInfo displayName. */ - public displayName: string; - - /** NetworkInfo uri. */ - public uri: string; - - /** NetworkInfo matchedSubnetUri. */ - public matchedSubnetUri: string; - - /** NetworkInfo matchedIpRange. */ - public matchedIpRange: string; - - /** NetworkInfo region. */ - public region: string; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.INetworkInfo): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Verifies a NetworkInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NetworkInfo; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @param message NetworkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FirewallInfo. */ - interface IFirewallInfo { - - /** FirewallInfo displayName */ - displayName?: (string|null); - - /** FirewallInfo uri */ - uri?: (string|null); - - /** FirewallInfo direction */ - direction?: (string|null); - - /** FirewallInfo action */ - action?: (string|null); - - /** FirewallInfo priority */ - priority?: (number|null); - - /** FirewallInfo networkUri */ - networkUri?: (string|null); - - /** FirewallInfo targetTags */ - targetTags?: (string[]|null); - - /** FirewallInfo targetServiceAccounts */ - targetServiceAccounts?: (string[]|null); - - /** FirewallInfo policy */ - policy?: (string|null); - - /** FirewallInfo policyUri */ - policyUri?: (string|null); - - /** FirewallInfo firewallRuleType */ - firewallRuleType?: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null); - } - - /** Represents a FirewallInfo. */ - class FirewallInfo implements IFirewallInfo { - - /** - * Constructs a new FirewallInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IFirewallInfo); - - /** FirewallInfo displayName. */ - public displayName: string; - - /** FirewallInfo uri. */ - public uri: string; - - /** FirewallInfo direction. */ - public direction: string; - - /** FirewallInfo action. */ - public action: string; - - /** FirewallInfo priority. */ - public priority: number; - - /** FirewallInfo networkUri. */ - public networkUri: string; - - /** FirewallInfo targetTags. */ - public targetTags: string[]; - - /** FirewallInfo targetServiceAccounts. */ - public targetServiceAccounts: string[]; - - /** FirewallInfo policy. */ - public policy: string; - - /** FirewallInfo policyUri. */ - public policyUri: string; - - /** FirewallInfo firewallRuleType. */ - public firewallRuleType: (google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType); - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FirewallInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IFirewallInfo): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Verifies a FirewallInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FirewallInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.FirewallInfo; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @param message FirewallInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FirewallInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FirewallInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FirewallInfo { - - /** FirewallRuleType enum. */ - enum FirewallRuleType { - FIREWALL_RULE_TYPE_UNSPECIFIED = 0, - HIERARCHICAL_FIREWALL_POLICY_RULE = 1, - VPC_FIREWALL_RULE = 2, - IMPLIED_VPC_FIREWALL_RULE = 3, - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, - NETWORK_FIREWALL_POLICY_RULE = 5, - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, - UNSUPPORTED_FIREWALL_POLICY_RULE = 100, - TRACKING_STATE = 101 - } - } - - /** Properties of a RouteInfo. */ - interface IRouteInfo { - - /** RouteInfo routeType */ - routeType?: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType|null); - - /** RouteInfo nextHopType */ - nextHopType?: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null); - - /** RouteInfo routeScope */ - routeScope?: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null); - - /** RouteInfo displayName */ - displayName?: (string|null); - - /** RouteInfo uri */ - uri?: (string|null); - - /** RouteInfo region */ - region?: (string|null); - - /** RouteInfo destIpRange */ - destIpRange?: (string|null); - - /** RouteInfo nextHop */ - nextHop?: (string|null); - - /** RouteInfo networkUri */ - networkUri?: (string|null); - - /** RouteInfo priority */ - priority?: (number|null); - - /** RouteInfo instanceTags */ - instanceTags?: (string[]|null); - - /** RouteInfo srcIpRange */ - srcIpRange?: (string|null); - - /** RouteInfo destPortRanges */ - destPortRanges?: (string[]|null); - - /** RouteInfo srcPortRanges */ - srcPortRanges?: (string[]|null); - - /** RouteInfo protocols */ - protocols?: (string[]|null); - - /** RouteInfo nccHubUri */ - nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri */ - nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri */ - advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri */ - advertisedRouteNextHopUri?: (string|null); - } - - /** Represents a RouteInfo. */ - class RouteInfo implements IRouteInfo { - - /** - * Constructs a new RouteInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRouteInfo); - - /** RouteInfo routeType. */ - public routeType: (google.cloud.networkmanagement.v1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteType); - - /** RouteInfo nextHopType. */ - public nextHopType: (google.cloud.networkmanagement.v1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.NextHopType); - - /** RouteInfo routeScope. */ - public routeScope: (google.cloud.networkmanagement.v1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1.RouteInfo.RouteScope); - - /** RouteInfo displayName. */ - public displayName: string; - - /** RouteInfo uri. */ - public uri: string; - - /** RouteInfo region. */ - public region: string; - - /** RouteInfo destIpRange. */ - public destIpRange: string; - - /** RouteInfo nextHop. */ - public nextHop: string; - - /** RouteInfo networkUri. */ - public networkUri: string; - - /** RouteInfo priority. */ - public priority: number; - - /** RouteInfo instanceTags. */ - public instanceTags: string[]; - - /** RouteInfo srcIpRange. */ - public srcIpRange: string; - - /** RouteInfo destPortRanges. */ - public destPortRanges: string[]; - - /** RouteInfo srcPortRanges. */ - public srcPortRanges: string[]; - - /** RouteInfo protocols. */ - public protocols: string[]; - - /** RouteInfo nccHubUri. */ - public nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri. */ - public nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri. */ - public advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri. */ - public advertisedRouteNextHopUri?: (string|null); - - /** RouteInfo _nccHubUri. */ - public _nccHubUri?: "nccHubUri"; - - /** RouteInfo _nccSpokeUri. */ - public _nccSpokeUri?: "nccSpokeUri"; - - /** RouteInfo _advertisedRouteSourceRouterUri. */ - public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; - - /** RouteInfo _advertisedRouteNextHopUri. */ - public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; - - /** - * Creates a new RouteInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RouteInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRouteInfo): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Verifies a RouteInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RouteInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RouteInfo; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @param message RouteInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RouteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RouteInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RouteInfo { - - /** RouteType enum. */ - enum RouteType { - ROUTE_TYPE_UNSPECIFIED = 0, - SUBNET = 1, - STATIC = 2, - DYNAMIC = 3, - PEERING_SUBNET = 4, - PEERING_STATIC = 5, - PEERING_DYNAMIC = 6, - POLICY_BASED = 7, - ADVERTISED = 101 - } - - /** NextHopType enum. */ - enum NextHopType { - NEXT_HOP_TYPE_UNSPECIFIED = 0, - NEXT_HOP_IP = 1, - NEXT_HOP_INSTANCE = 2, - NEXT_HOP_NETWORK = 3, - NEXT_HOP_PEERING = 4, - NEXT_HOP_INTERCONNECT = 5, - NEXT_HOP_VPN_TUNNEL = 6, - NEXT_HOP_VPN_GATEWAY = 7, - NEXT_HOP_INTERNET_GATEWAY = 8, - NEXT_HOP_BLACKHOLE = 9, - NEXT_HOP_ILB = 10, - NEXT_HOP_ROUTER_APPLIANCE = 11, - NEXT_HOP_NCC_HUB = 12 - } - - /** RouteScope enum. */ - enum RouteScope { - ROUTE_SCOPE_UNSPECIFIED = 0, - NETWORK = 1, - NCC_HUB = 2 - } - } - - /** Properties of a GoogleServiceInfo. */ - interface IGoogleServiceInfo { - - /** GoogleServiceInfo sourceIp */ - sourceIp?: (string|null); - - /** GoogleServiceInfo googleServiceType */ - googleServiceType?: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null); - } - - /** Represents a GoogleServiceInfo. */ - class GoogleServiceInfo implements IGoogleServiceInfo { - - /** - * Constructs a new GoogleServiceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo); - - /** GoogleServiceInfo sourceIp. */ - public sourceIp: string; - - /** GoogleServiceInfo googleServiceType. */ - public googleServiceType: (google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType); - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleServiceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IGoogleServiceInfo): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Verifies a GoogleServiceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleServiceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GoogleServiceInfo; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @param message GoogleServiceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoogleServiceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GoogleServiceInfo { - - /** GoogleServiceType enum. */ - enum GoogleServiceType { - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, - IAP = 1, - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, - CLOUD_DNS = 3, - GOOGLE_API = 4, - GOOGLE_API_PSC = 5, - GOOGLE_API_VPC_SC = 6 - } - } - - /** Properties of a ForwardingRuleInfo. */ - interface IForwardingRuleInfo { - - /** ForwardingRuleInfo displayName */ - displayName?: (string|null); - - /** ForwardingRuleInfo uri */ - uri?: (string|null); - - /** ForwardingRuleInfo matchedProtocol */ - matchedProtocol?: (string|null); - - /** ForwardingRuleInfo matchedPortRange */ - matchedPortRange?: (string|null); - - /** ForwardingRuleInfo vip */ - vip?: (string|null); - - /** ForwardingRuleInfo target */ - target?: (string|null); - - /** ForwardingRuleInfo networkUri */ - networkUri?: (string|null); - - /** ForwardingRuleInfo region */ - region?: (string|null); - - /** ForwardingRuleInfo loadBalancerName */ - loadBalancerName?: (string|null); - - /** ForwardingRuleInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** ForwardingRuleInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a ForwardingRuleInfo. */ - class ForwardingRuleInfo implements IForwardingRuleInfo { - - /** - * Constructs a new ForwardingRuleInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo); - - /** ForwardingRuleInfo displayName. */ - public displayName: string; - - /** ForwardingRuleInfo uri. */ - public uri: string; - - /** ForwardingRuleInfo matchedProtocol. */ - public matchedProtocol: string; - - /** ForwardingRuleInfo matchedPortRange. */ - public matchedPortRange: string; - - /** ForwardingRuleInfo vip. */ - public vip: string; - - /** ForwardingRuleInfo target. */ - public target: string; - - /** ForwardingRuleInfo networkUri. */ - public networkUri: string; - - /** ForwardingRuleInfo region. */ - public region: string; - - /** ForwardingRuleInfo loadBalancerName. */ - public loadBalancerName: string; - - /** ForwardingRuleInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** ForwardingRuleInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardingRuleInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IForwardingRuleInfo): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Verifies a ForwardingRuleInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardingRuleInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardingRuleInfo; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @param message ForwardingRuleInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerInfo. */ - interface ILoadBalancerInfo { - - /** LoadBalancerInfo loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null); - - /** LoadBalancerInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerInfo backends */ - backends?: (google.cloud.networkmanagement.v1.ILoadBalancerBackend[]|null); - - /** LoadBalancerInfo backendType */ - backendType?: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null); - - /** LoadBalancerInfo backendUri */ - backendUri?: (string|null); - } - - /** Represents a LoadBalancerInfo. */ - class LoadBalancerInfo implements ILoadBalancerInfo { - - /** - * Constructs a new LoadBalancerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo); - - /** LoadBalancerInfo loadBalancerType. */ - public loadBalancerType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType); - - /** LoadBalancerInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerInfo backends. */ - public backends: google.cloud.networkmanagement.v1.ILoadBalancerBackend[]; - - /** LoadBalancerInfo backendType. */ - public backendType: (google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType); - - /** LoadBalancerInfo backendUri. */ - public backendUri: string; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerInfo): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Verifies a LoadBalancerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerInfo; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @param message LoadBalancerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerInfo { - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - INTERNAL_TCP_UDP = 1, - NETWORK_TCP_UDP = 2, - HTTP_PROXY = 3, - TCP_PROXY = 4, - SSL_PROXY = 5 - } - - /** BackendType enum. */ - enum BackendType { - BACKEND_TYPE_UNSPECIFIED = 0, - BACKEND_SERVICE = 1, - TARGET_POOL = 2, - TARGET_INSTANCE = 3 - } - } - - /** Properties of a LoadBalancerBackend. */ - interface ILoadBalancerBackend { - - /** LoadBalancerBackend displayName */ - displayName?: (string|null); - - /** LoadBalancerBackend uri */ - uri?: (string|null); - - /** LoadBalancerBackend healthCheckFirewallState */ - healthCheckFirewallState?: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules */ - healthCheckAllowingFirewallRules?: (string[]|null); - - /** LoadBalancerBackend healthCheckBlockingFirewallRules */ - healthCheckBlockingFirewallRules?: (string[]|null); - } - - /** Represents a LoadBalancerBackend. */ - class LoadBalancerBackend implements ILoadBalancerBackend { - - /** - * Constructs a new LoadBalancerBackend. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend); - - /** LoadBalancerBackend displayName. */ - public displayName: string; - - /** LoadBalancerBackend uri. */ - public uri: string; - - /** LoadBalancerBackend healthCheckFirewallState. */ - public healthCheckFirewallState: (google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ - public healthCheckAllowingFirewallRules: string[]; - - /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ - public healthCheckBlockingFirewallRules: string[]; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackend instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackend): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Verifies a LoadBalancerBackend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackend - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackend; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @param message LoadBalancerBackend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackend - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackend { - - /** HealthCheckFirewallState enum. */ - enum HealthCheckFirewallState { - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, - CONFIGURED = 1, - MISCONFIGURED = 2 - } - } - - /** Properties of a VpnGatewayInfo. */ - interface IVpnGatewayInfo { - - /** VpnGatewayInfo displayName */ - displayName?: (string|null); - - /** VpnGatewayInfo uri */ - uri?: (string|null); - - /** VpnGatewayInfo networkUri */ - networkUri?: (string|null); - - /** VpnGatewayInfo ipAddress */ - ipAddress?: (string|null); - - /** VpnGatewayInfo vpnTunnelUri */ - vpnTunnelUri?: (string|null); - - /** VpnGatewayInfo region */ - region?: (string|null); - } - - /** Represents a VpnGatewayInfo. */ - class VpnGatewayInfo implements IVpnGatewayInfo { - - /** - * Constructs a new VpnGatewayInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo); - - /** VpnGatewayInfo displayName. */ - public displayName: string; - - /** VpnGatewayInfo uri. */ - public uri: string; - - /** VpnGatewayInfo networkUri. */ - public networkUri: string; - - /** VpnGatewayInfo ipAddress. */ - public ipAddress: string; - - /** VpnGatewayInfo vpnTunnelUri. */ - public vpnTunnelUri: string; - - /** VpnGatewayInfo region. */ - public region: string; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnGatewayInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IVpnGatewayInfo): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Verifies a VpnGatewayInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnGatewayInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnGatewayInfo; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @param message VpnGatewayInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnGatewayInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpnTunnelInfo. */ - interface IVpnTunnelInfo { - - /** VpnTunnelInfo displayName */ - displayName?: (string|null); - - /** VpnTunnelInfo uri */ - uri?: (string|null); - - /** VpnTunnelInfo sourceGateway */ - sourceGateway?: (string|null); - - /** VpnTunnelInfo remoteGateway */ - remoteGateway?: (string|null); - - /** VpnTunnelInfo remoteGatewayIp */ - remoteGatewayIp?: (string|null); - - /** VpnTunnelInfo sourceGatewayIp */ - sourceGatewayIp?: (string|null); - - /** VpnTunnelInfo networkUri */ - networkUri?: (string|null); - - /** VpnTunnelInfo region */ - region?: (string|null); - - /** VpnTunnelInfo routingType */ - routingType?: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null); - } - - /** Represents a VpnTunnelInfo. */ - class VpnTunnelInfo implements IVpnTunnelInfo { - - /** - * Constructs a new VpnTunnelInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo); - - /** VpnTunnelInfo displayName. */ - public displayName: string; - - /** VpnTunnelInfo uri. */ - public uri: string; - - /** VpnTunnelInfo sourceGateway. */ - public sourceGateway: string; - - /** VpnTunnelInfo remoteGateway. */ - public remoteGateway: string; - - /** VpnTunnelInfo remoteGatewayIp. */ - public remoteGatewayIp: string; - - /** VpnTunnelInfo sourceGatewayIp. */ - public sourceGatewayIp: string; - - /** VpnTunnelInfo networkUri. */ - public networkUri: string; - - /** VpnTunnelInfo region. */ - public region: string; - - /** VpnTunnelInfo routingType. */ - public routingType: (google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType); - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnTunnelInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IVpnTunnelInfo): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Verifies a VpnTunnelInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnTunnelInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpnTunnelInfo; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @param message VpnTunnelInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnTunnelInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VpnTunnelInfo { - - /** RoutingType enum. */ - enum RoutingType { - ROUTING_TYPE_UNSPECIFIED = 0, - ROUTE_BASED = 1, - POLICY_BASED = 2, - DYNAMIC = 3 - } - } - - /** Properties of an EndpointInfo. */ - interface IEndpointInfo { - - /** EndpointInfo sourceIp */ - sourceIp?: (string|null); - - /** EndpointInfo destinationIp */ - destinationIp?: (string|null); - - /** EndpointInfo protocol */ - protocol?: (string|null); - - /** EndpointInfo sourcePort */ - sourcePort?: (number|null); - - /** EndpointInfo destinationPort */ - destinationPort?: (number|null); - - /** EndpointInfo sourceNetworkUri */ - sourceNetworkUri?: (string|null); - - /** EndpointInfo destinationNetworkUri */ - destinationNetworkUri?: (string|null); - - /** EndpointInfo sourceAgentUri */ - sourceAgentUri?: (string|null); - } - - /** Represents an EndpointInfo. */ - class EndpointInfo implements IEndpointInfo { - - /** - * Constructs a new EndpointInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IEndpointInfo); - - /** EndpointInfo sourceIp. */ - public sourceIp: string; - - /** EndpointInfo destinationIp. */ - public destinationIp: string; - - /** EndpointInfo protocol. */ - public protocol: string; - - /** EndpointInfo sourcePort. */ - public sourcePort: number; - - /** EndpointInfo destinationPort. */ - public destinationPort: number; - - /** EndpointInfo sourceNetworkUri. */ - public sourceNetworkUri: string; - - /** EndpointInfo destinationNetworkUri. */ - public destinationNetworkUri: string; - - /** EndpointInfo sourceAgentUri. */ - public sourceAgentUri: string; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IEndpointInfo): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Verifies an EndpointInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.EndpointInfo; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @param message EndpointInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeliverInfo. */ - interface IDeliverInfo { - - /** DeliverInfo target */ - target?: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target|null); - - /** DeliverInfo resourceUri */ - resourceUri?: (string|null); - - /** DeliverInfo ipAddress */ - ipAddress?: (string|null); - - /** DeliverInfo storageBucket */ - storageBucket?: (string|null); - - /** DeliverInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a DeliverInfo. */ - class DeliverInfo implements IDeliverInfo { - - /** - * Constructs a new DeliverInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IDeliverInfo); - - /** DeliverInfo target. */ - public target: (google.cloud.networkmanagement.v1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1.DeliverInfo.Target); - - /** DeliverInfo resourceUri. */ - public resourceUri: string; - - /** DeliverInfo ipAddress. */ - public ipAddress: string; - - /** DeliverInfo storageBucket. */ - public storageBucket: string; - - /** DeliverInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DeliverInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IDeliverInfo): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Verifies a DeliverInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeliverInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeliverInfo; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @param message DeliverInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeliverInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeliverInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeliverInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - INTERNET = 2, - GOOGLE_API = 3, - GKE_MASTER = 4, - CLOUD_SQL_INSTANCE = 5, - PSC_PUBLISHED_SERVICE = 6, - PSC_GOOGLE_API = 7, - PSC_VPC_SC = 8, - SERVERLESS_NEG = 9, - STORAGE_BUCKET = 10, - PRIVATE_NETWORK = 11, - CLOUD_FUNCTION = 12, - APP_ENGINE_VERSION = 13, - CLOUD_RUN_REVISION = 14, - GOOGLE_MANAGED_SERVICE = 15, - REDIS_INSTANCE = 16, - REDIS_CLUSTER = 17 - } - } - - /** Properties of a ForwardInfo. */ - interface IForwardInfo { - - /** ForwardInfo target */ - target?: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target|null); - - /** ForwardInfo resourceUri */ - resourceUri?: (string|null); - - /** ForwardInfo ipAddress */ - ipAddress?: (string|null); - } - - /** Represents a ForwardInfo. */ - class ForwardInfo implements IForwardInfo { - - /** - * Constructs a new ForwardInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IForwardInfo); - - /** ForwardInfo target. */ - public target: (google.cloud.networkmanagement.v1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1.ForwardInfo.Target); - - /** ForwardInfo resourceUri. */ - public resourceUri: string; - - /** ForwardInfo ipAddress. */ - public ipAddress: string; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IForwardInfo): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Verifies a ForwardInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ForwardInfo; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @param message ForwardInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ForwardInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - PEERING_VPC = 1, - VPN_GATEWAY = 2, - INTERCONNECT = 3, - GKE_MASTER = 4, - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, - CLOUD_SQL_INSTANCE = 6, - ANOTHER_PROJECT = 7, - NCC_HUB = 8, - ROUTER_APPLIANCE = 9 - } - } - - /** Properties of an AbortInfo. */ - interface IAbortInfo { - - /** AbortInfo cause */ - cause?: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause|null); - - /** AbortInfo resourceUri */ - resourceUri?: (string|null); - - /** AbortInfo ipAddress */ - ipAddress?: (string|null); - - /** AbortInfo projectsMissingPermission */ - projectsMissingPermission?: (string[]|null); - } - - /** Represents an AbortInfo. */ - class AbortInfo implements IAbortInfo { - - /** - * Constructs a new AbortInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IAbortInfo); - - /** AbortInfo cause. */ - public cause: (google.cloud.networkmanagement.v1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.AbortInfo.Cause); - - /** AbortInfo resourceUri. */ - public resourceUri: string; - - /** AbortInfo ipAddress. */ - public ipAddress: string; - - /** AbortInfo projectsMissingPermission. */ - public projectsMissingPermission: string[]; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AbortInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IAbortInfo): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Verifies an AbortInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AbortInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AbortInfo; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @param message AbortInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AbortInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AbortInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AbortInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_NETWORK = 1, - UNKNOWN_PROJECT = 3, - NO_EXTERNAL_IP = 7, - UNINTENDED_DESTINATION = 8, - SOURCE_ENDPOINT_NOT_FOUND = 11, - MISMATCHED_SOURCE_NETWORK = 12, - DESTINATION_ENDPOINT_NOT_FOUND = 13, - MISMATCHED_DESTINATION_NETWORK = 14, - UNKNOWN_IP = 2, - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, - PERMISSION_DENIED = 4, - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, - NO_SOURCE_LOCATION = 5, - INVALID_ARGUMENT = 6, - TRACE_TOO_LONG = 9, - INTERNAL_ERROR = 10, - UNSUPPORTED = 15, - MISMATCHED_IP_VERSION = 16, - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, - RESOURCE_CONFIG_NOT_FOUND = 18, - VM_INSTANCE_CONFIG_NOT_FOUND = 24, - NETWORK_CONFIG_NOT_FOUND = 25, - FIREWALL_CONFIG_NOT_FOUND = 26, - ROUTE_CONFIG_NOT_FOUND = 27, - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, - NON_ROUTABLE_IP_ADDRESS = 22, - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 - } - } - - /** Properties of a DropInfo. */ - interface IDropInfo { - - /** DropInfo cause */ - cause?: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause|null); - - /** DropInfo resourceUri */ - resourceUri?: (string|null); - - /** DropInfo sourceIp */ - sourceIp?: (string|null); - - /** DropInfo destinationIp */ - destinationIp?: (string|null); - - /** DropInfo region */ - region?: (string|null); - } - - /** Represents a DropInfo. */ - class DropInfo implements IDropInfo { - - /** - * Constructs a new DropInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IDropInfo); - - /** DropInfo cause. */ - public cause: (google.cloud.networkmanagement.v1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1.DropInfo.Cause); - - /** DropInfo resourceUri. */ - public resourceUri: string; - - /** DropInfo sourceIp. */ - public sourceIp: string; - - /** DropInfo destinationIp. */ - public destinationIp: string; - - /** DropInfo region. */ - public region: string; - - /** - * Creates a new DropInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DropInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IDropInfo): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Verifies a DropInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DropInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DropInfo; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @param message DropInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DropInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DropInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DropInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_EXTERNAL_ADDRESS = 1, - FOREIGN_IP_DISALLOWED = 2, - FIREWALL_RULE = 3, - NO_ROUTE = 4, - ROUTE_BLACKHOLE = 5, - ROUTE_WRONG_NETWORK = 6, - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, - PRIVATE_TRAFFIC_TO_INTERNET = 7, - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, - NO_EXTERNAL_ADDRESS = 9, - UNKNOWN_INTERNAL_ADDRESS = 10, - FORWARDING_RULE_MISMATCH = 11, - FORWARDING_RULE_NO_INSTANCES = 12, - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, - INSTANCE_NOT_RUNNING = 14, - GKE_CLUSTER_NOT_RUNNING = 27, - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, - REDIS_INSTANCE_NOT_RUNNING = 68, - REDIS_CLUSTER_NOT_RUNNING = 69, - TRAFFIC_TYPE_BLOCKED = 15, - GKE_MASTER_UNAUTHORIZED_ACCESS = 16, - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, - DROPPED_INSIDE_GKE_SERVICE = 18, - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, - GKE_PSC_ENDPOINT_MISSING = 36, - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, - GKE_CONTROL_PLANE_REGION_MISMATCH = 30, - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, - GKE_CONTROL_PLANE_NO_ROUTE = 32, - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, - CLOUD_SQL_INSTANCE_NO_ROUTE = 35, - CLOUD_SQL_CONNECTOR_REQUIRED = 63, - CLOUD_FUNCTION_NOT_ACTIVE = 22, - VPC_CONNECTOR_NOT_SET = 23, - VPC_CONNECTOR_NOT_RUNNING = 24, - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, - FORWARDING_RULE_REGION_MISMATCH = 25, - PSC_CONNECTION_NOT_ACCEPTED = 26, - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, - PSC_TRANSITIVITY_NOT_PROPAGATED = 64, - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, - CLOUD_RUN_REVISION_NOT_READY = 29, - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, - CLOUD_NAT_NO_ADDRESSES = 40, - ROUTING_LOOP = 59, - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, - REDIS_INSTANCE_UNSUPPORTED_PORT = 71, - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, - REDIS_INSTANCE_NO_EXTERNAL_IP = 74, - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, - REDIS_CLUSTER_UNSUPPORTED_PORT = 76, - REDIS_CLUSTER_NO_EXTERNAL_IP = 77, - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 - } - } - - /** Properties of a GKEMasterInfo. */ - interface IGKEMasterInfo { - - /** GKEMasterInfo clusterUri */ - clusterUri?: (string|null); - - /** GKEMasterInfo clusterNetworkUri */ - clusterNetworkUri?: (string|null); - - /** GKEMasterInfo internalIp */ - internalIp?: (string|null); - - /** GKEMasterInfo externalIp */ - externalIp?: (string|null); - - /** GKEMasterInfo dnsEndpoint */ - dnsEndpoint?: (string|null); - } - - /** Represents a GKEMasterInfo. */ - class GKEMasterInfo implements IGKEMasterInfo { - - /** - * Constructs a new GKEMasterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo); - - /** GKEMasterInfo clusterUri. */ - public clusterUri: string; - - /** GKEMasterInfo clusterNetworkUri. */ - public clusterNetworkUri: string; - - /** GKEMasterInfo internalIp. */ - public internalIp: string; - - /** GKEMasterInfo externalIp. */ - public externalIp: string; - - /** GKEMasterInfo dnsEndpoint. */ - public dnsEndpoint: string; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GKEMasterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IGKEMasterInfo): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Verifies a GKEMasterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GKEMasterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GKEMasterInfo; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @param message GKEMasterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GKEMasterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GKEMasterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudSQLInstanceInfo. */ - interface ICloudSQLInstanceInfo { - - /** CloudSQLInstanceInfo displayName */ - displayName?: (string|null); - - /** CloudSQLInstanceInfo uri */ - uri?: (string|null); - - /** CloudSQLInstanceInfo networkUri */ - networkUri?: (string|null); - - /** CloudSQLInstanceInfo internalIp */ - internalIp?: (string|null); - - /** CloudSQLInstanceInfo externalIp */ - externalIp?: (string|null); - - /** CloudSQLInstanceInfo region */ - region?: (string|null); - } - - /** Represents a CloudSQLInstanceInfo. */ - class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { - - /** - * Constructs a new CloudSQLInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo); - - /** CloudSQLInstanceInfo displayName. */ - public displayName: string; - - /** CloudSQLInstanceInfo uri. */ - public uri: string; - - /** CloudSQLInstanceInfo networkUri. */ - public networkUri: string; - - /** CloudSQLInstanceInfo internalIp. */ - public internalIp: string; - - /** CloudSQLInstanceInfo externalIp. */ - public externalIp: string; - - /** CloudSQLInstanceInfo region. */ - public region: string; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudSQLInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudSQLInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudSQLInstanceInfo; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @param message CloudSQLInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisInstanceInfo. */ - interface IRedisInstanceInfo { - - /** RedisInstanceInfo displayName */ - displayName?: (string|null); - - /** RedisInstanceInfo uri */ - uri?: (string|null); - - /** RedisInstanceInfo networkUri */ - networkUri?: (string|null); - - /** RedisInstanceInfo primaryEndpointIp */ - primaryEndpointIp?: (string|null); - - /** RedisInstanceInfo readEndpointIp */ - readEndpointIp?: (string|null); - - /** RedisInstanceInfo region */ - region?: (string|null); - } - - /** Represents a RedisInstanceInfo. */ - class RedisInstanceInfo implements IRedisInstanceInfo { - - /** - * Constructs a new RedisInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo); - - /** RedisInstanceInfo displayName. */ - public displayName: string; - - /** RedisInstanceInfo uri. */ - public uri: string; - - /** RedisInstanceInfo networkUri. */ - public networkUri: string; - - /** RedisInstanceInfo primaryEndpointIp. */ - public primaryEndpointIp: string; - - /** RedisInstanceInfo readEndpointIp. */ - public readEndpointIp: string; - - /** RedisInstanceInfo region. */ - public region: string; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRedisInstanceInfo): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Verifies a RedisInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisInstanceInfo; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @param message RedisInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisClusterInfo. */ - interface IRedisClusterInfo { - - /** RedisClusterInfo displayName */ - displayName?: (string|null); - - /** RedisClusterInfo uri */ - uri?: (string|null); - - /** RedisClusterInfo networkUri */ - networkUri?: (string|null); - - /** RedisClusterInfo discoveryEndpointIpAddress */ - discoveryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo secondaryEndpointIpAddress */ - secondaryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo location */ - location?: (string|null); - } - - /** Represents a RedisClusterInfo. */ - class RedisClusterInfo implements IRedisClusterInfo { - - /** - * Constructs a new RedisClusterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo); - - /** RedisClusterInfo displayName. */ - public displayName: string; - - /** RedisClusterInfo uri. */ - public uri: string; - - /** RedisClusterInfo networkUri. */ - public networkUri: string; - - /** RedisClusterInfo discoveryEndpointIpAddress. */ - public discoveryEndpointIpAddress: string; - - /** RedisClusterInfo secondaryEndpointIpAddress. */ - public secondaryEndpointIpAddress: string; - - /** RedisClusterInfo location. */ - public location: string; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisClusterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRedisClusterInfo): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Verifies a RedisClusterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisClusterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RedisClusterInfo; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @param message RedisClusterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisClusterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisClusterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudFunctionInfo. */ - interface ICloudFunctionInfo { - - /** CloudFunctionInfo displayName */ - displayName?: (string|null); - - /** CloudFunctionInfo uri */ - uri?: (string|null); - - /** CloudFunctionInfo location */ - location?: (string|null); - - /** CloudFunctionInfo versionId */ - versionId?: (number|Long|string|null); - } - - /** Represents a CloudFunctionInfo. */ - class CloudFunctionInfo implements ICloudFunctionInfo { - - /** - * Constructs a new CloudFunctionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo); - - /** CloudFunctionInfo displayName. */ - public displayName: string; - - /** CloudFunctionInfo uri. */ - public uri: string; - - /** CloudFunctionInfo location. */ - public location: string; - - /** CloudFunctionInfo versionId. */ - public versionId: (number|Long|string); - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICloudFunctionInfo): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Verifies a CloudFunctionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudFunctionInfo; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @param message CloudFunctionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionInfo. */ - interface ICloudRunRevisionInfo { - - /** CloudRunRevisionInfo displayName */ - displayName?: (string|null); - - /** CloudRunRevisionInfo uri */ - uri?: (string|null); - - /** CloudRunRevisionInfo location */ - location?: (string|null); - - /** CloudRunRevisionInfo serviceUri */ - serviceUri?: (string|null); - } - - /** Represents a CloudRunRevisionInfo. */ - class CloudRunRevisionInfo implements ICloudRunRevisionInfo { - - /** - * Constructs a new CloudRunRevisionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo); - - /** CloudRunRevisionInfo displayName. */ - public displayName: string; - - /** CloudRunRevisionInfo uri. */ - public uri: string; - - /** CloudRunRevisionInfo location. */ - public location: string; - - /** CloudRunRevisionInfo serviceUri. */ - public serviceUri: string; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Verifies a CloudRunRevisionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CloudRunRevisionInfo; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @param message CloudRunRevisionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionInfo. */ - interface IAppEngineVersionInfo { - - /** AppEngineVersionInfo displayName */ - displayName?: (string|null); - - /** AppEngineVersionInfo uri */ - uri?: (string|null); - - /** AppEngineVersionInfo runtime */ - runtime?: (string|null); - - /** AppEngineVersionInfo environment */ - environment?: (string|null); - } - - /** Represents an AppEngineVersionInfo. */ - class AppEngineVersionInfo implements IAppEngineVersionInfo { - - /** - * Constructs a new AppEngineVersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo); - - /** AppEngineVersionInfo displayName. */ - public displayName: string; - - /** AppEngineVersionInfo uri. */ - public uri: string; - - /** AppEngineVersionInfo runtime. */ - public runtime: string; - - /** AppEngineVersionInfo environment. */ - public environment: string; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Verifies an AppEngineVersionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.AppEngineVersionInfo; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @param message AppEngineVersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcConnectorInfo. */ - interface IVpcConnectorInfo { - - /** VpcConnectorInfo displayName */ - displayName?: (string|null); - - /** VpcConnectorInfo uri */ - uri?: (string|null); - - /** VpcConnectorInfo location */ - location?: (string|null); - } - - /** Represents a VpcConnectorInfo. */ - class VpcConnectorInfo implements IVpcConnectorInfo { - - /** - * Constructs a new VpcConnectorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo); - - /** VpcConnectorInfo displayName. */ - public displayName: string; - - /** VpcConnectorInfo uri. */ - public uri: string; - - /** VpcConnectorInfo location. */ - public location: string; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcConnectorInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IVpcConnectorInfo): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Verifies a VpcConnectorInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcConnectorInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.VpcConnectorInfo; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @param message VpcConnectorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcConnectorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NatInfo. */ - interface INatInfo { - - /** NatInfo type */ - type?: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type|null); - - /** NatInfo protocol */ - protocol?: (string|null); - - /** NatInfo networkUri */ - networkUri?: (string|null); - - /** NatInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** NatInfo newSourceIp */ - newSourceIp?: (string|null); - - /** NatInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** NatInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** NatInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** NatInfo newSourcePort */ - newSourcePort?: (number|null); - - /** NatInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** NatInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** NatInfo routerUri */ - routerUri?: (string|null); - - /** NatInfo natGatewayName */ - natGatewayName?: (string|null); - } - - /** Represents a NatInfo. */ - class NatInfo implements INatInfo { - - /** - * Constructs a new NatInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.INatInfo); - - /** NatInfo type. */ - public type: (google.cloud.networkmanagement.v1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1.NatInfo.Type); - - /** NatInfo protocol. */ - public protocol: string; - - /** NatInfo networkUri. */ - public networkUri: string; - - /** NatInfo oldSourceIp. */ - public oldSourceIp: string; - - /** NatInfo newSourceIp. */ - public newSourceIp: string; - - /** NatInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** NatInfo newDestinationIp. */ - public newDestinationIp: string; - - /** NatInfo oldSourcePort. */ - public oldSourcePort: number; - - /** NatInfo newSourcePort. */ - public newSourcePort: number; - - /** NatInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** NatInfo newDestinationPort. */ - public newDestinationPort: number; - - /** NatInfo routerUri. */ - public routerUri: string; - - /** NatInfo natGatewayName. */ - public natGatewayName: string; - - /** - * Creates a new NatInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NatInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.INatInfo): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Verifies a NatInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NatInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.NatInfo; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @param message NatInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NatInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NatInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NatInfo { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INTERNAL_TO_EXTERNAL = 1, - EXTERNAL_TO_INTERNAL = 2, - CLOUD_NAT = 3, - PRIVATE_SERVICE_CONNECT = 4 - } - } - - /** Properties of a ProxyConnectionInfo. */ - interface IProxyConnectionInfo { - - /** ProxyConnectionInfo protocol */ - protocol?: (string|null); - - /** ProxyConnectionInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** ProxyConnectionInfo newSourceIp */ - newSourceIp?: (string|null); - - /** ProxyConnectionInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** ProxyConnectionInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** ProxyConnectionInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** ProxyConnectionInfo newSourcePort */ - newSourcePort?: (number|null); - - /** ProxyConnectionInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** ProxyConnectionInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** ProxyConnectionInfo subnetUri */ - subnetUri?: (string|null); - - /** ProxyConnectionInfo networkUri */ - networkUri?: (string|null); - } - - /** Represents a ProxyConnectionInfo. */ - class ProxyConnectionInfo implements IProxyConnectionInfo { - - /** - * Constructs a new ProxyConnectionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo); - - /** ProxyConnectionInfo protocol. */ - public protocol: string; - - /** ProxyConnectionInfo oldSourceIp. */ - public oldSourceIp: string; - - /** ProxyConnectionInfo newSourceIp. */ - public newSourceIp: string; - - /** ProxyConnectionInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** ProxyConnectionInfo newDestinationIp. */ - public newDestinationIp: string; - - /** ProxyConnectionInfo oldSourcePort. */ - public oldSourcePort: number; - - /** ProxyConnectionInfo newSourcePort. */ - public newSourcePort: number; - - /** ProxyConnectionInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** ProxyConnectionInfo newDestinationPort. */ - public newDestinationPort: number; - - /** ProxyConnectionInfo subnetUri. */ - public subnetUri: string; - - /** ProxyConnectionInfo networkUri. */ - public networkUri: string; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ProxyConnectionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IProxyConnectionInfo): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Verifies a ProxyConnectionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProxyConnectionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ProxyConnectionInfo; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @param message ProxyConnectionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerBackendInfo. */ - interface ILoadBalancerBackendInfo { - - /** LoadBalancerBackendInfo name */ - name?: (string|null); - - /** LoadBalancerBackendInfo instanceUri */ - instanceUri?: (string|null); - - /** LoadBalancerBackendInfo backendServiceUri */ - backendServiceUri?: (string|null); - - /** LoadBalancerBackendInfo instanceGroupUri */ - instanceGroupUri?: (string|null); - - /** LoadBalancerBackendInfo networkEndpointGroupUri */ - networkEndpointGroupUri?: (string|null); - - /** LoadBalancerBackendInfo backendBucketUri */ - backendBucketUri?: (string|null); - - /** LoadBalancerBackendInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** LoadBalancerBackendInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - - /** LoadBalancerBackendInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ - healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); - } - - /** Represents a LoadBalancerBackendInfo. */ - class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { - - /** - * Constructs a new LoadBalancerBackendInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo); - - /** LoadBalancerBackendInfo name. */ - public name: string; - - /** LoadBalancerBackendInfo instanceUri. */ - public instanceUri: string; - - /** LoadBalancerBackendInfo backendServiceUri. */ - public backendServiceUri: string; - - /** LoadBalancerBackendInfo instanceGroupUri. */ - public instanceGroupUri: string; - - /** LoadBalancerBackendInfo networkEndpointGroupUri. */ - public networkEndpointGroupUri: string; - - /** LoadBalancerBackendInfo backendBucketUri. */ - public backendBucketUri: string; - - /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** LoadBalancerBackendInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** LoadBalancerBackendInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ - public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackendInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackendInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.LoadBalancerBackendInfo; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @param message LoadBalancerBackendInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackendInfo { - - /** HealthCheckFirewallsConfigState enum. */ - enum HealthCheckFirewallsConfigState { - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, - FIREWALLS_CONFIGURED = 1, - FIREWALLS_PARTIALLY_CONFIGURED = 2, - FIREWALLS_NOT_CONFIGURED = 3, - FIREWALLS_UNSUPPORTED = 4 - } - } - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - HTTPS_ADVANCED_LOAD_BALANCER = 1, - HTTPS_LOAD_BALANCER = 2, - REGIONAL_HTTPS_LOAD_BALANCER = 3, - INTERNAL_HTTPS_LOAD_BALANCER = 4, - SSL_PROXY_LOAD_BALANCER = 5, - TCP_PROXY_LOAD_BALANCER = 6, - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, - NETWORK_LOAD_BALANCER = 8, - LEGACY_NETWORK_LOAD_BALANCER = 9, - TCP_UDP_INTERNAL_LOAD_BALANCER = 10 - } - - /** Properties of a StorageBucketInfo. */ - interface IStorageBucketInfo { - - /** StorageBucketInfo bucket */ - bucket?: (string|null); - } - - /** Represents a StorageBucketInfo. */ - class StorageBucketInfo implements IStorageBucketInfo { - - /** - * Constructs a new StorageBucketInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo); - - /** StorageBucketInfo bucket. */ - public bucket: string; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageBucketInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IStorageBucketInfo): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Verifies a StorageBucketInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageBucketInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.StorageBucketInfo; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @param message StorageBucketInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageBucketInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageBucketInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerlessNegInfo. */ - interface IServerlessNegInfo { - - /** ServerlessNegInfo negUri */ - negUri?: (string|null); - } - - /** Represents a ServerlessNegInfo. */ - class ServerlessNegInfo implements IServerlessNegInfo { - - /** - * Constructs a new ServerlessNegInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo); - - /** ServerlessNegInfo negUri. */ - public negUri: string; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerlessNegInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IServerlessNegInfo): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Verifies a ServerlessNegInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerlessNegInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ServerlessNegInfo; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @param message ServerlessNegInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerlessNegInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a ReachabilityService */ - class ReachabilityService extends $protobuf.rpc.Service { - - /** - * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback): void; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @returns Promise - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): Promise; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConnectivityTest - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback): void; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @returns Promise - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): Promise; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback): void; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @returns Promise - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): Promise; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback): void; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @returns Promise - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): Promise; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback): void; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @returns Promise - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): Promise; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback): void; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @returns Promise - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): Promise; - } - - namespace ReachabilityService { - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. - * @param error Error, if any - * @param [response] ListConnectivityTestsResponse - */ - type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. - * @param error Error, if any - * @param [response] ConnectivityTest - */ - type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1.ConnectivityTest) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a ListConnectivityTestsRequest. */ - interface IListConnectivityTestsRequest { - - /** ListConnectivityTestsRequest parent */ - parent?: (string|null); - - /** ListConnectivityTestsRequest pageSize */ - pageSize?: (number|null); - - /** ListConnectivityTestsRequest pageToken */ - pageToken?: (string|null); - - /** ListConnectivityTestsRequest filter */ - filter?: (string|null); - - /** ListConnectivityTestsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListConnectivityTestsRequest. */ - class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { - - /** - * Constructs a new ListConnectivityTestsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest); - - /** ListConnectivityTestsRequest parent. */ - public parent: string; - - /** ListConnectivityTestsRequest pageSize. */ - public pageSize: number; - - /** ListConnectivityTestsRequest pageToken. */ - public pageToken: string; - - /** ListConnectivityTestsRequest filter. */ - public filter: string; - - /** ListConnectivityTestsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsRequest; - - /** - * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @param message ListConnectivityTestsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectivityTestsResponse. */ - interface IListConnectivityTestsResponse { - - /** ListConnectivityTestsResponse resources */ - resources?: (google.cloud.networkmanagement.v1.IConnectivityTest[]|null); - - /** ListConnectivityTestsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListConnectivityTestsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListConnectivityTestsResponse. */ - class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { - - /** - * Constructs a new ListConnectivityTestsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse); - - /** ListConnectivityTestsResponse resources. */ - public resources: google.cloud.networkmanagement.v1.IConnectivityTest[]; - - /** ListConnectivityTestsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListConnectivityTestsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsResponse instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.ListConnectivityTestsResponse; - - /** - * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @param message ListConnectivityTestsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityTestRequest. */ - interface IGetConnectivityTestRequest { - - /** GetConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a GetConnectivityTestRequest. */ - class GetConnectivityTestRequest implements IGetConnectivityTestRequest { - - /** - * Constructs a new GetConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest); - - /** GetConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Verifies a GetConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.GetConnectivityTestRequest; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @param message GetConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectivityTestRequest. */ - interface ICreateConnectivityTestRequest { - - /** CreateConnectivityTestRequest parent */ - parent?: (string|null); - - /** CreateConnectivityTestRequest testId */ - testId?: (string|null); - - /** CreateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - } - - /** Represents a CreateConnectivityTestRequest. */ - class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { - - /** - * Constructs a new CreateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest); - - /** CreateConnectivityTestRequest parent. */ - public parent: string; - - /** CreateConnectivityTestRequest testId. */ - public testId: string; - - /** CreateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.CreateConnectivityTestRequest; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message CreateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateConnectivityTestRequest. */ - interface IUpdateConnectivityTestRequest { - - /** UpdateConnectivityTestRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - } - - /** Represents an UpdateConnectivityTestRequest. */ - class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest); - - /** UpdateConnectivityTestRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1.IConnectivityTest|null); - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message UpdateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectivityTestRequest. */ - interface IDeleteConnectivityTestRequest { - - /** DeleteConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a DeleteConnectivityTestRequest. */ - class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest); - - /** DeleteConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @param message DeleteConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RerunConnectivityTestRequest. */ - interface IRerunConnectivityTestRequest { - - /** RerunConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a RerunConnectivityTestRequest. */ - class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { - - /** - * Constructs a new RerunConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest); - - /** RerunConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RerunConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RerunConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1.RerunConnectivityTestRequest; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @param message RerunConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RerunConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @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 statusDetail */ - statusDetail?: (string|null); - - /** OperationMetadata cancelRequested */ - cancelRequested?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.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 statusDetail. */ - public statusDetail: string; - - /** OperationMetadata cancelRequested. */ - public cancelRequested: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.networkmanagement.v1.IOperationMetadata): google.cloud.networkmanagement.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.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; - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a 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 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 - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of 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-networkmanagement/v1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js deleted file mode 100644 index e7b5bf407e0..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.js +++ /dev/null @@ -1,40473 +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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.networkmanagement = (function() { - - /** - * Namespace networkmanagement. - * @memberof google.cloud - * @namespace - */ - var networkmanagement = {}; - - networkmanagement.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.networkmanagement - * @namespace - */ - var v1 = {}; - - v1.ConnectivityTest = (function() { - - /** - * Properties of a ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IConnectivityTest - * @property {string|null} [name] ConnectivityTest name - * @property {string|null} [description] ConnectivityTest description - * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [source] ConnectivityTest source - * @property {google.cloud.networkmanagement.v1.IEndpoint|null} [destination] ConnectivityTest destination - * @property {string|null} [protocol] ConnectivityTest protocol - * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects - * @property {string|null} [displayName] ConnectivityTest displayName - * @property {Object.|null} [labels] ConnectivityTest labels - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime - * @property {google.cloud.networkmanagement.v1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails - * @property {google.cloud.networkmanagement.v1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails - * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks - */ - - /** - * Constructs a new ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ConnectivityTest. - * @implements IConnectivityTest - * @constructor - * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set - */ - function ConnectivityTest(properties) { - this.relatedProjects = []; - 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]]; - } - - /** - * ConnectivityTest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.name = ""; - - /** - * ConnectivityTest description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.description = ""; - - /** - * ConnectivityTest source. - * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} source - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.source = null; - - /** - * ConnectivityTest destination. - * @member {google.cloud.networkmanagement.v1.IEndpoint|null|undefined} destination - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.destination = null; - - /** - * ConnectivityTest protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.protocol = ""; - - /** - * ConnectivityTest relatedProjects. - * @member {Array.} relatedProjects - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.relatedProjects = $util.emptyArray; - - /** - * ConnectivityTest displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.displayName = ""; - - /** - * ConnectivityTest labels. - * @member {Object.} labels - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.labels = $util.emptyObject; - - /** - * ConnectivityTest createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.createTime = null; - - /** - * ConnectivityTest updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.updateTime = null; - - /** - * ConnectivityTest reachabilityDetails. - * @member {google.cloud.networkmanagement.v1.IReachabilityDetails|null|undefined} reachabilityDetails - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.reachabilityDetails = null; - - /** - * ConnectivityTest probingDetails. - * @member {google.cloud.networkmanagement.v1.IProbingDetails|null|undefined} probingDetails - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.probingDetails = null; - - /** - * ConnectivityTest bypassFirewallChecks. - * @member {boolean} bypassFirewallChecks - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.bypassFirewallChecks = false; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.IConnectivityTest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest instance - */ - ConnectivityTest.create = function create(properties) { - return new ConnectivityTest(properties); - }; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encode = function encode(message, writer) { - if (!writer) - 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.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - $root.google.cloud.networkmanagement.v1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); - if (message.relatedProjects != null && message.relatedProjects.length) - for (var i = 0; i < message.relatedProjects.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) - $root.google.cloud.networkmanagement.v1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) - $root.google.cloud.networkmanagement.v1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); - return writer; - }; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ConnectivityTest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 5: { - message.protocol = reader.string(); - break; - } - case 6: { - if (!(message.relatedProjects && message.relatedProjects.length)) - message.relatedProjects = []; - message.relatedProjects.push(reader.string()); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 8: { - 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 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.decode(reader, reader.uint32()); - break; - } - case 14: { - message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.decode(reader, reader.uint32()); - break; - } - case 17: { - message.bypassFirewallChecks = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectivityTest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectivityTest.verify = function verify(message) { - if (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.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.source); - if (error) - return "source." + error; - } - if (message.destination != null && message.hasOwnProperty("destination")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.verify(message.destination); - if (error) - return "destination." + error; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { - if (!Array.isArray(message.relatedProjects)) - return "relatedProjects: array expected"; - for (var i = 0; i < message.relatedProjects.length; ++i) - if (!$util.isString(message.relatedProjects[i])) - return "relatedProjects: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { - var error = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.verify(message.reachabilityDetails); - if (error) - return "reachabilityDetails." + error; - } - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { - var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.verify(message.probingDetails); - if (error) - return "probingDetails." + error; - } - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - if (typeof message.bypassFirewallChecks !== "boolean") - return "bypassFirewallChecks: boolean expected"; - return null; - }; - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ConnectivityTest} ConnectivityTest - */ - ConnectivityTest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ConnectivityTest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ConnectivityTest(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.source: object expected"); - message.source = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.source); - } - if (object.destination != null) { - if (typeof object.destination !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.destination: object expected"); - message.destination = $root.google.cloud.networkmanagement.v1.Endpoint.fromObject(object.destination); - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.relatedProjects) { - if (!Array.isArray(object.relatedProjects)) - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.relatedProjects: array expected"); - message.relatedProjects = []; - for (var i = 0; i < object.relatedProjects.length; ++i) - message.relatedProjects[i] = String(object.relatedProjects[i]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.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.networkmanagement.v1.ConnectivityTest.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.reachabilityDetails != null) { - if (typeof object.reachabilityDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.reachabilityDetails: object expected"); - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.fromObject(object.reachabilityDetails); - } - if (object.probingDetails != null) { - if (typeof object.probingDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ConnectivityTest.probingDetails: object expected"); - message.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.fromObject(object.probingDetails); - } - if (object.bypassFirewallChecks != null) - message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); - return message; - }; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} message ConnectivityTest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectivityTest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relatedProjects = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.source = null; - object.destination = null; - object.protocol = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - object.reachabilityDetails = null; - object.probingDetails = null; - object.bypassFirewallChecks = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.source, options); - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = $root.google.cloud.networkmanagement.v1.Endpoint.toObject(message.destination, options); - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.relatedProjects && message.relatedProjects.length) { - object.relatedProjects = []; - for (var j = 0; j < message.relatedProjects.length; ++j) - object.relatedProjects[j] = message.relatedProjects[j]; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) - object.reachabilityDetails = $root.google.cloud.networkmanagement.v1.ReachabilityDetails.toObject(message.reachabilityDetails, options); - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) - object.probingDetails = $root.google.cloud.networkmanagement.v1.ProbingDetails.toObject(message.probingDetails, options); - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - object.bypassFirewallChecks = message.bypassFirewallChecks; - return object; - }; - - /** - * Converts this ConnectivityTest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @instance - * @returns {Object.} JSON object - */ - ConnectivityTest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectivityTest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ConnectivityTest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ConnectivityTest"; - }; - - return ConnectivityTest; - })(); - - v1.Endpoint = (function() { - - /** - * Properties of an Endpoint. - * @memberof google.cloud.networkmanagement.v1 - * @interface IEndpoint - * @property {string|null} [ipAddress] Endpoint ipAddress - * @property {number|null} [port] Endpoint port - * @property {string|null} [instance] Endpoint instance - * @property {string|null} [forwardingRule] Endpoint forwardingRule - * @property {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget - * @property {string|null} [loadBalancerId] Endpoint loadBalancerId - * @property {google.cloud.networkmanagement.v1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType - * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster - * @property {string|null} [fqdn] Endpoint fqdn - * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance - * @property {string|null} [redisInstance] Endpoint redisInstance - * @property {string|null} [redisCluster] Endpoint redisCluster - * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction - * @property {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion - * @property {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision - * @property {string|null} [network] Endpoint network - * @property {google.cloud.networkmanagement.v1.Endpoint.NetworkType|null} [networkType] Endpoint networkType - * @property {string|null} [projectId] Endpoint projectId - */ - - /** - * Constructs a new Endpoint. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an Endpoint. - * @implements IEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set - */ - function Endpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Endpoint ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.ipAddress = ""; - - /** - * Endpoint port. - * @member {number} port - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.port = 0; - - /** - * Endpoint instance. - * @member {string} instance - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.instance = ""; - - /** - * Endpoint forwardingRule. - * @member {string} forwardingRule - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRule = ""; - - /** - * Endpoint forwardingRuleTarget. - * @member {google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRuleTarget = null; - - /** - * Endpoint loadBalancerId. - * @member {string|null|undefined} loadBalancerId - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerId = null; - - /** - * Endpoint loadBalancerType. - * @member {google.cloud.networkmanagement.v1.LoadBalancerType|null|undefined} loadBalancerType - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerType = null; - - /** - * Endpoint gkeMasterCluster. - * @member {string} gkeMasterCluster - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.gkeMasterCluster = ""; - - /** - * Endpoint fqdn. - * @member {string} fqdn - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.fqdn = ""; - - /** - * Endpoint cloudSqlInstance. - * @member {string} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.cloudSqlInstance = ""; - - /** - * Endpoint redisInstance. - * @member {string} redisInstance - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.redisInstance = ""; - - /** - * Endpoint redisCluster. - * @member {string} redisCluster - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.redisCluster = ""; - - /** - * Endpoint cloudFunction. - * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.cloudFunction = null; - - /** - * Endpoint appEngineVersion. - * @member {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.appEngineVersion = null; - - /** - * Endpoint cloudRunRevision. - * @member {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.cloudRunRevision = null; - - /** - * Endpoint network. - * @member {string} network - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.network = ""; - - /** - * Endpoint networkType. - * @member {google.cloud.networkmanagement.v1.Endpoint.NetworkType} networkType - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.networkType = 0; - - /** - * Endpoint projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Endpoint.prototype.projectId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Endpoint _forwardingRuleTarget. - * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { - get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerId. - * @member {"loadBalancerId"|undefined} _loadBalancerId - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerType. - * @member {"loadBalancerType"|undefined} _loadBalancerType - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Endpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.IEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint instance - */ - Endpoint.create = function create(properties) { - return new Endpoint(properties); - }; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); - if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); - if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); - if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); - if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); - if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); - return writer; - }; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipAddress = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.instance = reader.string(); - break; - } - case 13: { - message.forwardingRule = reader.string(); - break; - } - case 14: { - message.forwardingRuleTarget = reader.int32(); - break; - } - case 15: { - message.loadBalancerId = reader.string(); - break; - } - case 16: { - message.loadBalancerType = reader.int32(); - break; - } - case 7: { - message.gkeMasterCluster = reader.string(); - break; - } - case 19: { - message.fqdn = reader.string(); - break; - } - case 8: { - message.cloudSqlInstance = reader.string(); - break; - } - case 17: { - message.redisInstance = reader.string(); - break; - } - case 18: { - message.redisCluster = reader.string(); - break; - } - case 10: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); - break; - } - case 11: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); - break; - } - case 12: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.network = reader.string(); - break; - } - case 5: { - message.networkType = reader.int32(); - break; - } - case 6: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Endpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Endpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.instance != null && message.hasOwnProperty("instance")) - if (!$util.isString(message.instance)) - return "instance: string expected"; - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - if (!$util.isString(message.forwardingRule)) - return "forwardingRule: string expected"; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - properties._forwardingRuleTarget = 1; - switch (message.forwardingRuleTarget) { - default: - return "forwardingRuleTarget: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - properties._loadBalancerId = 1; - if (!$util.isString(message.loadBalancerId)) - return "loadBalancerId: string expected"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - properties._loadBalancerType = 1; - switch (message.loadBalancerType) { - default: - return "loadBalancerType: 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: - break; - } - } - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - if (!$util.isString(message.gkeMasterCluster)) - return "gkeMasterCluster: string expected"; - if (message.fqdn != null && message.hasOwnProperty("fqdn")) - if (!$util.isString(message.fqdn)) - return "fqdn: string expected"; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - if (!$util.isString(message.cloudSqlInstance)) - return "cloudSqlInstance: string expected"; - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - if (!$util.isString(message.redisInstance)) - return "redisInstance: string expected"; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - if (!$util.isString(message.redisCluster)) - return "redisCluster: string expected"; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - var error = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.networkType != null && message.hasOwnProperty("networkType")) - switch (message.networkType) { - default: - return "networkType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint} Endpoint - */ - Endpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint(); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.port != null) - message.port = object.port | 0; - if (object.instance != null) - message.instance = String(object.instance); - if (object.forwardingRule != null) - message.forwardingRule = String(object.forwardingRule); - switch (object.forwardingRuleTarget) { - default: - if (typeof object.forwardingRuleTarget === "number") { - message.forwardingRuleTarget = object.forwardingRuleTarget; - break; - } - break; - case "FORWARDING_RULE_TARGET_UNSPECIFIED": - case 0: - message.forwardingRuleTarget = 0; - break; - case "INSTANCE": - case 1: - message.forwardingRuleTarget = 1; - break; - case "LOAD_BALANCER": - case 2: - message.forwardingRuleTarget = 2; - break; - case "VPN_GATEWAY": - case 3: - message.forwardingRuleTarget = 3; - break; - case "PSC": - case 4: - message.forwardingRuleTarget = 4; - break; - } - if (object.loadBalancerId != null) - message.loadBalancerId = String(object.loadBalancerId); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "HTTPS_ADVANCED_LOAD_BALANCER": - case 1: - message.loadBalancerType = 1; - break; - case "HTTPS_LOAD_BALANCER": - case 2: - message.loadBalancerType = 2; - break; - case "REGIONAL_HTTPS_LOAD_BALANCER": - case 3: - message.loadBalancerType = 3; - break; - case "INTERNAL_HTTPS_LOAD_BALANCER": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY_LOAD_BALANCER": - case 5: - message.loadBalancerType = 5; - break; - case "TCP_PROXY_LOAD_BALANCER": - case 6: - message.loadBalancerType = 6; - break; - case "INTERNAL_TCP_PROXY_LOAD_BALANCER": - case 7: - message.loadBalancerType = 7; - break; - case "NETWORK_LOAD_BALANCER": - case 8: - message.loadBalancerType = 8; - break; - case "LEGACY_NETWORK_LOAD_BALANCER": - case 9: - message.loadBalancerType = 9; - break; - case "TCP_UDP_INTERNAL_LOAD_BALANCER": - case 10: - message.loadBalancerType = 10; - break; - } - if (object.gkeMasterCluster != null) - message.gkeMasterCluster = String(object.gkeMasterCluster); - if (object.fqdn != null) - message.fqdn = String(object.fqdn); - if (object.cloudSqlInstance != null) - message.cloudSqlInstance = String(object.cloudSqlInstance); - if (object.redisInstance != null) - message.redisInstance = String(object.redisInstance); - if (object.redisCluster != null) - message.redisCluster = String(object.redisCluster); - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Endpoint.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); - } - if (object.network != null) - message.network = String(object.network); - switch (object.networkType) { - default: - if (typeof object.networkType === "number") { - message.networkType = object.networkType; - break; - } - break; - case "NETWORK_TYPE_UNSPECIFIED": - case 0: - message.networkType = 0; - break; - case "GCP_NETWORK": - case 1: - message.networkType = 1; - break; - case "NON_GCP_NETWORK": - case 2: - message.networkType = 2; - break; - } - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint} message Endpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Endpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ipAddress = ""; - object.port = 0; - object.instance = ""; - object.network = ""; - object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; - object.projectId = ""; - object.gkeMasterCluster = ""; - object.cloudSqlInstance = ""; - object.cloudFunction = null; - object.appEngineVersion = null; - object.cloudRunRevision = null; - object.forwardingRule = ""; - object.redisInstance = ""; - object.redisCluster = ""; - object.fqdn = ""; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = message.instance; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.networkType != null && message.hasOwnProperty("networkType")) - object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1.Endpoint.NetworkType[message.networkType] : message.networkType; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - object.gkeMasterCluster = message.gkeMasterCluster; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - object.cloudSqlInstance = message.cloudSqlInstance; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) - object.cloudFunction = $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) - object.appEngineVersion = $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - object.forwardingRule = message.forwardingRule; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; - if (options.oneofs) - object._forwardingRuleTarget = "forwardingRuleTarget"; - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - object.loadBalancerId = message.loadBalancerId; - if (options.oneofs) - object._loadBalancerId = "loadBalancerId"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (options.oneofs) - object._loadBalancerType = "loadBalancerType"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - object.redisInstance = message.redisInstance; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - object.redisCluster = message.redisCluster; - if (message.fqdn != null && message.hasOwnProperty("fqdn")) - object.fqdn = message.fqdn; - return object; - }; - - /** - * Converts this Endpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @instance - * @returns {Object.} JSON object - */ - Endpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Endpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint"; - }; - - /** - * NetworkType enum. - * @name google.cloud.networkmanagement.v1.Endpoint.NetworkType - * @enum {number} - * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value - * @property {number} GCP_NETWORK=1 GCP_NETWORK value - * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value - */ - Endpoint.NetworkType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GCP_NETWORK"] = 1; - values[valuesById[2] = "NON_GCP_NETWORK"] = 2; - return values; - })(); - - /** - * ForwardingRuleTarget enum. - * @name google.cloud.networkmanagement.v1.Endpoint.ForwardingRuleTarget - * @enum {number} - * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value - * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value - * @property {number} PSC=4 PSC value - */ - Endpoint.ForwardingRuleTarget = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "LOAD_BALANCER"] = 2; - values[valuesById[3] = "VPN_GATEWAY"] = 3; - values[valuesById[4] = "PSC"] = 4; - return values; - })(); - - Endpoint.CloudFunctionEndpoint = (function() { - - /** - * Properties of a CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @interface ICloudFunctionEndpoint - * @property {string|null} [uri] CloudFunctionEndpoint uri - */ - - /** - * Constructs a new CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @classdesc Represents a CloudFunctionEndpoint. - * @implements ICloudFunctionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - */ - function CloudFunctionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @instance - */ - CloudFunctionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance - */ - CloudFunctionEndpoint.create = function create(properties) { - return new CloudFunctionEndpoint(properties); - }; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - */ - CloudFunctionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudFunctionEndpoint"; - }; - - return CloudFunctionEndpoint; - })(); - - Endpoint.AppEngineVersionEndpoint = (function() { - - /** - * Properties of an AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @interface IAppEngineVersionEndpoint - * @property {string|null} [uri] AppEngineVersionEndpoint uri - */ - - /** - * Constructs a new AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @classdesc Represents an AppEngineVersionEndpoint. - * @implements IAppEngineVersionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - */ - function AppEngineVersionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @instance - */ - AppEngineVersionEndpoint.prototype.uri = ""; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance - */ - AppEngineVersionEndpoint.create = function create(properties) { - return new AppEngineVersionEndpoint(properties); - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - */ - AppEngineVersionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.AppEngineVersionEndpoint"; - }; - - return AppEngineVersionEndpoint; - })(); - - Endpoint.CloudRunRevisionEndpoint = (function() { - - /** - * Properties of a CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @interface ICloudRunRevisionEndpoint - * @property {string|null} [uri] CloudRunRevisionEndpoint uri - */ - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1.Endpoint - * @classdesc Represents a CloudRunRevisionEndpoint. - * @implements ICloudRunRevisionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - */ - function CloudRunRevisionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @instance - */ - CloudRunRevisionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance - */ - CloudRunRevisionEndpoint.create = function create(properties) { - return new CloudRunRevisionEndpoint(properties); - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - */ - CloudRunRevisionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Endpoint.CloudRunRevisionEndpoint"; - }; - - return CloudRunRevisionEndpoint; - })(); - - return Endpoint; - })(); - - v1.ReachabilityDetails = (function() { - - /** - * Properties of a ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1 - * @interface IReachabilityDetails - * @property {google.cloud.networkmanagement.v1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error - * @property {Array.|null} [traces] ReachabilityDetails traces - */ - - /** - * Constructs a new ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ReachabilityDetails. - * @implements IReachabilityDetails - * @constructor - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set - */ - function ReachabilityDetails(properties) { - this.traces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReachabilityDetails result. - * @member {google.cloud.networkmanagement.v1.ReachabilityDetails.Result} result - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.result = 0; - - /** - * ReachabilityDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.verifyTime = null; - - /** - * ReachabilityDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.error = null; - - /** - * ReachabilityDetails traces. - * @member {Array.} traces - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.traces = $util.emptyArray; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails instance - */ - ReachabilityDetails.create = function create(properties) { - return new ReachabilityDetails(properties); - }; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.traces != null && message.traces.length) - for (var i = 0; i < message.traces.length; ++i) - $root.google.cloud.networkmanagement.v1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ReachabilityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.traces && message.traces.length)) - message.traces = []; - message.traces.push($root.google.cloud.networkmanagement.v1.Trace.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReachabilityDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReachabilityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.traces != null && message.hasOwnProperty("traces")) { - if (!Array.isArray(message.traces)) - return "traces: array expected"; - for (var i = 0; i < message.traces.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.Trace.verify(message.traces[i]); - if (error) - return "traces." + error; - } - } - return null; - }; - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ReachabilityDetails} ReachabilityDetails - */ - ReachabilityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ReachabilityDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ReachabilityDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "AMBIGUOUS": - case 4: - message.result = 4; - break; - case "UNDETERMINED": - case 5: - message.result = 5; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.traces) { - if (!Array.isArray(object.traces)) - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: array expected"); - message.traces = []; - for (var i = 0; i < object.traces.length; ++i) { - if (typeof object.traces[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ReachabilityDetails.traces: object expected"); - message.traces[i] = $root.google.cloud.networkmanagement.v1.Trace.fromObject(object.traces[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1.ReachabilityDetails} message ReachabilityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReachabilityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.traces = []; - if (options.defaults) { - object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ReachabilityDetails.Result[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.traces && message.traces.length) { - object.traces = []; - for (var j = 0; j < message.traces.length; ++j) - object.traces[j] = $root.google.cloud.networkmanagement.v1.Trace.toObject(message.traces[j], options); - } - return object; - }; - - /** - * Converts this ReachabilityDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @instance - * @returns {Object.} JSON object - */ - ReachabilityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReachabilityDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ReachabilityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ReachabilityDetails"; - }; - - /** - * Result enum. - * @name google.cloud.networkmanagement.v1.ReachabilityDetails.Result - * @enum {number} - * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} AMBIGUOUS=4 AMBIGUOUS value - * @property {number} UNDETERMINED=5 UNDETERMINED value - */ - ReachabilityDetails.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[4] = "AMBIGUOUS"] = 4; - values[valuesById[5] = "UNDETERMINED"] = 5; - return values; - })(); - - return ReachabilityDetails; - })(); - - v1.LatencyPercentile = (function() { - - /** - * Properties of a LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILatencyPercentile - * @property {number|null} [percent] LatencyPercentile percent - * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros - */ - - /** - * Constructs a new LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LatencyPercentile. - * @implements ILatencyPercentile - * @constructor - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set - */ - function LatencyPercentile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyPercentile percent. - * @member {number} percent - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.percent = 0; - - /** - * LatencyPercentile latencyMicros. - * @member {number|Long} latencyMicros - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile instance - */ - LatencyPercentile.create = function create(properties) { - return new LatencyPercentile(properties); - }; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); - if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); - return writer; - }; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyPercentile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.percent = reader.int32(); - break; - } - case 2: { - message.latencyMicros = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyPercentile message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyPercentile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.percent != null && message.hasOwnProperty("percent")) - if (!$util.isInteger(message.percent)) - return "percent: integer expected"; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) - return "latencyMicros: integer|Long expected"; - return null; - }; - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LatencyPercentile} LatencyPercentile - */ - LatencyPercentile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyPercentile) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LatencyPercentile(); - if (object.percent != null) - message.percent = object.percent | 0; - if (object.latencyMicros != null) - if ($util.Long) - (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; - else if (typeof object.latencyMicros === "string") - message.latencyMicros = parseInt(object.latencyMicros, 10); - else if (typeof object.latencyMicros === "number") - message.latencyMicros = object.latencyMicros; - else if (typeof object.latencyMicros === "object") - message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1.LatencyPercentile} message LatencyPercentile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyPercentile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.percent = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.latencyMicros = options.longs === String ? "0" : 0; - } - if (message.percent != null && message.hasOwnProperty("percent")) - object.percent = message.percent; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (typeof message.latencyMicros === "number") - object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; - else - object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; - return object; - }; - - /** - * Converts this LatencyPercentile to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @instance - * @returns {Object.} JSON object - */ - LatencyPercentile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyPercentile - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LatencyPercentile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyPercentile"; - }; - - return LatencyPercentile; - })(); - - v1.LatencyDistribution = (function() { - - /** - * Properties of a LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILatencyDistribution - * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles - */ - - /** - * Constructs a new LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LatencyDistribution. - * @implements ILatencyDistribution - * @constructor - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set - */ - function LatencyDistribution(properties) { - this.latencyPercentiles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyDistribution latencyPercentiles. - * @member {Array.} latencyPercentiles - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @instance - */ - LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution instance - */ - LatencyDistribution.create = function create(properties) { - return new LatencyDistribution(properties); - }; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latencyPercentiles != null && message.latencyPercentiles.length) - for (var i = 0; i < message.latencyPercentiles.length; ++i) - $root.google.cloud.networkmanagement.v1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LatencyDistribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.latencyPercentiles && message.latencyPercentiles.length)) - message.latencyPercentiles = []; - message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1.LatencyPercentile.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyDistribution message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyDistribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { - if (!Array.isArray(message.latencyPercentiles)) - return "latencyPercentiles: array expected"; - for (var i = 0; i < message.latencyPercentiles.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.LatencyPercentile.verify(message.latencyPercentiles[i]); - if (error) - return "latencyPercentiles." + error; - } - } - return null; - }; - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LatencyDistribution} LatencyDistribution - */ - LatencyDistribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LatencyDistribution) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LatencyDistribution(); - if (object.latencyPercentiles) { - if (!Array.isArray(object.latencyPercentiles)) - throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: array expected"); - message.latencyPercentiles = []; - for (var i = 0; i < object.latencyPercentiles.length; ++i) { - if (typeof object.latencyPercentiles[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.LatencyDistribution.latencyPercentiles: object expected"); - message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1.LatencyDistribution} message LatencyDistribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyDistribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.latencyPercentiles = []; - if (message.latencyPercentiles && message.latencyPercentiles.length) { - object.latencyPercentiles = []; - for (var j = 0; j < message.latencyPercentiles.length; ++j) - object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); - } - return object; - }; - - /** - * Converts this LatencyDistribution to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @instance - * @returns {Object.} JSON object - */ - LatencyDistribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyDistribution - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LatencyDistribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LatencyDistribution"; - }; - - return LatencyDistribution; - })(); - - v1.ProbingDetails = (function() { - - /** - * Properties of a ProbingDetails. - * @memberof google.cloud.networkmanagement.v1 - * @interface IProbingDetails - * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ProbingDetails error - * @property {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause - * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount - * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount - * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo - * @property {google.cloud.networkmanagement.v1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency - * @property {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation - */ - - /** - * Constructs a new ProbingDetails. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ProbingDetails. - * @implements IProbingDetails - * @constructor - * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set - */ - function ProbingDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProbingDetails result. - * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult} result - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.result = 0; - - /** - * ProbingDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.verifyTime = null; - - /** - * ProbingDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.error = null; - - /** - * ProbingDetails abortCause. - * @member {google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause} abortCause - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.abortCause = 0; - - /** - * ProbingDetails sentProbeCount. - * @member {number} sentProbeCount - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.sentProbeCount = 0; - - /** - * ProbingDetails successfulProbeCount. - * @member {number} successfulProbeCount - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.successfulProbeCount = 0; - - /** - * ProbingDetails endpointInfo. - * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.endpointInfo = null; - - /** - * ProbingDetails probingLatency. - * @member {google.cloud.networkmanagement.v1.ILatencyDistribution|null|undefined} probingLatency - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.probingLatency = null; - - /** - * ProbingDetails destinationEgressLocation. - * @member {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.destinationEgressLocation = null; - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.IProbingDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails instance - */ - ProbingDetails.create = function create(properties) { - return new ProbingDetails(properties); - }; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); - if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); - if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) - $root.google.cloud.networkmanagement.v1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) - $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.abortCause = reader.int32(); - break; - } - case 5: { - message.sentProbeCount = reader.int32(); - break; - } - case 6: { - message.successfulProbeCount = reader.int32(); - break; - } - case 7: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.decode(reader, reader.uint32()); - break; - } - case 9: { - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProbingDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProbingDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - switch (message.abortCause) { - default: - return "abortCause: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - if (!$util.isInteger(message.sentProbeCount)) - return "sentProbeCount: integer expected"; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - if (!$util.isInteger(message.successfulProbeCount)) - return "successfulProbeCount: integer expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { - var error = $root.google.cloud.networkmanagement.v1.LatencyDistribution.verify(message.probingLatency); - if (error) - return "probingLatency." + error; - } - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { - var error = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); - if (error) - return "destinationEgressLocation." + error; - } - return null; - }; - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ProbingDetails} ProbingDetails - */ - ProbingDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "PROBING_RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "REACHABILITY_INCONSISTENT": - case 3: - message.result = 3; - break; - case "UNDETERMINED": - case 4: - message.result = 4; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - switch (object.abortCause) { - default: - if (typeof object.abortCause === "number") { - message.abortCause = object.abortCause; - break; - } - break; - case "PROBING_ABORT_CAUSE_UNSPECIFIED": - case 0: - message.abortCause = 0; - break; - case "PERMISSION_DENIED": - case 1: - message.abortCause = 1; - break; - case "NO_SOURCE_LOCATION": - case 2: - message.abortCause = 2; - break; - } - if (object.sentProbeCount != null) - message.sentProbeCount = object.sentProbeCount | 0; - if (object.successfulProbeCount != null) - message.successfulProbeCount = object.successfulProbeCount | 0; - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.probingLatency != null) { - if (typeof object.probingLatency !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.probingLatency: object expected"); - message.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.fromObject(object.probingLatency); - } - if (object.destinationEgressLocation != null) { - if (typeof object.destinationEgressLocation !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ProbingDetails.destinationEgressLocation: object expected"); - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); - } - return message; - }; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails} message ProbingDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProbingDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; - object.sentProbeCount = 0; - object.successfulProbeCount = 0; - object.endpointInfo = null; - object.probingLatency = null; - object.destinationEgressLocation = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - object.sentProbeCount = message.sentProbeCount; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - object.successfulProbeCount = message.successfulProbeCount; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) - object.probingLatency = $root.google.cloud.networkmanagement.v1.LatencyDistribution.toObject(message.probingLatency, options); - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) - object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); - return object; - }; - - /** - * Converts this ProbingDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @instance - * @returns {Object.} JSON object - */ - ProbingDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProbingDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails"; - }; - - /** - * ProbingResult enum. - * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingResult - * @enum {number} - * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value - * @property {number} UNDETERMINED=4 UNDETERMINED value - */ - ProbingDetails.ProbingResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; - values[valuesById[4] = "UNDETERMINED"] = 4; - return values; - })(); - - /** - * ProbingAbortCause enum. - * @name google.cloud.networkmanagement.v1.ProbingDetails.ProbingAbortCause - * @enum {number} - * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value - * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value - * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value - */ - ProbingDetails.ProbingAbortCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PERMISSION_DENIED"] = 1; - values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; - return values; - })(); - - ProbingDetails.EdgeLocation = (function() { - - /** - * Properties of an EdgeLocation. - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @interface IEdgeLocation - * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea - */ - - /** - * Constructs a new EdgeLocation. - * @memberof google.cloud.networkmanagement.v1.ProbingDetails - * @classdesc Represents an EdgeLocation. - * @implements IEdgeLocation - * @constructor - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - */ - function EdgeLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EdgeLocation metropolitanArea. - * @member {string} metropolitanArea - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @instance - */ - EdgeLocation.prototype.metropolitanArea = ""; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation instance - */ - EdgeLocation.create = function create(properties) { - return new EdgeLocation(properties); - }; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); - return writer; - }; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metropolitanArea = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EdgeLocation message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EdgeLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - if (!$util.isString(message.metropolitanArea)) - return "metropolitanArea: string expected"; - return null; - }; - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} EdgeLocation - */ - EdgeLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation(); - if (object.metropolitanArea != null) - message.metropolitanArea = String(object.metropolitanArea); - return message; - }; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation} message EdgeLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EdgeLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metropolitanArea = ""; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - object.metropolitanArea = message.metropolitanArea; - return object; - }; - - /** - * Converts this EdgeLocation to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @instance - * @returns {Object.} JSON object - */ - EdgeLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EdgeLocation - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProbingDetails.EdgeLocation"; - }; - - return EdgeLocation; - })(); - - return ProbingDetails; - })(); - - v1.Trace = (function() { - - /** - * Properties of a Trace. - * @memberof google.cloud.networkmanagement.v1 - * @interface ITrace - * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo - * @property {Array.|null} [steps] Trace steps - * @property {number|null} [forwardTraceId] Trace forwardTraceId - */ - - /** - * Constructs a new Trace. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a Trace. - * @implements ITrace - * @constructor - * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set - */ - function Trace(properties) { - this.steps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trace endpointInfo. - * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - */ - Trace.prototype.endpointInfo = null; - - /** - * Trace steps. - * @member {Array.} steps - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - */ - Trace.prototype.steps = $util.emptyArray; - - /** - * Trace forwardTraceId. - * @member {number} forwardTraceId - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - */ - Trace.prototype.forwardTraceId = 0; - - /** - * Creates a new Trace instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.ITrace=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Trace} Trace instance - */ - Trace.create = function create(properties) { - return new Trace(properties); - }; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.cloud.networkmanagement.v1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); - return writer; - }; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Trace.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Trace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.cloud.networkmanagement.v1.Step.decode(reader, reader.uint32())); - break; - } - case 4: { - message.forwardTraceId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Trace message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.Step.verify(message.steps[i]); - if (error) - return "steps." + error; - } - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - if (!$util.isInteger(message.forwardTraceId)) - return "forwardTraceId: integer expected"; - return null; - }; - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Trace} Trace - */ - Trace.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Trace) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Trace(); - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Trace.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Trace.steps: object expected"); - message.steps[i] = $root.google.cloud.networkmanagement.v1.Step.fromObject(object.steps[i]); - } - } - if (object.forwardTraceId != null) - message.forwardTraceId = object.forwardTraceId | 0; - return message; - }; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {google.cloud.networkmanagement.v1.Trace} message Trace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.steps = []; - if (options.defaults) { - object.endpointInfo = null; - object.forwardTraceId = 0; - } - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.cloud.networkmanagement.v1.Step.toObject(message.steps[j], options); - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - object.forwardTraceId = message.forwardTraceId; - return object; - }; - - /** - * Converts this Trace to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Trace - * @instance - * @returns {Object.} JSON object - */ - Trace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Trace - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Trace - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Trace"; - }; - - return Trace; - })(); - - v1.Step = (function() { - - /** - * Properties of a Step. - * @memberof google.cloud.networkmanagement.v1 - * @interface IStep - * @property {string|null} [description] Step description - * @property {google.cloud.networkmanagement.v1.Step.State|null} [state] Step state - * @property {boolean|null} [causesDrop] Step causesDrop - * @property {string|null} [projectId] Step projectId - * @property {google.cloud.networkmanagement.v1.IInstanceInfo|null} [instance] Step instance - * @property {google.cloud.networkmanagement.v1.IFirewallInfo|null} [firewall] Step firewall - * @property {google.cloud.networkmanagement.v1.IRouteInfo|null} [route] Step route - * @property {google.cloud.networkmanagement.v1.IEndpointInfo|null} [endpoint] Step endpoint - * @property {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null} [googleService] Step googleService - * @property {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule - * @property {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway - * @property {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel - * @property {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector - * @property {google.cloud.networkmanagement.v1.IDeliverInfo|null} [deliver] Step deliver - * @property {google.cloud.networkmanagement.v1.IForwardInfo|null} [forward] Step forward - * @property {google.cloud.networkmanagement.v1.IAbortInfo|null} [abort] Step abort - * @property {google.cloud.networkmanagement.v1.IDropInfo|null} [drop] Step drop - * @property {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer - * @property {google.cloud.networkmanagement.v1.INetworkInfo|null} [network] Step network - * @property {google.cloud.networkmanagement.v1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster - * @property {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance - * @property {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance - * @property {google.cloud.networkmanagement.v1.IRedisClusterInfo|null} [redisCluster] Step redisCluster - * @property {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction - * @property {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion - * @property {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision - * @property {google.cloud.networkmanagement.v1.INatInfo|null} [nat] Step nat - * @property {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection - * @property {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo - * @property {google.cloud.networkmanagement.v1.IStorageBucketInfo|null} [storageBucket] Step storageBucket - * @property {google.cloud.networkmanagement.v1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg - */ - - /** - * Constructs a new Step. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a Step. - * @implements IStep - * @constructor - * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set - */ - function Step(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Step description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.description = ""; - - /** - * Step state. - * @member {google.cloud.networkmanagement.v1.Step.State} state - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.state = 0; - - /** - * Step causesDrop. - * @member {boolean} causesDrop - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.causesDrop = false; - - /** - * Step projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.projectId = ""; - - /** - * Step instance. - * @member {google.cloud.networkmanagement.v1.IInstanceInfo|null|undefined} instance - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.instance = null; - - /** - * Step firewall. - * @member {google.cloud.networkmanagement.v1.IFirewallInfo|null|undefined} firewall - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.firewall = null; - - /** - * Step route. - * @member {google.cloud.networkmanagement.v1.IRouteInfo|null|undefined} route - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.route = null; - - /** - * Step endpoint. - * @member {google.cloud.networkmanagement.v1.IEndpointInfo|null|undefined} endpoint - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.endpoint = null; - - /** - * Step googleService. - * @member {google.cloud.networkmanagement.v1.IGoogleServiceInfo|null|undefined} googleService - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.googleService = null; - - /** - * Step forwardingRule. - * @member {google.cloud.networkmanagement.v1.IForwardingRuleInfo|null|undefined} forwardingRule - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.forwardingRule = null; - - /** - * Step vpnGateway. - * @member {google.cloud.networkmanagement.v1.IVpnGatewayInfo|null|undefined} vpnGateway - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.vpnGateway = null; - - /** - * Step vpnTunnel. - * @member {google.cloud.networkmanagement.v1.IVpnTunnelInfo|null|undefined} vpnTunnel - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.vpnTunnel = null; - - /** - * Step vpcConnector. - * @member {google.cloud.networkmanagement.v1.IVpcConnectorInfo|null|undefined} vpcConnector - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.vpcConnector = null; - - /** - * Step deliver. - * @member {google.cloud.networkmanagement.v1.IDeliverInfo|null|undefined} deliver - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.deliver = null; - - /** - * Step forward. - * @member {google.cloud.networkmanagement.v1.IForwardInfo|null|undefined} forward - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.forward = null; - - /** - * Step abort. - * @member {google.cloud.networkmanagement.v1.IAbortInfo|null|undefined} abort - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.abort = null; - - /** - * Step drop. - * @member {google.cloud.networkmanagement.v1.IDropInfo|null|undefined} drop - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.drop = null; - - /** - * Step loadBalancer. - * @member {google.cloud.networkmanagement.v1.ILoadBalancerInfo|null|undefined} loadBalancer - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.loadBalancer = null; - - /** - * Step network. - * @member {google.cloud.networkmanagement.v1.INetworkInfo|null|undefined} network - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.network = null; - - /** - * Step gkeMaster. - * @member {google.cloud.networkmanagement.v1.IGKEMasterInfo|null|undefined} gkeMaster - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.gkeMaster = null; - - /** - * Step cloudSqlInstance. - * @member {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.cloudSqlInstance = null; - - /** - * Step redisInstance. - * @member {google.cloud.networkmanagement.v1.IRedisInstanceInfo|null|undefined} redisInstance - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.redisInstance = null; - - /** - * Step redisCluster. - * @member {google.cloud.networkmanagement.v1.IRedisClusterInfo|null|undefined} redisCluster - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.redisCluster = null; - - /** - * Step cloudFunction. - * @member {google.cloud.networkmanagement.v1.ICloudFunctionInfo|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.cloudFunction = null; - - /** - * Step appEngineVersion. - * @member {google.cloud.networkmanagement.v1.IAppEngineVersionInfo|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.appEngineVersion = null; - - /** - * Step cloudRunRevision. - * @member {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.cloudRunRevision = null; - - /** - * Step nat. - * @member {google.cloud.networkmanagement.v1.INatInfo|null|undefined} nat - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.nat = null; - - /** - * Step proxyConnection. - * @member {google.cloud.networkmanagement.v1.IProxyConnectionInfo|null|undefined} proxyConnection - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.proxyConnection = null; - - /** - * Step loadBalancerBackendInfo. - * @member {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.loadBalancerBackendInfo = null; - - /** - * Step storageBucket. - * @member {google.cloud.networkmanagement.v1.IStorageBucketInfo|null|undefined} storageBucket - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.storageBucket = null; - - /** - * Step serverlessNeg. - * @member {google.cloud.networkmanagement.v1.IServerlessNegInfo|null|undefined} serverlessNeg - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Step.prototype.serverlessNeg = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Step stepInfo. - * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - */ - Object.defineProperty(Step.prototype, "stepInfo", { - get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Step instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.IStep=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.Step} Step instance - */ - Step.create = function create(properties) { - return new Step(properties); - }; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - $root.google.cloud.networkmanagement.v1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) - $root.google.cloud.networkmanagement.v1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.route != null && Object.hasOwnProperty.call(message, "route")) - $root.google.cloud.networkmanagement.v1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - $root.google.cloud.networkmanagement.v1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) - $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) - $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) - $root.google.cloud.networkmanagement.v1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) - $root.google.cloud.networkmanagement.v1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) - $root.google.cloud.networkmanagement.v1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) - $root.google.cloud.networkmanagement.v1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) - $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - $root.google.cloud.networkmanagement.v1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) - $root.google.cloud.networkmanagement.v1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) - $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) - $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) - $root.google.cloud.networkmanagement.v1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) - $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) - $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - $root.google.cloud.networkmanagement.v1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) - $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - $root.google.cloud.networkmanagement.v1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.Step.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Step message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.Step(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.causesDrop = reader.bool(); - break; - } - case 4: { - message.projectId = reader.string(); - break; - } - case 5: { - message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.decode(reader, reader.uint32()); - break; - } - case 7: { - message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 24: { - message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.decode(reader, reader.uint32()); - break; - } - case 9: { - message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.decode(reader, reader.uint32()); - break; - } - case 10: { - message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.decode(reader, reader.uint32()); - break; - } - case 11: { - message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.decode(reader, reader.uint32()); - break; - } - case 21: { - message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.decode(reader, reader.uint32()); - break; - } - case 16: { - message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.decode(reader, reader.uint32()); - break; - } - case 17: { - message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.decode(reader, reader.uint32()); - break; - } - case 18: { - message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.decode(reader, reader.uint32()); - break; - } - case 19: { - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 30: { - message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 31: { - message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.decode(reader, reader.uint32()); - break; - } - case 20: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.decode(reader, reader.uint32()); - break; - } - case 22: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.decode(reader, reader.uint32()); - break; - } - case 27: { - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); - break; - } - case 28: { - message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.decode(reader, reader.uint32()); - break; - } - case 29: { - message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Step message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Step.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 27: - case 3: - case 21: - case 22: - case 32: - case 33: - case 23: - case 25: - case 26: - case 29: - case 30: - case 31: - case 4: - case 5: - case 6: - case 7: - case 28: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 24: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - break; - } - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - if (typeof message.causesDrop !== "boolean") - return "causesDrop: boolean expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.InstanceInfo.verify(message.instance); - if (error) - return "instance." + error; - } - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.FirewallInfo.verify(message.firewall); - if (error) - return "firewall." + error; - } - } - if (message.route != null && message.hasOwnProperty("route")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.RouteInfo.verify(message.route); - if (error) - return "route." + error; - } - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.EndpointInfo.verify(message.endpoint); - if (error) - return "endpoint." + error; - } - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.verify(message.googleService); - if (error) - return "googleService." + error; - } - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify(message.forwardingRule); - if (error) - return "forwardingRule." + error; - } - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.verify(message.vpnGateway); - if (error) - return "vpnGateway." + error; - } - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.verify(message.vpnTunnel); - if (error) - return "vpnTunnel." + error; - } - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.verify(message.vpcConnector); - if (error) - return "vpcConnector." + error; - } - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.DeliverInfo.verify(message.deliver); - if (error) - return "deliver." + error; - } - } - if (message.forward != null && message.hasOwnProperty("forward")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ForwardInfo.verify(message.forward); - if (error) - return "forward." + error; - } - } - if (message.abort != null && message.hasOwnProperty("abort")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.AbortInfo.verify(message.abort); - if (error) - return "abort." + error; - } - } - if (message.drop != null && message.hasOwnProperty("drop")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.DropInfo.verify(message.drop); - if (error) - return "drop." + error; - } - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.verify(message.loadBalancer); - if (error) - return "loadBalancer." + error; - } - } - if (message.network != null && message.hasOwnProperty("network")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.NetworkInfo.verify(message.network); - if (error) - return "network." + error; - } - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.verify(message.gkeMaster); - if (error) - return "gkeMaster." + error; - } - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); - if (error) - return "cloudSqlInstance." + error; - } - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.verify(message.redisInstance); - if (error) - return "redisInstance." + error; - } - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.verify(message.redisCluster); - if (error) - return "redisCluster." + error; - } - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - } - if (message.nat != null && message.hasOwnProperty("nat")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.NatInfo.verify(message.nat); - if (error) - return "nat." + error; - } - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify(message.proxyConnection); - if (error) - return "proxyConnection." + error; - } - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); - if (error) - return "loadBalancerBackendInfo." + error; - } - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.verify(message.storageBucket); - if (error) - return "storageBucket." + error; - } - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.verify(message.serverlessNeg); - if (error) - return "serverlessNeg." + error; - } - } - return null; - }; - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.Step} Step - */ - Step.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.Step) - return object; - var message = new $root.google.cloud.networkmanagement.v1.Step(); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "START_FROM_INSTANCE": - case 1: - message.state = 1; - break; - case "START_FROM_INTERNET": - case 2: - message.state = 2; - break; - case "START_FROM_GOOGLE_SERVICE": - case 27: - message.state = 27; - break; - case "START_FROM_PRIVATE_NETWORK": - case 3: - message.state = 3; - break; - case "START_FROM_GKE_MASTER": - case 21: - message.state = 21; - break; - case "START_FROM_CLOUD_SQL_INSTANCE": - case 22: - message.state = 22; - break; - case "START_FROM_REDIS_INSTANCE": - case 32: - message.state = 32; - break; - case "START_FROM_REDIS_CLUSTER": - case 33: - message.state = 33; - break; - case "START_FROM_CLOUD_FUNCTION": - case 23: - message.state = 23; - break; - case "START_FROM_APP_ENGINE_VERSION": - case 25: - message.state = 25; - break; - case "START_FROM_CLOUD_RUN_REVISION": - case 26: - message.state = 26; - break; - case "START_FROM_STORAGE_BUCKET": - case 29: - message.state = 29; - break; - case "START_FROM_PSC_PUBLISHED_SERVICE": - case 30: - message.state = 30; - break; - case "START_FROM_SERVERLESS_NEG": - case 31: - message.state = 31; - break; - case "APPLY_INGRESS_FIREWALL_RULE": - case 4: - message.state = 4; - break; - case "APPLY_EGRESS_FIREWALL_RULE": - case 5: - message.state = 5; - break; - case "APPLY_ROUTE": - case 6: - message.state = 6; - break; - case "APPLY_FORWARDING_RULE": - case 7: - message.state = 7; - break; - case "ANALYZE_LOAD_BALANCER_BACKEND": - case 28: - message.state = 28; - break; - case "SPOOFING_APPROVED": - case 8: - message.state = 8; - break; - case "ARRIVE_AT_INSTANCE": - case 9: - message.state = 9; - break; - case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": - case 10: - message.state = 10; - break; - case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": - case 11: - message.state = 11; - break; - case "ARRIVE_AT_VPN_GATEWAY": - case 12: - message.state = 12; - break; - case "ARRIVE_AT_VPN_TUNNEL": - case 13: - message.state = 13; - break; - case "ARRIVE_AT_VPC_CONNECTOR": - case 24: - message.state = 24; - break; - case "NAT": - case 14: - message.state = 14; - break; - case "PROXY_CONNECTION": - case 15: - message.state = 15; - break; - case "DELIVER": - case 16: - message.state = 16; - break; - case "DROP": - case 17: - message.state = 17; - break; - case "FORWARD": - case 18: - message.state = 18; - break; - case "ABORT": - case 19: - message.state = 19; - break; - case "VIEWER_PERMISSION_MISSING": - case 20: - message.state = 20; - break; - } - if (object.causesDrop != null) - message.causesDrop = Boolean(object.causesDrop); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instance != null) { - if (typeof object.instance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.instance: object expected"); - message.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.fromObject(object.instance); - } - if (object.firewall != null) { - if (typeof object.firewall !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.firewall: object expected"); - message.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.fromObject(object.firewall); - } - if (object.route != null) { - if (typeof object.route !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.route: object expected"); - message.route = $root.google.cloud.networkmanagement.v1.RouteInfo.fromObject(object.route); - } - if (object.endpoint != null) { - if (typeof object.endpoint !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.endpoint: object expected"); - message.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.fromObject(object.endpoint); - } - if (object.googleService != null) { - if (typeof object.googleService !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.googleService: object expected"); - message.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.fromObject(object.googleService); - } - if (object.forwardingRule != null) { - if (typeof object.forwardingRule !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.forwardingRule: object expected"); - message.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.fromObject(object.forwardingRule); - } - if (object.vpnGateway != null) { - if (typeof object.vpnGateway !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnGateway: object expected"); - message.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.fromObject(object.vpnGateway); - } - if (object.vpnTunnel != null) { - if (typeof object.vpnTunnel !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.vpnTunnel: object expected"); - message.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.fromObject(object.vpnTunnel); - } - if (object.vpcConnector != null) { - if (typeof object.vpcConnector !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.vpcConnector: object expected"); - message.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.fromObject(object.vpcConnector); - } - if (object.deliver != null) { - if (typeof object.deliver !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.deliver: object expected"); - message.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.fromObject(object.deliver); - } - if (object.forward != null) { - if (typeof object.forward !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.forward: object expected"); - message.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.fromObject(object.forward); - } - if (object.abort != null) { - if (typeof object.abort !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.abort: object expected"); - message.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.fromObject(object.abort); - } - if (object.drop != null) { - if (typeof object.drop !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.drop: object expected"); - message.drop = $root.google.cloud.networkmanagement.v1.DropInfo.fromObject(object.drop); - } - if (object.loadBalancer != null) { - if (typeof object.loadBalancer !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancer: object expected"); - message.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.fromObject(object.loadBalancer); - } - if (object.network != null) { - if (typeof object.network !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.network: object expected"); - message.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.fromObject(object.network); - } - if (object.gkeMaster != null) { - if (typeof object.gkeMaster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.gkeMaster: object expected"); - message.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.fromObject(object.gkeMaster); - } - if (object.cloudSqlInstance != null) { - if (typeof object.cloudSqlInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudSqlInstance: object expected"); - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); - } - if (object.redisInstance != null) { - if (typeof object.redisInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.redisInstance: object expected"); - message.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.fromObject(object.redisInstance); - } - if (object.redisCluster != null) { - if (typeof object.redisCluster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.redisCluster: object expected"); - message.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.fromObject(object.redisCluster); - } - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); - } - if (object.nat != null) { - if (typeof object.nat !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.nat: object expected"); - message.nat = $root.google.cloud.networkmanagement.v1.NatInfo.fromObject(object.nat); - } - if (object.proxyConnection != null) { - if (typeof object.proxyConnection !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.proxyConnection: object expected"); - message.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.fromObject(object.proxyConnection); - } - if (object.loadBalancerBackendInfo != null) { - if (typeof object.loadBalancerBackendInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.loadBalancerBackendInfo: object expected"); - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); - } - if (object.storageBucket != null) { - if (typeof object.storageBucket !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.storageBucket: object expected"); - message.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.fromObject(object.storageBucket); - } - if (object.serverlessNeg != null) { - if (typeof object.serverlessNeg !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.Step.serverlessNeg: object expected"); - message.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.fromObject(object.serverlessNeg); - } - return message; - }; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {google.cloud.networkmanagement.v1.Step} message Step - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Step.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.causesDrop = false; - object.projectId = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1.Step.State[message.state] : message.state; - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - object.causesDrop = message.causesDrop; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instance != null && message.hasOwnProperty("instance")) { - object.instance = $root.google.cloud.networkmanagement.v1.InstanceInfo.toObject(message.instance, options); - if (options.oneofs) - object.stepInfo = "instance"; - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - object.firewall = $root.google.cloud.networkmanagement.v1.FirewallInfo.toObject(message.firewall, options); - if (options.oneofs) - object.stepInfo = "firewall"; - } - if (message.route != null && message.hasOwnProperty("route")) { - object.route = $root.google.cloud.networkmanagement.v1.RouteInfo.toObject(message.route, options); - if (options.oneofs) - object.stepInfo = "route"; - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - object.endpoint = $root.google.cloud.networkmanagement.v1.EndpointInfo.toObject(message.endpoint, options); - if (options.oneofs) - object.stepInfo = "endpoint"; - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - object.forwardingRule = $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo.toObject(message.forwardingRule, options); - if (options.oneofs) - object.stepInfo = "forwardingRule"; - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - object.vpnGateway = $root.google.cloud.networkmanagement.v1.VpnGatewayInfo.toObject(message.vpnGateway, options); - if (options.oneofs) - object.stepInfo = "vpnGateway"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - object.vpnTunnel = $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.toObject(message.vpnTunnel, options); - if (options.oneofs) - object.stepInfo = "vpnTunnel"; - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - object.deliver = $root.google.cloud.networkmanagement.v1.DeliverInfo.toObject(message.deliver, options); - if (options.oneofs) - object.stepInfo = "deliver"; - } - if (message.forward != null && message.hasOwnProperty("forward")) { - object.forward = $root.google.cloud.networkmanagement.v1.ForwardInfo.toObject(message.forward, options); - if (options.oneofs) - object.stepInfo = "forward"; - } - if (message.abort != null && message.hasOwnProperty("abort")) { - object.abort = $root.google.cloud.networkmanagement.v1.AbortInfo.toObject(message.abort, options); - if (options.oneofs) - object.stepInfo = "abort"; - } - if (message.drop != null && message.hasOwnProperty("drop")) { - object.drop = $root.google.cloud.networkmanagement.v1.DropInfo.toObject(message.drop, options); - if (options.oneofs) - object.stepInfo = "drop"; - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - object.loadBalancer = $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.toObject(message.loadBalancer, options); - if (options.oneofs) - object.stepInfo = "loadBalancer"; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = $root.google.cloud.networkmanagement.v1.NetworkInfo.toObject(message.network, options); - if (options.oneofs) - object.stepInfo = "network"; - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - object.gkeMaster = $root.google.cloud.networkmanagement.v1.GKEMasterInfo.toObject(message.gkeMaster, options); - if (options.oneofs) - object.stepInfo = "gkeMaster"; - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); - if (options.oneofs) - object.stepInfo = "cloudSqlInstance"; - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - object.cloudFunction = $root.google.cloud.networkmanagement.v1.CloudFunctionInfo.toObject(message.cloudFunction, options); - if (options.oneofs) - object.stepInfo = "cloudFunction"; - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - object.vpcConnector = $root.google.cloud.networkmanagement.v1.VpcConnectorInfo.toObject(message.vpcConnector, options); - if (options.oneofs) - object.stepInfo = "vpcConnector"; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - object.appEngineVersion = $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); - if (options.oneofs) - object.stepInfo = "appEngineVersion"; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); - if (options.oneofs) - object.stepInfo = "cloudRunRevision"; - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - object.googleService = $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.toObject(message.googleService, options); - if (options.oneofs) - object.stepInfo = "googleService"; - } - if (message.nat != null && message.hasOwnProperty("nat")) { - object.nat = $root.google.cloud.networkmanagement.v1.NatInfo.toObject(message.nat, options); - if (options.oneofs) - object.stepInfo = "nat"; - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - object.proxyConnection = $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo.toObject(message.proxyConnection, options); - if (options.oneofs) - object.stepInfo = "proxyConnection"; - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); - if (options.oneofs) - object.stepInfo = "loadBalancerBackendInfo"; - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - object.storageBucket = $root.google.cloud.networkmanagement.v1.StorageBucketInfo.toObject(message.storageBucket, options); - if (options.oneofs) - object.stepInfo = "storageBucket"; - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - object.serverlessNeg = $root.google.cloud.networkmanagement.v1.ServerlessNegInfo.toObject(message.serverlessNeg, options); - if (options.oneofs) - object.stepInfo = "serverlessNeg"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - object.redisInstance = $root.google.cloud.networkmanagement.v1.RedisInstanceInfo.toObject(message.redisInstance, options); - if (options.oneofs) - object.stepInfo = "redisInstance"; - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - object.redisCluster = $root.google.cloud.networkmanagement.v1.RedisClusterInfo.toObject(message.redisCluster, options); - if (options.oneofs) - object.stepInfo = "redisCluster"; - } - return object; - }; - - /** - * Converts this Step to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.Step - * @instance - * @returns {Object.} JSON object - */ - Step.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Step - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.Step - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.Step"; - }; - - /** - * State enum. - * @name google.cloud.networkmanagement.v1.Step.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value - * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value - * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value - * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value - * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value - * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value - * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value - * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value - * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value - * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value - * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value - * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value - * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value - * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value - * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value - * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value - * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value - * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value - * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value - * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value - * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value - * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value - * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value - * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value - * @property {number} NAT=14 NAT value - * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value - * @property {number} DELIVER=16 DELIVER value - * @property {number} DROP=17 DROP value - * @property {number} FORWARD=18 FORWARD value - * @property {number} ABORT=19 ABORT value - * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value - */ - Step.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START_FROM_INSTANCE"] = 1; - values[valuesById[2] = "START_FROM_INTERNET"] = 2; - values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; - values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; - values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; - values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; - values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; - values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; - values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; - values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; - values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; - values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; - values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; - values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; - values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; - values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; - values[valuesById[6] = "APPLY_ROUTE"] = 6; - values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; - values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; - values[valuesById[8] = "SPOOFING_APPROVED"] = 8; - values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; - values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; - values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; - values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; - values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; - values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; - values[valuesById[14] = "NAT"] = 14; - values[valuesById[15] = "PROXY_CONNECTION"] = 15; - values[valuesById[16] = "DELIVER"] = 16; - values[valuesById[17] = "DROP"] = 17; - values[valuesById[18] = "FORWARD"] = 18; - values[valuesById[19] = "ABORT"] = 19; - values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; - return values; - })(); - - return Step; - })(); - - v1.InstanceInfo = (function() { - - /** - * Properties of an InstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IInstanceInfo - * @property {string|null} [displayName] InstanceInfo displayName - * @property {string|null} [uri] InstanceInfo uri - * @property {string|null} ["interface"] InstanceInfo interface - * @property {string|null} [networkUri] InstanceInfo networkUri - * @property {string|null} [internalIp] InstanceInfo internalIp - * @property {string|null} [externalIp] InstanceInfo externalIp - * @property {Array.|null} [networkTags] InstanceInfo networkTags - * @property {string|null} [serviceAccount] InstanceInfo serviceAccount - * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri - */ - - /** - * Constructs a new InstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an InstanceInfo. - * @implements IInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set - */ - function InstanceInfo(properties) { - this.networkTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.displayName = ""; - - /** - * InstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.uri = ""; - - /** - * InstanceInfo interface. - * @member {string} interface - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype["interface"] = ""; - - /** - * InstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkUri = ""; - - /** - * InstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.internalIp = ""; - - /** - * InstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.externalIp = ""; - - /** - * InstanceInfo networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkTags = $util.emptyArray; - - /** - * InstanceInfo serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.serviceAccount = ""; - - /** - * InstanceInfo pscNetworkAttachmentUri. - * @member {string} pscNetworkAttachmentUri - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.pscNetworkAttachmentUri = ""; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo instance - */ - InstanceInfo.create = function create(properties) { - return new InstanceInfo(properties); - }; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); - if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); - return writer; - }; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.InstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message["interface"] = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; - } - case 8: { - message.serviceAccount = reader.string(); - break; - } - case 9: { - message.pscNetworkAttachmentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message["interface"] != null && message.hasOwnProperty("interface")) - if (!$util.isString(message["interface"])) - return "interface: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - if (!$util.isString(message.pscNetworkAttachmentUri)) - return "pscNetworkAttachmentUri: string expected"; - return null; - }; - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.InstanceInfo} InstanceInfo - */ - InstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.InstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.InstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object["interface"] != null) - message["interface"] = String(object["interface"]); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.networkmanagement.v1.InstanceInfo.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.pscNetworkAttachmentUri != null) - message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); - return message; - }; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.InstanceInfo} message InstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object["interface"] = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.serviceAccount = ""; - object.pscNetworkAttachmentUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message["interface"] != null && message.hasOwnProperty("interface")) - object["interface"] = message["interface"]; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; - return object; - }; - - /** - * Converts this InstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @instance - * @returns {Object.} JSON object - */ - InstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.InstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.InstanceInfo"; - }; - - return InstanceInfo; - })(); - - v1.NetworkInfo = (function() { - - /** - * Properties of a NetworkInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface INetworkInfo - * @property {string|null} [displayName] NetworkInfo displayName - * @property {string|null} [uri] NetworkInfo uri - * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri - * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange - * @property {string|null} [region] NetworkInfo region - */ - - /** - * Constructs a new NetworkInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a NetworkInfo. - * @implements INetworkInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set - */ - function NetworkInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.displayName = ""; - - /** - * NetworkInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.uri = ""; - - /** - * NetworkInfo matchedSubnetUri. - * @member {string} matchedSubnetUri - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedSubnetUri = ""; - - /** - * NetworkInfo matchedIpRange. - * @member {string} matchedIpRange - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedIpRange = ""; - - /** - * NetworkInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.region = ""; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.INetworkInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo instance - */ - NetworkInfo.create = function create(properties) { - return new NetworkInfo(properties); - }; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); - if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NetworkInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 5: { - message.matchedSubnetUri = reader.string(); - break; - } - case 4: { - message.matchedIpRange = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - if (!$util.isString(message.matchedSubnetUri)) - return "matchedSubnetUri: string expected"; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - if (!$util.isString(message.matchedIpRange)) - return "matchedIpRange: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.NetworkInfo} NetworkInfo - */ - NetworkInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.NetworkInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.NetworkInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedSubnetUri != null) - message.matchedSubnetUri = String(object.matchedSubnetUri); - if (object.matchedIpRange != null) - message.matchedIpRange = String(object.matchedIpRange); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1.NetworkInfo} message NetworkInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedIpRange = ""; - object.matchedSubnetUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - object.matchedIpRange = message.matchedIpRange; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - object.matchedSubnetUri = message.matchedSubnetUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this NetworkInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @instance - * @returns {Object.} JSON object - */ - NetworkInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.NetworkInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NetworkInfo"; - }; - - return NetworkInfo; - })(); - - v1.FirewallInfo = (function() { - - /** - * Properties of a FirewallInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IFirewallInfo - * @property {string|null} [displayName] FirewallInfo displayName - * @property {string|null} [uri] FirewallInfo uri - * @property {string|null} [direction] FirewallInfo direction - * @property {string|null} [action] FirewallInfo action - * @property {number|null} [priority] FirewallInfo priority - * @property {string|null} [networkUri] FirewallInfo networkUri - * @property {Array.|null} [targetTags] FirewallInfo targetTags - * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts - * @property {string|null} [policy] FirewallInfo policy - * @property {string|null} [policyUri] FirewallInfo policyUri - * @property {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType - */ - - /** - * Constructs a new FirewallInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a FirewallInfo. - * @implements IFirewallInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set - */ - function FirewallInfo(properties) { - this.targetTags = []; - this.targetServiceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FirewallInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.displayName = ""; - - /** - * FirewallInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.uri = ""; - - /** - * FirewallInfo direction. - * @member {string} direction - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.direction = ""; - - /** - * FirewallInfo action. - * @member {string} action - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.action = ""; - - /** - * FirewallInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.priority = 0; - - /** - * FirewallInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.networkUri = ""; - - /** - * FirewallInfo targetTags. - * @member {Array.} targetTags - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetTags = $util.emptyArray; - - /** - * FirewallInfo targetServiceAccounts. - * @member {Array.} targetServiceAccounts - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; - - /** - * FirewallInfo policy. - * @member {string} policy - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policy = ""; - - /** - * FirewallInfo policyUri. - * @member {string} policyUri - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policyUri = ""; - - /** - * FirewallInfo firewallRuleType. - * @member {google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType} firewallRuleType - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.firewallRuleType = 0; - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.IFirewallInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo instance - */ - FirewallInfo.create = function create(properties) { - return new FirewallInfo(properties); - }; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); - if (message.targetTags != null && message.targetTags.length) - for (var i = 0; i < message.targetTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); - if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); - if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); - if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); - return writer; - }; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.FirewallInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.direction = reader.string(); - break; - } - case 4: { - message.action = reader.string(); - break; - } - case 5: { - message.priority = reader.int32(); - break; - } - case 6: { - message.networkUri = reader.string(); - break; - } - case 7: { - if (!(message.targetTags && message.targetTags.length)) - message.targetTags = []; - message.targetTags.push(reader.string()); - break; - } - case 8: { - if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) - message.targetServiceAccounts = []; - message.targetServiceAccounts.push(reader.string()); - break; - } - case 9: { - message.policy = reader.string(); - break; - } - case 11: { - message.policyUri = reader.string(); - break; - } - case 10: { - message.firewallRuleType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FirewallInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FirewallInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.direction != null && message.hasOwnProperty("direction")) - if (!$util.isString(message.direction)) - return "direction: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.targetTags != null && message.hasOwnProperty("targetTags")) { - if (!Array.isArray(message.targetTags)) - return "targetTags: array expected"; - for (var i = 0; i < message.targetTags.length; ++i) - if (!$util.isString(message.targetTags[i])) - return "targetTags: string[] expected"; - } - if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { - if (!Array.isArray(message.targetServiceAccounts)) - return "targetServiceAccounts: array expected"; - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - if (!$util.isString(message.targetServiceAccounts[i])) - return "targetServiceAccounts: string[] expected"; - } - if (message.policy != null && message.hasOwnProperty("policy")) - if (!$util.isString(message.policy)) - return "policy: string expected"; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - if (!$util.isString(message.policyUri)) - return "policyUri: string expected"; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - switch (message.firewallRuleType) { - default: - return "firewallRuleType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 100: - case 101: - break; - } - return null; - }; - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.FirewallInfo} FirewallInfo - */ - FirewallInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.FirewallInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.FirewallInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.direction != null) - message.direction = String(object.direction); - if (object.action != null) - message.action = String(object.action); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.targetTags) { - if (!Array.isArray(object.targetTags)) - throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetTags: array expected"); - message.targetTags = []; - for (var i = 0; i < object.targetTags.length; ++i) - message.targetTags[i] = String(object.targetTags[i]); - } - if (object.targetServiceAccounts) { - if (!Array.isArray(object.targetServiceAccounts)) - throw TypeError(".google.cloud.networkmanagement.v1.FirewallInfo.targetServiceAccounts: array expected"); - message.targetServiceAccounts = []; - for (var i = 0; i < object.targetServiceAccounts.length; ++i) - message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); - } - if (object.policy != null) - message.policy = String(object.policy); - if (object.policyUri != null) - message.policyUri = String(object.policyUri); - switch (object.firewallRuleType) { - default: - if (typeof object.firewallRuleType === "number") { - message.firewallRuleType = object.firewallRuleType; - break; - } - break; - case "FIREWALL_RULE_TYPE_UNSPECIFIED": - case 0: - message.firewallRuleType = 0; - break; - case "HIERARCHICAL_FIREWALL_POLICY_RULE": - case 1: - message.firewallRuleType = 1; - break; - case "VPC_FIREWALL_RULE": - case 2: - message.firewallRuleType = 2; - break; - case "IMPLIED_VPC_FIREWALL_RULE": - case 3: - message.firewallRuleType = 3; - break; - case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": - case 4: - message.firewallRuleType = 4; - break; - case "NETWORK_FIREWALL_POLICY_RULE": - case 5: - message.firewallRuleType = 5; - break; - case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": - case 6: - message.firewallRuleType = 6; - break; - case "UNSUPPORTED_FIREWALL_POLICY_RULE": - case 100: - message.firewallRuleType = 100; - break; - case "TRACKING_STATE": - case 101: - message.firewallRuleType = 101; - break; - } - return message; - }; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1.FirewallInfo} message FirewallInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FirewallInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targetTags = []; - object.targetServiceAccounts = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.direction = ""; - object.action = ""; - object.priority = 0; - object.networkUri = ""; - object.policy = ""; - object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; - object.policyUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = message.direction; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.targetTags && message.targetTags.length) { - object.targetTags = []; - for (var j = 0; j < message.targetTags.length; ++j) - object.targetTags[j] = message.targetTags[j]; - } - if (message.targetServiceAccounts && message.targetServiceAccounts.length) { - object.targetServiceAccounts = []; - for (var j = 0; j < message.targetServiceAccounts.length; ++j) - object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; - } - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = message.policy; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - object.policyUri = message.policyUri; - return object; - }; - - /** - * Converts this FirewallInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @instance - * @returns {Object.} JSON object - */ - FirewallInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FirewallInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.FirewallInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.FirewallInfo"; - }; - - /** - * FirewallRuleType enum. - * @name google.cloud.networkmanagement.v1.FirewallInfo.FirewallRuleType - * @enum {number} - * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value - * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value - * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value - * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value - * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value - * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value - * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value - * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value - * @property {number} TRACKING_STATE=101 TRACKING_STATE value - */ - FirewallInfo.FirewallRuleType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; - values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; - values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; - values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; - values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; - values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; - values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; - values[valuesById[101] = "TRACKING_STATE"] = 101; - return values; - })(); - - return FirewallInfo; - })(); - - v1.RouteInfo = (function() { - - /** - * Properties of a RouteInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRouteInfo - * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType - * @property {google.cloud.networkmanagement.v1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType - * @property {google.cloud.networkmanagement.v1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope - * @property {string|null} [displayName] RouteInfo displayName - * @property {string|null} [uri] RouteInfo uri - * @property {string|null} [region] RouteInfo region - * @property {string|null} [destIpRange] RouteInfo destIpRange - * @property {string|null} [nextHop] RouteInfo nextHop - * @property {string|null} [networkUri] RouteInfo networkUri - * @property {number|null} [priority] RouteInfo priority - * @property {Array.|null} [instanceTags] RouteInfo instanceTags - * @property {string|null} [srcIpRange] RouteInfo srcIpRange - * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges - * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges - * @property {Array.|null} [protocols] RouteInfo protocols - * @property {string|null} [nccHubUri] RouteInfo nccHubUri - * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri - * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri - * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri - */ - - /** - * Constructs a new RouteInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RouteInfo. - * @implements IRouteInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set - */ - function RouteInfo(properties) { - this.instanceTags = []; - this.destPortRanges = []; - this.srcPortRanges = []; - this.protocols = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RouteInfo routeType. - * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteType} routeType - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeType = 0; - - /** - * RouteInfo nextHopType. - * @member {google.cloud.networkmanagement.v1.RouteInfo.NextHopType} nextHopType - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHopType = 0; - - /** - * RouteInfo routeScope. - * @member {google.cloud.networkmanagement.v1.RouteInfo.RouteScope} routeScope - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeScope = 0; - - /** - * RouteInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.displayName = ""; - - /** - * RouteInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.uri = ""; - - /** - * RouteInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.region = ""; - - /** - * RouteInfo destIpRange. - * @member {string} destIpRange - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.destIpRange = ""; - - /** - * RouteInfo nextHop. - * @member {string} nextHop - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHop = ""; - - /** - * RouteInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.networkUri = ""; - - /** - * RouteInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.priority = 0; - - /** - * RouteInfo instanceTags. - * @member {Array.} instanceTags - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.instanceTags = $util.emptyArray; - - /** - * RouteInfo srcIpRange. - * @member {string} srcIpRange - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcIpRange = ""; - - /** - * RouteInfo destPortRanges. - * @member {Array.} destPortRanges - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.destPortRanges = $util.emptyArray; - - /** - * RouteInfo srcPortRanges. - * @member {Array.} srcPortRanges - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcPortRanges = $util.emptyArray; - - /** - * RouteInfo protocols. - * @member {Array.} protocols - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.protocols = $util.emptyArray; - - /** - * RouteInfo nccHubUri. - * @member {string|null|undefined} nccHubUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccHubUri = null; - - /** - * RouteInfo nccSpokeUri. - * @member {string|null|undefined} nccSpokeUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccSpokeUri = null; - - /** - * RouteInfo advertisedRouteSourceRouterUri. - * @member {string|null|undefined} advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteSourceRouterUri = null; - - /** - * RouteInfo advertisedRouteNextHopUri. - * @member {string|null|undefined} advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteNextHopUri = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RouteInfo _nccHubUri. - * @member {"nccHubUri"|undefined} _nccHubUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { - get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _nccSpokeUri. - * @member {"nccSpokeUri"|undefined} _nccSpokeUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { - get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteSourceRouterUri. - * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteNextHopUri. - * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RouteInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRouteInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo instance - */ - RouteInfo.create = function create(properties) { - return new RouteInfo(properties); - }; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); - if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); - if (message.instanceTags != null && message.instanceTags.length) - for (var i = 0; i < message.instanceTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); - if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); - if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); - if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); - if (message.destPortRanges != null && message.destPortRanges.length) - for (var i = 0; i < message.destPortRanges.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); - if (message.srcPortRanges != null && message.srcPortRanges.length) - for (var i = 0; i < message.srcPortRanges.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); - if (message.protocols != null && message.protocols.length) - for (var i = 0; i < message.protocols.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); - if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); - if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); - if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); - if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); - if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); - return writer; - }; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RouteInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: { - message.routeType = reader.int32(); - break; - } - case 9: { - message.nextHopType = reader.int32(); - break; - } - case 14: { - message.routeScope = reader.int32(); - break; - } - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 19: { - message.region = reader.string(); - break; - } - case 3: { - message.destIpRange = reader.string(); - break; - } - case 4: { - message.nextHop = reader.string(); - break; - } - case 5: { - message.networkUri = reader.string(); - break; - } - case 6: { - message.priority = reader.int32(); - break; - } - case 7: { - if (!(message.instanceTags && message.instanceTags.length)) - message.instanceTags = []; - message.instanceTags.push(reader.string()); - break; - } - case 10: { - message.srcIpRange = reader.string(); - break; - } - case 11: { - if (!(message.destPortRanges && message.destPortRanges.length)) - message.destPortRanges = []; - message.destPortRanges.push(reader.string()); - break; - } - case 12: { - if (!(message.srcPortRanges && message.srcPortRanges.length)) - message.srcPortRanges = []; - message.srcPortRanges.push(reader.string()); - break; - } - case 13: { - if (!(message.protocols && message.protocols.length)) - message.protocols = []; - message.protocols.push(reader.string()); - break; - } - case 15: { - message.nccHubUri = reader.string(); - break; - } - case 16: { - message.nccSpokeUri = reader.string(); - break; - } - case 17: { - message.advertisedRouteSourceRouterUri = reader.string(); - break; - } - case 18: { - message.advertisedRouteNextHopUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RouteInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RouteInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.routeType != null && message.hasOwnProperty("routeType")) - switch (message.routeType) { - default: - return "routeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 101: - break; - } - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - switch (message.nextHopType) { - default: - return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) - switch (message.routeScope) { - default: - return "routeScope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - if (!$util.isString(message.destIpRange)) - return "destIpRange: string expected"; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - if (!$util.isString(message.nextHop)) - return "nextHop: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { - if (!Array.isArray(message.instanceTags)) - return "instanceTags: array expected"; - for (var i = 0; i < message.instanceTags.length; ++i) - if (!$util.isString(message.instanceTags[i])) - return "instanceTags: string[] expected"; - } - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - if (!$util.isString(message.srcIpRange)) - return "srcIpRange: string expected"; - if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { - if (!Array.isArray(message.destPortRanges)) - return "destPortRanges: array expected"; - for (var i = 0; i < message.destPortRanges.length; ++i) - if (!$util.isString(message.destPortRanges[i])) - return "destPortRanges: string[] expected"; - } - if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { - if (!Array.isArray(message.srcPortRanges)) - return "srcPortRanges: array expected"; - for (var i = 0; i < message.srcPortRanges.length; ++i) - if (!$util.isString(message.srcPortRanges[i])) - return "srcPortRanges: string[] expected"; - } - if (message.protocols != null && message.hasOwnProperty("protocols")) { - if (!Array.isArray(message.protocols)) - return "protocols: array expected"; - for (var i = 0; i < message.protocols.length; ++i) - if (!$util.isString(message.protocols[i])) - return "protocols: string[] expected"; - } - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - properties._nccHubUri = 1; - if (!$util.isString(message.nccHubUri)) - return "nccHubUri: string expected"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - properties._nccSpokeUri = 1; - if (!$util.isString(message.nccSpokeUri)) - return "nccSpokeUri: string expected"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - properties._advertisedRouteSourceRouterUri = 1; - if (!$util.isString(message.advertisedRouteSourceRouterUri)) - return "advertisedRouteSourceRouterUri: string expected"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - properties._advertisedRouteNextHopUri = 1; - if (!$util.isString(message.advertisedRouteNextHopUri)) - return "advertisedRouteNextHopUri: string expected"; - } - return null; - }; - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RouteInfo} RouteInfo - */ - RouteInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RouteInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RouteInfo(); - switch (object.routeType) { - default: - if (typeof object.routeType === "number") { - message.routeType = object.routeType; - break; - } - break; - case "ROUTE_TYPE_UNSPECIFIED": - case 0: - message.routeType = 0; - break; - case "SUBNET": - case 1: - message.routeType = 1; - break; - case "STATIC": - case 2: - message.routeType = 2; - break; - case "DYNAMIC": - case 3: - message.routeType = 3; - break; - case "PEERING_SUBNET": - case 4: - message.routeType = 4; - break; - case "PEERING_STATIC": - case 5: - message.routeType = 5; - break; - case "PEERING_DYNAMIC": - case 6: - message.routeType = 6; - break; - case "POLICY_BASED": - case 7: - message.routeType = 7; - break; - case "ADVERTISED": - case 101: - message.routeType = 101; - break; - } - switch (object.nextHopType) { - default: - if (typeof object.nextHopType === "number") { - message.nextHopType = object.nextHopType; - break; - } - break; - case "NEXT_HOP_TYPE_UNSPECIFIED": - case 0: - message.nextHopType = 0; - break; - case "NEXT_HOP_IP": - case 1: - message.nextHopType = 1; - break; - case "NEXT_HOP_INSTANCE": - case 2: - message.nextHopType = 2; - break; - case "NEXT_HOP_NETWORK": - case 3: - message.nextHopType = 3; - break; - case "NEXT_HOP_PEERING": - case 4: - message.nextHopType = 4; - break; - case "NEXT_HOP_INTERCONNECT": - case 5: - message.nextHopType = 5; - break; - case "NEXT_HOP_VPN_TUNNEL": - case 6: - message.nextHopType = 6; - break; - case "NEXT_HOP_VPN_GATEWAY": - case 7: - message.nextHopType = 7; - break; - case "NEXT_HOP_INTERNET_GATEWAY": - case 8: - message.nextHopType = 8; - break; - case "NEXT_HOP_BLACKHOLE": - case 9: - message.nextHopType = 9; - break; - case "NEXT_HOP_ILB": - case 10: - message.nextHopType = 10; - break; - case "NEXT_HOP_ROUTER_APPLIANCE": - case 11: - message.nextHopType = 11; - break; - case "NEXT_HOP_NCC_HUB": - case 12: - message.nextHopType = 12; - break; - } - switch (object.routeScope) { - default: - if (typeof object.routeScope === "number") { - message.routeScope = object.routeScope; - break; - } - break; - case "ROUTE_SCOPE_UNSPECIFIED": - case 0: - message.routeScope = 0; - break; - case "NETWORK": - case 1: - message.routeScope = 1; - break; - case "NCC_HUB": - case 2: - message.routeScope = 2; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.region != null) - message.region = String(object.region); - if (object.destIpRange != null) - message.destIpRange = String(object.destIpRange); - if (object.nextHop != null) - message.nextHop = String(object.nextHop); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.instanceTags) { - if (!Array.isArray(object.instanceTags)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.instanceTags: array expected"); - message.instanceTags = []; - for (var i = 0; i < object.instanceTags.length; ++i) - message.instanceTags[i] = String(object.instanceTags[i]); - } - if (object.srcIpRange != null) - message.srcIpRange = String(object.srcIpRange); - if (object.destPortRanges) { - if (!Array.isArray(object.destPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.destPortRanges: array expected"); - message.destPortRanges = []; - for (var i = 0; i < object.destPortRanges.length; ++i) - message.destPortRanges[i] = String(object.destPortRanges[i]); - } - if (object.srcPortRanges) { - if (!Array.isArray(object.srcPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.srcPortRanges: array expected"); - message.srcPortRanges = []; - for (var i = 0; i < object.srcPortRanges.length; ++i) - message.srcPortRanges[i] = String(object.srcPortRanges[i]); - } - if (object.protocols) { - if (!Array.isArray(object.protocols)) - throw TypeError(".google.cloud.networkmanagement.v1.RouteInfo.protocols: array expected"); - message.protocols = []; - for (var i = 0; i < object.protocols.length; ++i) - message.protocols[i] = String(object.protocols[i]); - } - if (object.nccHubUri != null) - message.nccHubUri = String(object.nccHubUri); - if (object.nccSpokeUri != null) - message.nccSpokeUri = String(object.nccSpokeUri); - if (object.advertisedRouteSourceRouterUri != null) - message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); - if (object.advertisedRouteNextHopUri != null) - message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); - return message; - }; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1.RouteInfo} message RouteInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RouteInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.instanceTags = []; - object.destPortRanges = []; - object.srcPortRanges = []; - object.protocols = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.destIpRange = ""; - object.nextHop = ""; - object.networkUri = ""; - object.priority = 0; - object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; - object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; - object.srcIpRange = ""; - object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - object.destIpRange = message.destIpRange; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - object.nextHop = message.nextHop; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.instanceTags && message.instanceTags.length) { - object.instanceTags = []; - for (var j = 0; j < message.instanceTags.length; ++j) - object.instanceTags[j] = message.instanceTags[j]; - } - if (message.routeType != null && message.hasOwnProperty("routeType")) - object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteType[message.routeType] : message.routeType; - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - object.srcIpRange = message.srcIpRange; - if (message.destPortRanges && message.destPortRanges.length) { - object.destPortRanges = []; - for (var j = 0; j < message.destPortRanges.length; ++j) - object.destPortRanges[j] = message.destPortRanges[j]; - } - if (message.srcPortRanges && message.srcPortRanges.length) { - object.srcPortRanges = []; - for (var j = 0; j < message.srcPortRanges.length; ++j) - object.srcPortRanges[j] = message.srcPortRanges[j]; - } - if (message.protocols && message.protocols.length) { - object.protocols = []; - for (var j = 0; j < message.protocols.length; ++j) - object.protocols[j] = message.protocols[j]; - } - if (message.routeScope != null && message.hasOwnProperty("routeScope")) - object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - object.nccHubUri = message.nccHubUri; - if (options.oneofs) - object._nccHubUri = "nccHubUri"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - object.nccSpokeUri = message.nccSpokeUri; - if (options.oneofs) - object._nccSpokeUri = "nccSpokeUri"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; - if (options.oneofs) - object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; - if (options.oneofs) - object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; - } - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RouteInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @instance - * @returns {Object.} JSON object - */ - RouteInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RouteInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RouteInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RouteInfo"; - }; - - /** - * RouteType enum. - * @name google.cloud.networkmanagement.v1.RouteInfo.RouteType - * @enum {number} - * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value - * @property {number} SUBNET=1 SUBNET value - * @property {number} STATIC=2 STATIC value - * @property {number} DYNAMIC=3 DYNAMIC value - * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value - * @property {number} PEERING_STATIC=5 PEERING_STATIC value - * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value - * @property {number} POLICY_BASED=7 POLICY_BASED value - * @property {number} ADVERTISED=101 ADVERTISED value - */ - RouteInfo.RouteType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUBNET"] = 1; - values[valuesById[2] = "STATIC"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - values[valuesById[4] = "PEERING_SUBNET"] = 4; - values[valuesById[5] = "PEERING_STATIC"] = 5; - values[valuesById[6] = "PEERING_DYNAMIC"] = 6; - values[valuesById[7] = "POLICY_BASED"] = 7; - values[valuesById[101] = "ADVERTISED"] = 101; - return values; - })(); - - /** - * NextHopType enum. - * @name google.cloud.networkmanagement.v1.RouteInfo.NextHopType - * @enum {number} - * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value - * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value - * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value - * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value - * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value - * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value - * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value - * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value - * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value - * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value - * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value - * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value - * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value - */ - RouteInfo.NextHopType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEXT_HOP_IP"] = 1; - values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; - values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; - values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; - values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; - values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; - values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; - values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; - values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; - values[valuesById[10] = "NEXT_HOP_ILB"] = 10; - values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; - values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; - return values; - })(); - - /** - * RouteScope enum. - * @name google.cloud.networkmanagement.v1.RouteInfo.RouteScope - * @enum {number} - * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value - * @property {number} NETWORK=1 NETWORK value - * @property {number} NCC_HUB=2 NCC_HUB value - */ - RouteInfo.RouteScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NETWORK"] = 1; - values[valuesById[2] = "NCC_HUB"] = 2; - return values; - })(); - - return RouteInfo; - })(); - - v1.GoogleServiceInfo = (function() { - - /** - * Properties of a GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IGoogleServiceInfo - * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp - * @property {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType - */ - - /** - * Constructs a new GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a GoogleServiceInfo. - * @implements IGoogleServiceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set - */ - function GoogleServiceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoogleServiceInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.sourceIp = ""; - - /** - * GoogleServiceInfo googleServiceType. - * @member {google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType} googleServiceType - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.googleServiceType = 0; - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo instance - */ - GoogleServiceInfo.create = function create(properties) { - return new GoogleServiceInfo(properties); - }; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); - return writer; - }; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GoogleServiceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.googleServiceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoogleServiceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoogleServiceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - switch (message.googleServiceType) { - default: - return "googleServiceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - return null; - }; - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.GoogleServiceInfo} GoogleServiceInfo - */ - GoogleServiceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.GoogleServiceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.GoogleServiceInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - switch (object.googleServiceType) { - default: - if (typeof object.googleServiceType === "number") { - message.googleServiceType = object.googleServiceType; - break; - } - break; - case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": - case 0: - message.googleServiceType = 0; - break; - case "IAP": - case 1: - message.googleServiceType = 1; - break; - case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": - case 2: - message.googleServiceType = 2; - break; - case "CLOUD_DNS": - case 3: - message.googleServiceType = 3; - break; - case "GOOGLE_API": - case 4: - message.googleServiceType = 4; - break; - case "GOOGLE_API_PSC": - case 5: - message.googleServiceType = 5; - break; - case "GOOGLE_API_VPC_SC": - case 6: - message.googleServiceType = 6; - break; - } - return message; - }; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1.GoogleServiceInfo} message GoogleServiceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoogleServiceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; - return object; - }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @instance - * @returns {Object.} JSON object - */ - GoogleServiceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoogleServiceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.GoogleServiceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GoogleServiceInfo"; - }; - - /** - * GoogleServiceType enum. - * @name google.cloud.networkmanagement.v1.GoogleServiceInfo.GoogleServiceType - * @enum {number} - * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value - * @property {number} IAP=1 IAP value - * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value - * @property {number} CLOUD_DNS=3 CLOUD_DNS value - * @property {number} GOOGLE_API=4 GOOGLE_API value - * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value - * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value - */ - GoogleServiceInfo.GoogleServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IAP"] = 1; - values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; - values[valuesById[3] = "CLOUD_DNS"] = 3; - values[valuesById[4] = "GOOGLE_API"] = 4; - values[valuesById[5] = "GOOGLE_API_PSC"] = 5; - values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; - return values; - })(); - - return GoogleServiceInfo; - })(); - - v1.ForwardingRuleInfo = (function() { - - /** - * Properties of a ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IForwardingRuleInfo - * @property {string|null} [displayName] ForwardingRuleInfo displayName - * @property {string|null} [uri] ForwardingRuleInfo uri - * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol - * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange - * @property {string|null} [vip] ForwardingRuleInfo vip - * @property {string|null} [target] ForwardingRuleInfo target - * @property {string|null} [networkUri] ForwardingRuleInfo networkUri - * @property {string|null} [region] ForwardingRuleInfo region - * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName - * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget - */ - - /** - * Constructs a new ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ForwardingRuleInfo. - * @implements IForwardingRuleInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set - */ - function ForwardingRuleInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardingRuleInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.displayName = ""; - - /** - * ForwardingRuleInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.uri = ""; - - /** - * ForwardingRuleInfo matchedProtocol. - * @member {string} matchedProtocol - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedProtocol = ""; - - /** - * ForwardingRuleInfo matchedPortRange. - * @member {string} matchedPortRange - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedPortRange = ""; - - /** - * ForwardingRuleInfo vip. - * @member {string} vip - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.vip = ""; - - /** - * ForwardingRuleInfo target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.target = ""; - - /** - * ForwardingRuleInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.networkUri = ""; - - /** - * ForwardingRuleInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.region = ""; - - /** - * ForwardingRuleInfo loadBalancerName. - * @member {string} loadBalancerName - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.loadBalancerName = ""; - - /** - * ForwardingRuleInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * ForwardingRuleInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo instance - */ - ForwardingRuleInfo.create = function create(properties) { - return new ForwardingRuleInfo(properties); - }; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); - if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); - if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardingRuleInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.matchedProtocol = reader.string(); - break; - } - case 6: { - message.matchedPortRange = reader.string(); - break; - } - case 4: { - message.vip = reader.string(); - break; - } - case 5: { - message.target = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.loadBalancerName = reader.string(); - break; - } - case 10: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 11: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardingRuleInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardingRuleInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - if (!$util.isString(message.matchedProtocol)) - return "matchedProtocol: string expected"; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - if (!$util.isString(message.matchedPortRange)) - return "matchedPortRange: string expected"; - if (message.vip != null && message.hasOwnProperty("vip")) - if (!$util.isString(message.vip)) - return "vip: string expected"; - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - if (!$util.isString(message.loadBalancerName)) - return "loadBalancerName: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ForwardingRuleInfo} ForwardingRuleInfo - */ - ForwardingRuleInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ForwardingRuleInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedProtocol != null) - message.matchedProtocol = String(object.matchedProtocol); - if (object.matchedPortRange != null) - message.matchedPortRange = String(object.matchedPortRange); - if (object.vip != null) - message.vip = String(object.vip); - if (object.target != null) - message.target = String(object.target); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - if (object.loadBalancerName != null) - message.loadBalancerName = String(object.loadBalancerName); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1.ForwardingRuleInfo} message ForwardingRuleInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardingRuleInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedProtocol = ""; - object.vip = ""; - object.target = ""; - object.matchedPortRange = ""; - object.networkUri = ""; - object.region = ""; - object.loadBalancerName = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - object.matchedProtocol = message.matchedProtocol; - if (message.vip != null && message.hasOwnProperty("vip")) - object.vip = message.vip; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - object.matchedPortRange = message.matchedPortRange; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - object.loadBalancerName = message.loadBalancerName; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardingRuleInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ForwardingRuleInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardingRuleInfo"; - }; - - return ForwardingRuleInfo; - })(); - - v1.LoadBalancerInfo = (function() { - - /** - * Properties of a LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILoadBalancerInfo - * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType - * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri - * @property {Array.|null} [backends] LoadBalancerInfo backends - * @property {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType - * @property {string|null} [backendUri] LoadBalancerInfo backendUri - */ - - /** - * Constructs a new LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LoadBalancerInfo. - * @implements ILoadBalancerInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set - */ - function LoadBalancerInfo(properties) { - this.backends = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerInfo loadBalancerType. - * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType} loadBalancerType - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.loadBalancerType = 0; - - /** - * LoadBalancerInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerInfo backends. - * @member {Array.} backends - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backends = $util.emptyArray; - - /** - * LoadBalancerInfo backendType. - * @member {google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType} backendType - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendType = 0; - - /** - * LoadBalancerInfo backendUri. - * @member {string} backendUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendUri = ""; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo instance - */ - LoadBalancerInfo.create = function create(properties) { - return new LoadBalancerInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); - if (message.backends != null && message.backends.length) - for (var i = 0; i < message.backends.length; ++i) - $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); - if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); - return writer; - }; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.loadBalancerType = reader.int32(); - break; - } - case 2: { - message.healthCheckUri = reader.string(); - break; - } - case 3: { - if (!(message.backends && message.backends.length)) - message.backends = []; - message.backends.push($root.google.cloud.networkmanagement.v1.LoadBalancerBackend.decode(reader, reader.uint32())); - break; - } - case 4: { - message.backendType = reader.int32(); - break; - } - case 5: { - message.backendUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - switch (message.loadBalancerType) { - default: - return "loadBalancerType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.backends != null && message.hasOwnProperty("backends")) { - if (!Array.isArray(message.backends)) - return "backends: array expected"; - for (var i = 0; i < message.backends.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.verify(message.backends[i]); - if (error) - return "backends." + error; - } - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - switch (message.backendType) { - default: - return "backendType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - if (!$util.isString(message.backendUri)) - return "backendUri: string expected"; - return null; - }; - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LoadBalancerInfo} LoadBalancerInfo - */ - LoadBalancerInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerInfo(); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "INTERNAL_TCP_UDP": - case 1: - message.loadBalancerType = 1; - break; - case "NETWORK_TCP_UDP": - case 2: - message.loadBalancerType = 2; - break; - case "HTTP_PROXY": - case 3: - message.loadBalancerType = 3; - break; - case "TCP_PROXY": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY": - case 5: - message.loadBalancerType = 5; - break; - } - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - if (object.backends) { - if (!Array.isArray(object.backends)) - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: array expected"); - message.backends = []; - for (var i = 0; i < object.backends.length; ++i) { - if (typeof object.backends[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerInfo.backends: object expected"); - message.backends[i] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.fromObject(object.backends[i]); - } - } - switch (object.backendType) { - default: - if (typeof object.backendType === "number") { - message.backendType = object.backendType; - break; - } - break; - case "BACKEND_TYPE_UNSPECIFIED": - case 0: - message.backendType = 0; - break; - case "BACKEND_SERVICE": - case 1: - message.backendType = 1; - break; - case "TARGET_POOL": - case 2: - message.backendType = 2; - break; - case "TARGET_INSTANCE": - case 3: - message.backendType = 3; - break; - } - if (object.backendUri != null) - message.backendUri = String(object.backendUri); - return message; - }; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1.LoadBalancerInfo} message LoadBalancerInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backends = []; - if (options.defaults) { - object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; - object.healthCheckUri = ""; - object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; - object.backendUri = ""; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.backends && message.backends.length) { - object.backends = []; - for (var j = 0; j < message.backends.length; ++j) - object.backends[j] = $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.toObject(message.backends[j], options); - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - object.backendUri = message.backendUri; - return object; - }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LoadBalancerInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerInfo"; - }; - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value - * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value - * @property {number} HTTP_PROXY=3 HTTP_PROXY value - * @property {number} TCP_PROXY=4 TCP_PROXY value - * @property {number} SSL_PROXY=5 SSL_PROXY value - */ - LoadBalancerInfo.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; - values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; - values[valuesById[3] = "HTTP_PROXY"] = 3; - values[valuesById[4] = "TCP_PROXY"] = 4; - values[valuesById[5] = "SSL_PROXY"] = 5; - return values; - })(); - - /** - * BackendType enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerInfo.BackendType - * @enum {number} - * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value - * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value - * @property {number} TARGET_POOL=2 TARGET_POOL value - * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value - */ - LoadBalancerInfo.BackendType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKEND_SERVICE"] = 1; - values[valuesById[2] = "TARGET_POOL"] = 2; - values[valuesById[3] = "TARGET_INSTANCE"] = 3; - return values; - })(); - - return LoadBalancerInfo; - })(); - - v1.LoadBalancerBackend = (function() { - - /** - * Properties of a LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILoadBalancerBackend - * @property {string|null} [displayName] LoadBalancerBackend displayName - * @property {string|null} [uri] LoadBalancerBackend uri - * @property {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState - * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules - * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules - */ - - /** - * Constructs a new LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LoadBalancerBackend. - * @implements ILoadBalancerBackend - * @constructor - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set - */ - function LoadBalancerBackend(properties) { - this.healthCheckAllowingFirewallRules = []; - this.healthCheckBlockingFirewallRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackend displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.displayName = ""; - - /** - * LoadBalancerBackend uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.uri = ""; - - /** - * LoadBalancerBackend healthCheckFirewallState. - * @member {google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckFirewallState = 0; - - /** - * LoadBalancerBackend healthCheckAllowingFirewallRules. - * @member {Array.} healthCheckAllowingFirewallRules - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; - - /** - * LoadBalancerBackend healthCheckBlockingFirewallRules. - * @member {Array.} healthCheckBlockingFirewallRules - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend instance - */ - LoadBalancerBackend.create = function create(properties) { - return new LoadBalancerBackend(properties); - }; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); - if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); - if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackend.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.healthCheckFirewallState = reader.int32(); - break; - } - case 4: { - if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) - message.healthCheckAllowingFirewallRules = []; - message.healthCheckAllowingFirewallRules.push(reader.string()); - break; - } - case 5: { - if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) - message.healthCheckBlockingFirewallRules = []; - message.healthCheckBlockingFirewallRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackend message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - switch (message.healthCheckFirewallState) { - default: - return "healthCheckFirewallState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { - if (!Array.isArray(message.healthCheckAllowingFirewallRules)) - return "healthCheckAllowingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) - return "healthCheckAllowingFirewallRules: string[] expected"; - } - if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { - if (!Array.isArray(message.healthCheckBlockingFirewallRules)) - return "healthCheckBlockingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) - return "healthCheckBlockingFirewallRules: string[] expected"; - } - return null; - }; - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackend} LoadBalancerBackend - */ - LoadBalancerBackend.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackend) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackend(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - switch (object.healthCheckFirewallState) { - default: - if (typeof object.healthCheckFirewallState === "number") { - message.healthCheckFirewallState = object.healthCheckFirewallState; - break; - } - break; - case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallState = 0; - break; - case "CONFIGURED": - case 1: - message.healthCheckFirewallState = 1; - break; - case "MISCONFIGURED": - case 2: - message.healthCheckFirewallState = 2; - break; - } - if (object.healthCheckAllowingFirewallRules) { - if (!Array.isArray(object.healthCheckAllowingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); - message.healthCheckAllowingFirewallRules = []; - for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) - message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); - } - if (object.healthCheckBlockingFirewallRules) { - if (!Array.isArray(object.healthCheckBlockingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); - message.healthCheckBlockingFirewallRules = []; - for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) - message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1.LoadBalancerBackend} message LoadBalancerBackend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.healthCheckAllowingFirewallRules = []; - object.healthCheckBlockingFirewallRules = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; - if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { - object.healthCheckAllowingFirewallRules = []; - for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) - object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; - } - if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { - object.healthCheckBlockingFirewallRules = []; - for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) - object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; - } - return object; - }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackend - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackend - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackend"; - }; - - /** - * HealthCheckFirewallState enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerBackend.HealthCheckFirewallState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value - * @property {number} CONFIGURED=1 CONFIGURED value - * @property {number} MISCONFIGURED=2 MISCONFIGURED value - */ - LoadBalancerBackend.HealthCheckFirewallState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIGURED"] = 1; - values[valuesById[2] = "MISCONFIGURED"] = 2; - return values; - })(); - - return LoadBalancerBackend; - })(); - - v1.VpnGatewayInfo = (function() { - - /** - * Properties of a VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IVpnGatewayInfo - * @property {string|null} [displayName] VpnGatewayInfo displayName - * @property {string|null} [uri] VpnGatewayInfo uri - * @property {string|null} [networkUri] VpnGatewayInfo networkUri - * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress - * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri - * @property {string|null} [region] VpnGatewayInfo region - */ - - /** - * Constructs a new VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a VpnGatewayInfo. - * @implements IVpnGatewayInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set - */ - function VpnGatewayInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnGatewayInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.displayName = ""; - - /** - * VpnGatewayInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.uri = ""; - - /** - * VpnGatewayInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.networkUri = ""; - - /** - * VpnGatewayInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.ipAddress = ""; - - /** - * VpnGatewayInfo vpnTunnelUri. - * @member {string} vpnTunnelUri - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.vpnTunnelUri = ""; - - /** - * VpnGatewayInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.region = ""; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo instance - */ - VpnGatewayInfo.create = function create(properties) { - return new VpnGatewayInfo(properties); - }; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnGatewayInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 5: { - message.vpnTunnelUri = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnGatewayInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnGatewayInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - if (!$util.isString(message.vpnTunnelUri)) - return "vpnTunnelUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.VpnGatewayInfo} VpnGatewayInfo - */ - VpnGatewayInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.VpnGatewayInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.VpnGatewayInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.vpnTunnelUri != null) - message.vpnTunnelUri = String(object.vpnTunnelUri); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1.VpnGatewayInfo} message VpnGatewayInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnGatewayInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.ipAddress = ""; - object.vpnTunnelUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - object.vpnTunnelUri = message.vpnTunnelUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @instance - * @returns {Object.} JSON object - */ - VpnGatewayInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnGatewayInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.VpnGatewayInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnGatewayInfo"; - }; - - return VpnGatewayInfo; - })(); - - v1.VpnTunnelInfo = (function() { - - /** - * Properties of a VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IVpnTunnelInfo - * @property {string|null} [displayName] VpnTunnelInfo displayName - * @property {string|null} [uri] VpnTunnelInfo uri - * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway - * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway - * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp - * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp - * @property {string|null} [networkUri] VpnTunnelInfo networkUri - * @property {string|null} [region] VpnTunnelInfo region - * @property {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType - */ - - /** - * Constructs a new VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a VpnTunnelInfo. - * @implements IVpnTunnelInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set - */ - function VpnTunnelInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnTunnelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.displayName = ""; - - /** - * VpnTunnelInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.uri = ""; - - /** - * VpnTunnelInfo sourceGateway. - * @member {string} sourceGateway - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGateway = ""; - - /** - * VpnTunnelInfo remoteGateway. - * @member {string} remoteGateway - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGateway = ""; - - /** - * VpnTunnelInfo remoteGatewayIp. - * @member {string} remoteGatewayIp - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGatewayIp = ""; - - /** - * VpnTunnelInfo sourceGatewayIp. - * @member {string} sourceGatewayIp - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGatewayIp = ""; - - /** - * VpnTunnelInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.networkUri = ""; - - /** - * VpnTunnelInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.region = ""; - - /** - * VpnTunnelInfo routingType. - * @member {google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType} routingType - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.routingType = 0; - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo instance - */ - VpnTunnelInfo.create = function create(properties) { - return new VpnTunnelInfo(properties); - }; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); - if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); - if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); - if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); - return writer; - }; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpnTunnelInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.sourceGateway = reader.string(); - break; - } - case 4: { - message.remoteGateway = reader.string(); - break; - } - case 5: { - message.remoteGatewayIp = reader.string(); - break; - } - case 6: { - message.sourceGatewayIp = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.routingType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnTunnelInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnTunnelInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - if (!$util.isString(message.sourceGateway)) - return "sourceGateway: string expected"; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - if (!$util.isString(message.remoteGateway)) - return "remoteGateway: string expected"; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - if (!$util.isString(message.remoteGatewayIp)) - return "remoteGatewayIp: string expected"; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - if (!$util.isString(message.sourceGatewayIp)) - return "sourceGatewayIp: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.routingType != null && message.hasOwnProperty("routingType")) - switch (message.routingType) { - default: - return "routingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.VpnTunnelInfo} VpnTunnelInfo - */ - VpnTunnelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.VpnTunnelInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.VpnTunnelInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.sourceGateway != null) - message.sourceGateway = String(object.sourceGateway); - if (object.remoteGateway != null) - message.remoteGateway = String(object.remoteGateway); - if (object.remoteGatewayIp != null) - message.remoteGatewayIp = String(object.remoteGatewayIp); - if (object.sourceGatewayIp != null) - message.sourceGatewayIp = String(object.sourceGatewayIp); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - switch (object.routingType) { - default: - if (typeof object.routingType === "number") { - message.routingType = object.routingType; - break; - } - break; - case "ROUTING_TYPE_UNSPECIFIED": - case 0: - message.routingType = 0; - break; - case "ROUTE_BASED": - case 1: - message.routingType = 1; - break; - case "POLICY_BASED": - case 2: - message.routingType = 2; - break; - case "DYNAMIC": - case 3: - message.routingType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1.VpnTunnelInfo} message VpnTunnelInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnTunnelInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.sourceGateway = ""; - object.remoteGateway = ""; - object.remoteGatewayIp = ""; - object.sourceGatewayIp = ""; - object.networkUri = ""; - object.region = ""; - object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - object.sourceGateway = message.sourceGateway; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - object.remoteGateway = message.remoteGateway; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - object.remoteGatewayIp = message.remoteGatewayIp; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - object.sourceGatewayIp = message.sourceGatewayIp; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.routingType != null && message.hasOwnProperty("routingType")) - object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; - return object; - }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @instance - * @returns {Object.} JSON object - */ - VpnTunnelInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnTunnelInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.VpnTunnelInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpnTunnelInfo"; - }; - - /** - * RoutingType enum. - * @name google.cloud.networkmanagement.v1.VpnTunnelInfo.RoutingType - * @enum {number} - * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value - * @property {number} ROUTE_BASED=1 ROUTE_BASED value - * @property {number} POLICY_BASED=2 POLICY_BASED value - * @property {number} DYNAMIC=3 DYNAMIC value - */ - VpnTunnelInfo.RoutingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ROUTE_BASED"] = 1; - values[valuesById[2] = "POLICY_BASED"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - return values; - })(); - - return VpnTunnelInfo; - })(); - - v1.EndpointInfo = (function() { - - /** - * Properties of an EndpointInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IEndpointInfo - * @property {string|null} [sourceIp] EndpointInfo sourceIp - * @property {string|null} [destinationIp] EndpointInfo destinationIp - * @property {string|null} [protocol] EndpointInfo protocol - * @property {number|null} [sourcePort] EndpointInfo sourcePort - * @property {number|null} [destinationPort] EndpointInfo destinationPort - * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri - * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri - * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri - */ - - /** - * Constructs a new EndpointInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an EndpointInfo. - * @implements IEndpointInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set - */ - function EndpointInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EndpointInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceIp = ""; - - /** - * EndpointInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationIp = ""; - - /** - * EndpointInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.protocol = ""; - - /** - * EndpointInfo sourcePort. - * @member {number} sourcePort - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourcePort = 0; - - /** - * EndpointInfo destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationPort = 0; - - /** - * EndpointInfo sourceNetworkUri. - * @member {string} sourceNetworkUri - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceNetworkUri = ""; - - /** - * EndpointInfo destinationNetworkUri. - * @member {string} destinationNetworkUri - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationNetworkUri = ""; - - /** - * EndpointInfo sourceAgentUri. - * @member {string} sourceAgentUri - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceAgentUri = ""; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.IEndpointInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo instance - */ - EndpointInfo.create = function create(properties) { - return new EndpointInfo(properties); - }; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); - if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); - if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); - if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); - return writer; - }; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.EndpointInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.destinationIp = reader.string(); - break; - } - case 3: { - message.protocol = reader.string(); - break; - } - case 4: { - message.sourcePort = reader.int32(); - break; - } - case 5: { - message.destinationPort = reader.int32(); - break; - } - case 6: { - message.sourceNetworkUri = reader.string(); - break; - } - case 7: { - message.destinationNetworkUri = reader.string(); - break; - } - case 8: { - message.sourceAgentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EndpointInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EndpointInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isInteger(message.sourcePort)) - return "sourcePort: integer expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - if (!$util.isString(message.sourceNetworkUri)) - return "sourceNetworkUri: string expected"; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - if (!$util.isString(message.destinationNetworkUri)) - return "destinationNetworkUri: string expected"; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - if (!$util.isString(message.sourceAgentUri)) - return "sourceAgentUri: string expected"; - return null; - }; - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.EndpointInfo} EndpointInfo - */ - EndpointInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.EndpointInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.EndpointInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.sourcePort != null) - message.sourcePort = object.sourcePort | 0; - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - if (object.sourceNetworkUri != null) - message.sourceNetworkUri = String(object.sourceNetworkUri); - if (object.destinationNetworkUri != null) - message.destinationNetworkUri = String(object.destinationNetworkUri); - if (object.sourceAgentUri != null) - message.sourceAgentUri = String(object.sourceAgentUri); - return message; - }; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1.EndpointInfo} message EndpointInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EndpointInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.destinationIp = ""; - object.protocol = ""; - object.sourcePort = 0; - object.destinationPort = 0; - object.sourceNetworkUri = ""; - object.destinationNetworkUri = ""; - object.sourceAgentUri = ""; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - object.sourceNetworkUri = message.sourceNetworkUri; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - object.destinationNetworkUri = message.destinationNetworkUri; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - object.sourceAgentUri = message.sourceAgentUri; - return object; - }; - - /** - * Converts this EndpointInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @instance - * @returns {Object.} JSON object - */ - EndpointInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EndpointInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.EndpointInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.EndpointInfo"; - }; - - return EndpointInfo; - })(); - - v1.DeliverInfo = (function() { - - /** - * Properties of a DeliverInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IDeliverInfo - * @property {google.cloud.networkmanagement.v1.DeliverInfo.Target|null} [target] DeliverInfo target - * @property {string|null} [resourceUri] DeliverInfo resourceUri - * @property {string|null} [ipAddress] DeliverInfo ipAddress - * @property {string|null} [storageBucket] DeliverInfo storageBucket - * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget - */ - - /** - * Constructs a new DeliverInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a DeliverInfo. - * @implements IDeliverInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set - */ - function DeliverInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeliverInfo target. - * @member {google.cloud.networkmanagement.v1.DeliverInfo.Target} target - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.target = 0; - - /** - * DeliverInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.resourceUri = ""; - - /** - * DeliverInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.ipAddress = ""; - - /** - * DeliverInfo storageBucket. - * @member {string} storageBucket - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.storageBucket = ""; - - /** - * DeliverInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDeliverInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo instance - */ - DeliverInfo.create = function create(properties) { - return new DeliverInfo(properties); - }; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeliverInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.storageBucket = reader.string(); - break; - } - case 5: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeliverInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeliverInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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: - case 15: - case 16: - case 17: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - if (!$util.isString(message.storageBucket)) - return "storageBucket: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.DeliverInfo} DeliverInfo - */ - DeliverInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.DeliverInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.DeliverInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "INSTANCE": - case 1: - message.target = 1; - break; - case "INTERNET": - case 2: - message.target = 2; - break; - case "GOOGLE_API": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "CLOUD_SQL_INSTANCE": - case 5: - message.target = 5; - break; - case "PSC_PUBLISHED_SERVICE": - case 6: - message.target = 6; - break; - case "PSC_GOOGLE_API": - case 7: - message.target = 7; - break; - case "PSC_VPC_SC": - case 8: - message.target = 8; - break; - case "SERVERLESS_NEG": - case 9: - message.target = 9; - break; - case "STORAGE_BUCKET": - case 10: - message.target = 10; - break; - case "PRIVATE_NETWORK": - case 11: - message.target = 11; - break; - case "CLOUD_FUNCTION": - case 12: - message.target = 12; - break; - case "APP_ENGINE_VERSION": - case 13: - message.target = 13; - break; - case "CLOUD_RUN_REVISION": - case 14: - message.target = 14; - break; - case "GOOGLE_MANAGED_SERVICE": - case 15: - message.target = 15; - break; - case "REDIS_INSTANCE": - case 16: - message.target = 16; - break; - case "REDIS_CLUSTER": - case 17: - message.target = 17; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.storageBucket != null) - message.storageBucket = String(object.storageBucket); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1.DeliverInfo} message DeliverInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeliverInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - object.storageBucket = ""; - object.pscGoogleApiTarget = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.DeliverInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - object.storageBucket = message.storageBucket; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this DeliverInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @instance - * @returns {Object.} JSON object - */ - DeliverInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeliverInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.DeliverInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeliverInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1.DeliverInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} INTERNET=2 INTERNET value - * @property {number} GOOGLE_API=3 GOOGLE_API value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value - * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value - * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value - * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value - * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value - * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value - * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value - * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value - * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value - * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value - * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value - * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value - * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value - */ - DeliverInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "INTERNET"] = 2; - values[valuesById[3] = "GOOGLE_API"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; - values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; - values[valuesById[7] = "PSC_GOOGLE_API"] = 7; - values[valuesById[8] = "PSC_VPC_SC"] = 8; - values[valuesById[9] = "SERVERLESS_NEG"] = 9; - values[valuesById[10] = "STORAGE_BUCKET"] = 10; - values[valuesById[11] = "PRIVATE_NETWORK"] = 11; - values[valuesById[12] = "CLOUD_FUNCTION"] = 12; - values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; - values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; - values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; - values[valuesById[16] = "REDIS_INSTANCE"] = 16; - values[valuesById[17] = "REDIS_CLUSTER"] = 17; - return values; - })(); - - return DeliverInfo; - })(); - - v1.ForwardInfo = (function() { - - /** - * Properties of a ForwardInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IForwardInfo - * @property {google.cloud.networkmanagement.v1.ForwardInfo.Target|null} [target] ForwardInfo target - * @property {string|null} [resourceUri] ForwardInfo resourceUri - * @property {string|null} [ipAddress] ForwardInfo ipAddress - */ - - /** - * Constructs a new ForwardInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ForwardInfo. - * @implements IForwardInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set - */ - function ForwardInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardInfo target. - * @member {google.cloud.networkmanagement.v1.ForwardInfo.Target} target - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.target = 0; - - /** - * ForwardInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.resourceUri = ""; - - /** - * ForwardInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.ipAddress = ""; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo instance - */ - ForwardInfo.create = function create(properties) { - return new ForwardInfo(properties); - }; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ForwardInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - return null; - }; - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ForwardInfo} ForwardInfo - */ - ForwardInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ForwardInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ForwardInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "PEERING_VPC": - case 1: - message.target = 1; - break; - case "VPN_GATEWAY": - case 2: - message.target = 2; - break; - case "INTERCONNECT": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": - case 5: - message.target = 5; - break; - case "CLOUD_SQL_INSTANCE": - case 6: - message.target = 6; - break; - case "ANOTHER_PROJECT": - case 7: - message.target = 7; - break; - case "NCC_HUB": - case 8: - message.target = 8; - break; - case "ROUTER_APPLIANCE": - case 9: - message.target = 9; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - return message; - }; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1.ForwardInfo} message ForwardInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1.ForwardInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this ForwardInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ForwardInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ForwardInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1.ForwardInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} PEERING_VPC=1 PEERING_VPC value - * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value - * @property {number} INTERCONNECT=3 INTERCONNECT value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value - * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value - * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value - * @property {number} NCC_HUB=8 NCC_HUB value - * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value - */ - ForwardInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "PEERING_VPC"] = 1; - values[valuesById[2] = "VPN_GATEWAY"] = 2; - values[valuesById[3] = "INTERCONNECT"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; - values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; - values[valuesById[7] = "ANOTHER_PROJECT"] = 7; - values[valuesById[8] = "NCC_HUB"] = 8; - values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; - return values; - })(); - - return ForwardInfo; - })(); - - v1.AbortInfo = (function() { - - /** - * Properties of an AbortInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IAbortInfo - * @property {google.cloud.networkmanagement.v1.AbortInfo.Cause|null} [cause] AbortInfo cause - * @property {string|null} [resourceUri] AbortInfo resourceUri - * @property {string|null} [ipAddress] AbortInfo ipAddress - * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission - */ - - /** - * Constructs a new AbortInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an AbortInfo. - * @implements IAbortInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set - */ - function AbortInfo(properties) { - this.projectsMissingPermission = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AbortInfo cause. - * @member {google.cloud.networkmanagement.v1.AbortInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.cause = 0; - - /** - * AbortInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.resourceUri = ""; - - /** - * AbortInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.ipAddress = ""; - - /** - * AbortInfo projectsMissingPermission. - * @member {Array.} projectsMissingPermission - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - */ - AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAbortInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo instance - */ - AbortInfo.create = function create(properties) { - return new AbortInfo(properties); - }; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AbortInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 3: { - if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) - message.projectsMissingPermission = []; - message.projectsMissingPermission.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AbortInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AbortInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 3: - case 7: - case 8: - case 11: - case 12: - case 13: - case 14: - case 2: - case 32: - case 23: - case 4: - case 28: - case 29: - case 36: - case 5: - case 6: - case 9: - case 10: - case 15: - case 16: - case 17: - case 18: - case 24: - case 25: - case 26: - case 27: - case 19: - case 20: - case 34: - case 35: - case 21: - case 22: - case 30: - case 31: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { - if (!Array.isArray(message.projectsMissingPermission)) - return "projectsMissingPermission: array expected"; - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - if (!$util.isString(message.projectsMissingPermission[i])) - return "projectsMissingPermission: string[] expected"; - } - return null; - }; - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.AbortInfo} AbortInfo - */ - AbortInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.AbortInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.AbortInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_NETWORK": - case 1: - message.cause = 1; - break; - case "UNKNOWN_PROJECT": - case 3: - message.cause = 3; - break; - case "NO_EXTERNAL_IP": - case 7: - message.cause = 7; - break; - case "UNINTENDED_DESTINATION": - case 8: - message.cause = 8; - break; - case "SOURCE_ENDPOINT_NOT_FOUND": - case 11: - message.cause = 11; - break; - case "MISMATCHED_SOURCE_NETWORK": - case 12: - message.cause = 12; - break; - case "DESTINATION_ENDPOINT_NOT_FOUND": - case 13: - message.cause = 13; - break; - case "MISMATCHED_DESTINATION_NETWORK": - case 14: - message.cause = 14; - break; - case "UNKNOWN_IP": - case 2: - message.cause = 2; - break; - case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": - case 32: - message.cause = 32; - break; - case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": - case 23: - message.cause = 23; - break; - case "PERMISSION_DENIED": - case 4: - message.cause = 4; - break; - case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": - case 28: - message.cause = 28; - break; - case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": - case 29: - message.cause = 29; - break; - case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": - case 36: - message.cause = 36; - break; - case "NO_SOURCE_LOCATION": - case 5: - message.cause = 5; - break; - case "INVALID_ARGUMENT": - case 6: - message.cause = 6; - break; - case "TRACE_TOO_LONG": - case 9: - message.cause = 9; - break; - case "INTERNAL_ERROR": - case 10: - message.cause = 10; - break; - case "UNSUPPORTED": - case 15: - message.cause = 15; - break; - case "MISMATCHED_IP_VERSION": - case 16: - message.cause = 16; - break; - case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": - case 17: - message.cause = 17; - break; - case "RESOURCE_CONFIG_NOT_FOUND": - case 18: - message.cause = 18; - break; - case "VM_INSTANCE_CONFIG_NOT_FOUND": - case 24: - message.cause = 24; - break; - case "NETWORK_CONFIG_NOT_FOUND": - case 25: - message.cause = 25; - break; - case "FIREWALL_CONFIG_NOT_FOUND": - case 26: - message.cause = 26; - break; - case "ROUTE_CONFIG_NOT_FOUND": - case 27: - message.cause = 27; - break; - case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": - case 19: - message.cause = 19; - break; - case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": - case 20: - message.cause = 20; - break; - case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": - case 34: - message.cause = 34; - break; - case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": - case 35: - message.cause = 35; - break; - case "SOURCE_FORWARDING_RULE_UNSUPPORTED": - case 21: - message.cause = 21; - break; - case "NON_ROUTABLE_IP_ADDRESS": - case 22: - message.cause = 22; - break; - case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": - case 30: - message.cause = 30; - break; - case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": - case 31: - message.cause = 31; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.projectsMissingPermission) { - if (!Array.isArray(object.projectsMissingPermission)) - throw TypeError(".google.cloud.networkmanagement.v1.AbortInfo.projectsMissingPermission: array expected"); - message.projectsMissingPermission = []; - for (var i = 0; i < object.projectsMissingPermission.length; ++i) - message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); - } - return message; - }; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1.AbortInfo} message AbortInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AbortInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.projectsMissingPermission = []; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.AbortInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.projectsMissingPermission && message.projectsMissingPermission.length) { - object.projectsMissingPermission = []; - for (var j = 0; j < message.projectsMissingPermission.length; ++j) - object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this AbortInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @instance - * @returns {Object.} JSON object - */ - AbortInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AbortInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.AbortInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AbortInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1.AbortInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value - * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value - * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value - * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value - * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value - * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value - * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value - * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value - * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value - * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value - * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value - * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value - * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value - * @property {number} UNSUPPORTED=15 UNSUPPORTED value - * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value - * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value - * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value - * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value - * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value - * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value - * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value - * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value - * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value - * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value - * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value - * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value - * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value - * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value - * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value - */ - AbortInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; - values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; - values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; - values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; - values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; - values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; - values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; - values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; - values[valuesById[2] = "UNKNOWN_IP"] = 2; - values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; - values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; - values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; - values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; - values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; - values[valuesById[6] = "INVALID_ARGUMENT"] = 6; - values[valuesById[9] = "TRACE_TOO_LONG"] = 9; - values[valuesById[10] = "INTERNAL_ERROR"] = 10; - values[valuesById[15] = "UNSUPPORTED"] = 15; - values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; - values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; - values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; - values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; - values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; - values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; - values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; - values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; - values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; - values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; - values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; - values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; - values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; - values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; - values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; - return values; - })(); - - return AbortInfo; - })(); - - v1.DropInfo = (function() { - - /** - * Properties of a DropInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IDropInfo - * @property {google.cloud.networkmanagement.v1.DropInfo.Cause|null} [cause] DropInfo cause - * @property {string|null} [resourceUri] DropInfo resourceUri - * @property {string|null} [sourceIp] DropInfo sourceIp - * @property {string|null} [destinationIp] DropInfo destinationIp - * @property {string|null} [region] DropInfo region - */ - - /** - * Constructs a new DropInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a DropInfo. - * @implements IDropInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set - */ - function DropInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DropInfo cause. - * @member {google.cloud.networkmanagement.v1.DropInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.cause = 0; - - /** - * DropInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.resourceUri = ""; - - /** - * DropInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.sourceIp = ""; - - /** - * DropInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.destinationIp = ""; - - /** - * DropInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - */ - DropInfo.prototype.region = ""; - - /** - * Creates a new DropInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDropInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo instance - */ - DropInfo.create = function create(properties) { - return new DropInfo(properties); - }; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); - return writer; - }; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DropInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DropInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.sourceIp = reader.string(); - break; - } - case 4: { - message.destinationIp = reader.string(); - break; - } - case 5: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DropInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DropInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 42: - case 43: - case 49: - case 50: - case 51: - case 52: - case 53: - case 44: - case 45: - case 46: - case 7: - case 8: - case 47: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 27: - case 28: - case 68: - case 69: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 38: - case 36: - case 21: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 63: - case 22: - case 23: - case 24: - case 60: - case 61: - case 25: - case 26: - case 41: - case 48: - case 54: - case 58: - case 57: - case 64: - case 55: - case 56: - case 29: - case 37: - case 39: - case 40: - case 59: - case 62: - case 65: - case 66: - case 67: - case 70: - case 71: - case 72: - case 73: - case 74: - case 78: - case 75: - case 76: - case 77: - case 79: - case 80: - case 81: - case 82: - case 83: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.DropInfo} DropInfo - */ - DropInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.DropInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.DropInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_EXTERNAL_ADDRESS": - case 1: - message.cause = 1; - break; - case "FOREIGN_IP_DISALLOWED": - case 2: - message.cause = 2; - break; - case "FIREWALL_RULE": - case 3: - message.cause = 3; - break; - case "NO_ROUTE": - case 4: - message.cause = 4; - break; - case "ROUTE_BLACKHOLE": - case 5: - message.cause = 5; - break; - case "ROUTE_WRONG_NETWORK": - case 6: - message.cause = 6; - break; - case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": - case 42: - message.cause = 42; - break; - case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": - case 43: - message.cause = 43; - break; - case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": - case 49: - message.cause = 49; - break; - case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": - case 50: - message.cause = 50; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": - case 51: - message.cause = 51; - break; - case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": - case 52: - message.cause = 52; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": - case 53: - message.cause = 53; - break; - case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": - case 44: - message.cause = 44; - break; - case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": - case 45: - message.cause = 45; - break; - case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": - case 46: - message.cause = 46; - break; - case "PRIVATE_TRAFFIC_TO_INTERNET": - case 7: - message.cause = 7; - break; - case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": - case 8: - message.cause = 8; - break; - case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": - case 47: - message.cause = 47; - break; - case "NO_EXTERNAL_ADDRESS": - case 9: - message.cause = 9; - break; - case "UNKNOWN_INTERNAL_ADDRESS": - case 10: - message.cause = 10; - break; - case "FORWARDING_RULE_MISMATCH": - case 11: - message.cause = 11; - break; - case "FORWARDING_RULE_NO_INSTANCES": - case 12: - message.cause = 12; - break; - case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": - case 13: - message.cause = 13; - break; - case "INSTANCE_NOT_RUNNING": - case 14: - message.cause = 14; - break; - case "GKE_CLUSTER_NOT_RUNNING": - case 27: - message.cause = 27; - break; - case "CLOUD_SQL_INSTANCE_NOT_RUNNING": - case 28: - message.cause = 28; - break; - case "REDIS_INSTANCE_NOT_RUNNING": - case 68: - message.cause = 68; - break; - case "REDIS_CLUSTER_NOT_RUNNING": - case 69: - message.cause = 69; - break; - case "TRAFFIC_TYPE_BLOCKED": - case 15: - message.cause = 15; - break; - case "GKE_MASTER_UNAUTHORIZED_ACCESS": - case 16: - message.cause = 16; - break; - case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": - case 17: - message.cause = 17; - break; - case "DROPPED_INSIDE_GKE_SERVICE": - case 18: - message.cause = 18; - break; - case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": - case 19: - message.cause = 19; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PEERING": - case 20: - message.cause = 20; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": - case 38: - message.cause = 38; - break; - case "GKE_PSC_ENDPOINT_MISSING": - case 36: - message.cause = 36; - break; - case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": - case 21: - message.cause = 21; - break; - case "GKE_CONTROL_PLANE_REGION_MISMATCH": - case 30: - message.cause = 30; - break; - case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": - case 31: - message.cause = 31; - break; - case "GKE_CONTROL_PLANE_NO_ROUTE": - case 32: - message.cause = 32; - break; - case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": - case 33: - message.cause = 33; - break; - case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": - case 34: - message.cause = 34; - break; - case "CLOUD_SQL_INSTANCE_NO_ROUTE": - case 35: - message.cause = 35; - break; - case "CLOUD_SQL_CONNECTOR_REQUIRED": - case 63: - message.cause = 63; - break; - case "CLOUD_FUNCTION_NOT_ACTIVE": - case 22: - message.cause = 22; - break; - case "VPC_CONNECTOR_NOT_SET": - case 23: - message.cause = 23; - break; - case "VPC_CONNECTOR_NOT_RUNNING": - case 24: - message.cause = 24; - break; - case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": - case 60: - message.cause = 60; - break; - case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": - case 61: - message.cause = 61; - break; - case "FORWARDING_RULE_REGION_MISMATCH": - case 25: - message.cause = 25; - break; - case "PSC_CONNECTION_NOT_ACCEPTED": - case 26: - message.cause = 26; - break; - case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": - case 41: - message.cause = 41; - break; - case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": - case 48: - message.cause = 48; - break; - case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": - case 54: - message.cause = 54; - break; - case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": - case 58: - message.cause = 58; - break; - case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": - case 57: - message.cause = 57; - break; - case "PSC_TRANSITIVITY_NOT_PROPAGATED": - case 64: - message.cause = 64; - break; - case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": - case 55: - message.cause = 55; - break; - case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": - case 56: - message.cause = 56; - break; - case "CLOUD_RUN_REVISION_NOT_READY": - case 29: - message.cause = 29; - break; - case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": - case 37: - message.cause = 37; - break; - case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": - case 39: - message.cause = 39; - break; - case "CLOUD_NAT_NO_ADDRESSES": - case 40: - message.cause = 40; - break; - case "ROUTING_LOOP": - case 59: - message.cause = 59; - break; - case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": - case 62: - message.cause = 62; - break; - case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": - case 65: - message.cause = 65; - break; - case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": - case 66: - message.cause = 66; - break; - case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": - case 67: - message.cause = 67; - break; - case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": - case 70: - message.cause = 70; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PORT": - case 71: - message.cause = 71; - break; - case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": - case 72: - message.cause = 72; - break; - case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": - case 73: - message.cause = 73; - break; - case "REDIS_INSTANCE_NO_EXTERNAL_IP": - case 74: - message.cause = 74; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": - case 78: - message.cause = 78; - break; - case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": - case 75: - message.cause = 75; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PORT": - case 76: - message.cause = 76; - break; - case "REDIS_CLUSTER_NO_EXTERNAL_IP": - case 77: - message.cause = 77; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": - case 79: - message.cause = 79; - break; - case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": - case 80: - message.cause = 80; - break; - case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": - case 81: - message.cause = 81; - break; - case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": - case 82: - message.cause = 82; - break; - case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": - case 83: - message.cause = 83; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1.DropInfo} message DropInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DropInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.sourceIp = ""; - object.destinationIp = ""; - object.region = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1.DropInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this DropInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @instance - * @returns {Object.} JSON object - */ - DropInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DropInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.DropInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DropInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1.DropInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value - * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value - * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value - * @property {number} NO_ROUTE=4 NO_ROUTE value - * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value - * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value - * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value - * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value - * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value - * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value - * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value - * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value - * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value - * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value - * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value - * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value - * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value - * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value - * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value - * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value - * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value - * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value - * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value - * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value - * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value - * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value - * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value - * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value - * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value - * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value - * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value - * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value - * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value - * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value - * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value - * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value - * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value - * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value - * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value - * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value - * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value - * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value - * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value - * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value - * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value - * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value - * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value - * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value - * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value - * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value - * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value - * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value - * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value - * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value - * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value - * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value - * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value - * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value - * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value - * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value - * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value - * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value - * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value - * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value - * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value - * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value - * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value - * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value - * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value - * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value - */ - DropInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; - values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; - values[valuesById[3] = "FIREWALL_RULE"] = 3; - values[valuesById[4] = "NO_ROUTE"] = 4; - values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; - values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; - values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; - values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; - values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; - values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; - values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; - values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; - values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; - values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; - values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; - values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; - values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; - values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; - values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; - values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; - values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; - values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; - values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; - values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; - values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; - values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; - values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; - values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; - values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; - values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; - values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; - values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; - values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; - values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; - values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; - values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; - values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; - values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; - values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; - values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; - values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; - values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; - values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; - values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; - values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; - values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; - values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; - values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; - values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; - values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; - values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; - values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; - values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; - values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; - values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; - values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; - values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; - values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; - values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; - values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; - values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; - values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; - values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; - values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; - values[valuesById[59] = "ROUTING_LOOP"] = 59; - values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; - values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; - values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; - values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; - values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; - values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; - values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; - values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; - values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; - values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; - values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; - values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; - values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; - values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; - values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; - values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; - values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; - values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; - return values; - })(); - - return DropInfo; - })(); - - v1.GKEMasterInfo = (function() { - - /** - * Properties of a GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IGKEMasterInfo - * @property {string|null} [clusterUri] GKEMasterInfo clusterUri - * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri - * @property {string|null} [internalIp] GKEMasterInfo internalIp - * @property {string|null} [externalIp] GKEMasterInfo externalIp - * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint - */ - - /** - * Constructs a new GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a GKEMasterInfo. - * @implements IGKEMasterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set - */ - function GKEMasterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GKEMasterInfo clusterUri. - * @member {string} clusterUri - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterUri = ""; - - /** - * GKEMasterInfo clusterNetworkUri. - * @member {string} clusterNetworkUri - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterNetworkUri = ""; - - /** - * GKEMasterInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.internalIp = ""; - - /** - * GKEMasterInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.externalIp = ""; - - /** - * GKEMasterInfo dnsEndpoint. - * @member {string} dnsEndpoint - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.dnsEndpoint = ""; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo instance - */ - GKEMasterInfo.create = function create(properties) { - return new GKEMasterInfo(properties); - }; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); - if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); - return writer; - }; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GKEMasterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.clusterUri = reader.string(); - break; - } - case 4: { - message.clusterNetworkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.dnsEndpoint = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GKEMasterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GKEMasterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - if (!$util.isString(message.clusterUri)) - return "clusterUri: string expected"; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - if (!$util.isString(message.clusterNetworkUri)) - return "clusterNetworkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) - if (!$util.isString(message.dnsEndpoint)) - return "dnsEndpoint: string expected"; - return null; - }; - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.GKEMasterInfo} GKEMasterInfo - */ - GKEMasterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.GKEMasterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.GKEMasterInfo(); - if (object.clusterUri != null) - message.clusterUri = String(object.clusterUri); - if (object.clusterNetworkUri != null) - message.clusterNetworkUri = String(object.clusterNetworkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.dnsEndpoint != null) - message.dnsEndpoint = String(object.dnsEndpoint); - return message; - }; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1.GKEMasterInfo} message GKEMasterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GKEMasterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterUri = ""; - object.clusterNetworkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.dnsEndpoint = ""; - } - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - object.clusterUri = message.clusterUri; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - object.clusterNetworkUri = message.clusterNetworkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) - object.dnsEndpoint = message.dnsEndpoint; - return object; - }; - - /** - * Converts this GKEMasterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @instance - * @returns {Object.} JSON object - */ - GKEMasterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GKEMasterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GKEMasterInfo"; - }; - - return GKEMasterInfo; - })(); - - v1.CloudSQLInstanceInfo = (function() { - - /** - * Properties of a CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICloudSQLInstanceInfo - * @property {string|null} [displayName] CloudSQLInstanceInfo displayName - * @property {string|null} [uri] CloudSQLInstanceInfo uri - * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri - * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp - * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp - * @property {string|null} [region] CloudSQLInstanceInfo region - */ - - /** - * Constructs a new CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CloudSQLInstanceInfo. - * @implements ICloudSQLInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set - */ - function CloudSQLInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudSQLInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.displayName = ""; - - /** - * CloudSQLInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.uri = ""; - - /** - * CloudSQLInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.networkUri = ""; - - /** - * CloudSQLInstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.internalIp = ""; - - /** - * CloudSQLInstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.externalIp = ""; - - /** - * CloudSQLInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.region = ""; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance - */ - CloudSQLInstanceInfo.create = function create(properties) { - return new CloudSQLInstanceInfo(properties); - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); - return writer; - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudSQLInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - */ - CloudSQLInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CloudSQLInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudSQLInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CloudSQLInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudSQLInstanceInfo"; - }; - - return CloudSQLInstanceInfo; - })(); - - v1.RedisInstanceInfo = (function() { - - /** - * Properties of a RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRedisInstanceInfo - * @property {string|null} [displayName] RedisInstanceInfo displayName - * @property {string|null} [uri] RedisInstanceInfo uri - * @property {string|null} [networkUri] RedisInstanceInfo networkUri - * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp - * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp - * @property {string|null} [region] RedisInstanceInfo region - */ - - /** - * Constructs a new RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RedisInstanceInfo. - * @implements IRedisInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set - */ - function RedisInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.displayName = ""; - - /** - * RedisInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.uri = ""; - - /** - * RedisInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.networkUri = ""; - - /** - * RedisInstanceInfo primaryEndpointIp. - * @member {string} primaryEndpointIp - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.primaryEndpointIp = ""; - - /** - * RedisInstanceInfo readEndpointIp. - * @member {string} readEndpointIp - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.readEndpointIp = ""; - - /** - * RedisInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.region = ""; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo instance - */ - RedisInstanceInfo.create = function create(properties) { - return new RedisInstanceInfo(properties); - }; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); - if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.primaryEndpointIp = reader.string(); - break; - } - case 5: { - message.readEndpointIp = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - if (!$util.isString(message.primaryEndpointIp)) - return "primaryEndpointIp: string expected"; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - if (!$util.isString(message.readEndpointIp)) - return "readEndpointIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RedisInstanceInfo} RedisInstanceInfo - */ - RedisInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RedisInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RedisInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.primaryEndpointIp != null) - message.primaryEndpointIp = String(object.primaryEndpointIp); - if (object.readEndpointIp != null) - message.readEndpointIp = String(object.readEndpointIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1.RedisInstanceInfo} message RedisInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.primaryEndpointIp = ""; - object.readEndpointIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - object.primaryEndpointIp = message.primaryEndpointIp; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - object.readEndpointIp = message.readEndpointIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - RedisInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RedisInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisInstanceInfo"; - }; - - return RedisInstanceInfo; - })(); - - v1.RedisClusterInfo = (function() { - - /** - * Properties of a RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRedisClusterInfo - * @property {string|null} [displayName] RedisClusterInfo displayName - * @property {string|null} [uri] RedisClusterInfo uri - * @property {string|null} [networkUri] RedisClusterInfo networkUri - * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress - * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress - * @property {string|null} [location] RedisClusterInfo location - */ - - /** - * Constructs a new RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RedisClusterInfo. - * @implements IRedisClusterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set - */ - function RedisClusterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisClusterInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.displayName = ""; - - /** - * RedisClusterInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.uri = ""; - - /** - * RedisClusterInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.networkUri = ""; - - /** - * RedisClusterInfo discoveryEndpointIpAddress. - * @member {string} discoveryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; - - /** - * RedisClusterInfo secondaryEndpointIpAddress. - * @member {string} secondaryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; - - /** - * RedisClusterInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.location = ""; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo instance - */ - RedisClusterInfo.create = function create(properties) { - return new RedisClusterInfo(properties); - }; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); - if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); - return writer; - }; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RedisClusterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.discoveryEndpointIpAddress = reader.string(); - break; - } - case 5: { - message.secondaryEndpointIpAddress = reader.string(); - break; - } - case 6: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisClusterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisClusterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - if (!$util.isString(message.discoveryEndpointIpAddress)) - return "discoveryEndpointIpAddress: string expected"; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - if (!$util.isString(message.secondaryEndpointIpAddress)) - return "secondaryEndpointIpAddress: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RedisClusterInfo} RedisClusterInfo - */ - RedisClusterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RedisClusterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RedisClusterInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.discoveryEndpointIpAddress != null) - message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); - if (object.secondaryEndpointIpAddress != null) - message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1.RedisClusterInfo} message RedisClusterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisClusterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.discoveryEndpointIpAddress = ""; - object.secondaryEndpointIpAddress = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this RedisClusterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @instance - * @returns {Object.} JSON object - */ - RedisClusterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisClusterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RedisClusterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RedisClusterInfo"; - }; - - return RedisClusterInfo; - })(); - - v1.CloudFunctionInfo = (function() { - - /** - * Properties of a CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICloudFunctionInfo - * @property {string|null} [displayName] CloudFunctionInfo displayName - * @property {string|null} [uri] CloudFunctionInfo uri - * @property {string|null} [location] CloudFunctionInfo location - * @property {number|Long|null} [versionId] CloudFunctionInfo versionId - */ - - /** - * Constructs a new CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CloudFunctionInfo. - * @implements ICloudFunctionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set - */ - function CloudFunctionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.displayName = ""; - - /** - * CloudFunctionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.uri = ""; - - /** - * CloudFunctionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.location = ""; - - /** - * CloudFunctionInfo versionId. - * @member {number|Long} versionId - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo instance - */ - CloudFunctionInfo.create = function create(properties) { - return new CloudFunctionInfo(properties); - }; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); - return writer; - }; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudFunctionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - case 4: { - message.versionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) - return "versionId: integer|Long expected"; - return null; - }; - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CloudFunctionInfo} CloudFunctionInfo - */ - CloudFunctionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CloudFunctionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CloudFunctionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.versionId != null) - if ($util.Long) - (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; - else if (typeof object.versionId === "string") - message.versionId = parseInt(object.versionId, 10); - else if (typeof object.versionId === "number") - message.versionId = object.versionId; - else if (typeof object.versionId === "object") - message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1.CloudFunctionInfo} message CloudFunctionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionId = options.longs === String ? "0" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (typeof message.versionId === "number") - object.versionId = options.longs === String ? String(message.versionId) : message.versionId; - else - object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; - return object; - }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CloudFunctionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudFunctionInfo"; - }; - - return CloudFunctionInfo; - })(); - - v1.CloudRunRevisionInfo = (function() { - - /** - * Properties of a CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICloudRunRevisionInfo - * @property {string|null} [displayName] CloudRunRevisionInfo displayName - * @property {string|null} [uri] CloudRunRevisionInfo uri - * @property {string|null} [location] CloudRunRevisionInfo location - * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri - */ - - /** - * Constructs a new CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CloudRunRevisionInfo. - * @implements ICloudRunRevisionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set - */ - function CloudRunRevisionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.displayName = ""; - - /** - * CloudRunRevisionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.uri = ""; - - /** - * CloudRunRevisionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.location = ""; - - /** - * CloudRunRevisionInfo serviceUri. - * @member {string} serviceUri - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.serviceUri = ""; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo instance - */ - CloudRunRevisionInfo.create = function create(properties) { - return new CloudRunRevisionInfo(properties); - }; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CloudRunRevisionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - case 5: { - message.serviceUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - if (!$util.isString(message.serviceUri)) - return "serviceUri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} CloudRunRevisionInfo - */ - CloudRunRevisionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CloudRunRevisionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.serviceUri != null) - message.serviceUri = String(object.serviceUri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1.CloudRunRevisionInfo} message CloudRunRevisionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - object.serviceUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - object.serviceUri = message.serviceUri; - return object; - }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CloudRunRevisionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CloudRunRevisionInfo"; - }; - - return CloudRunRevisionInfo; - })(); - - v1.AppEngineVersionInfo = (function() { - - /** - * Properties of an AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IAppEngineVersionInfo - * @property {string|null} [displayName] AppEngineVersionInfo displayName - * @property {string|null} [uri] AppEngineVersionInfo uri - * @property {string|null} [runtime] AppEngineVersionInfo runtime - * @property {string|null} [environment] AppEngineVersionInfo environment - */ - - /** - * Constructs a new AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an AppEngineVersionInfo. - * @implements IAppEngineVersionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set - */ - function AppEngineVersionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.displayName = ""; - - /** - * AppEngineVersionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.uri = ""; - - /** - * AppEngineVersionInfo runtime. - * @member {string} runtime - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.runtime = ""; - - /** - * AppEngineVersionInfo environment. - * @member {string} environment - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.environment = ""; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo instance - */ - AppEngineVersionInfo.create = function create(properties) { - return new AppEngineVersionInfo(properties); - }; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.AppEngineVersionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.runtime = reader.string(); - break; - } - case 4: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.runtime != null && message.hasOwnProperty("runtime")) - if (!$util.isString(message.runtime)) - return "runtime: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.AppEngineVersionInfo} AppEngineVersionInfo - */ - AppEngineVersionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.AppEngineVersionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.runtime != null) - message.runtime = String(object.runtime); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1.AppEngineVersionInfo} message AppEngineVersionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.runtime = ""; - object.environment = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.runtime != null && message.hasOwnProperty("runtime")) - object.runtime = message.runtime; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.AppEngineVersionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.AppEngineVersionInfo"; - }; - - return AppEngineVersionInfo; - })(); - - v1.VpcConnectorInfo = (function() { - - /** - * Properties of a VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IVpcConnectorInfo - * @property {string|null} [displayName] VpcConnectorInfo displayName - * @property {string|null} [uri] VpcConnectorInfo uri - * @property {string|null} [location] VpcConnectorInfo location - */ - - /** - * Constructs a new VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a VpcConnectorInfo. - * @implements IVpcConnectorInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set - */ - function VpcConnectorInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpcConnectorInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.displayName = ""; - - /** - * VpcConnectorInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.uri = ""; - - /** - * VpcConnectorInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.location = ""; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo instance - */ - VpcConnectorInfo.create = function create(properties) { - return new VpcConnectorInfo(properties); - }; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - return writer; - }; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.VpcConnectorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcConnectorInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcConnectorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.VpcConnectorInfo} VpcConnectorInfo - */ - VpcConnectorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.VpcConnectorInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.VpcConnectorInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1.VpcConnectorInfo} message VpcConnectorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcConnectorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @instance - * @returns {Object.} JSON object - */ - VpcConnectorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcConnectorInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.VpcConnectorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.VpcConnectorInfo"; - }; - - return VpcConnectorInfo; - })(); - - v1.NatInfo = (function() { - - /** - * Properties of a NatInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface INatInfo - * @property {google.cloud.networkmanagement.v1.NatInfo.Type|null} [type] NatInfo type - * @property {string|null} [protocol] NatInfo protocol - * @property {string|null} [networkUri] NatInfo networkUri - * @property {string|null} [oldSourceIp] NatInfo oldSourceIp - * @property {string|null} [newSourceIp] NatInfo newSourceIp - * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp - * @property {string|null} [newDestinationIp] NatInfo newDestinationIp - * @property {number|null} [oldSourcePort] NatInfo oldSourcePort - * @property {number|null} [newSourcePort] NatInfo newSourcePort - * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort - * @property {number|null} [newDestinationPort] NatInfo newDestinationPort - * @property {string|null} [routerUri] NatInfo routerUri - * @property {string|null} [natGatewayName] NatInfo natGatewayName - */ - - /** - * Constructs a new NatInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a NatInfo. - * @implements INatInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set - */ - function NatInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NatInfo type. - * @member {google.cloud.networkmanagement.v1.NatInfo.Type} type - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.type = 0; - - /** - * NatInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.protocol = ""; - - /** - * NatInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.networkUri = ""; - - /** - * NatInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourceIp = ""; - - /** - * NatInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newSourceIp = ""; - - /** - * NatInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationIp = ""; - - /** - * NatInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationIp = ""; - - /** - * NatInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourcePort = 0; - - /** - * NatInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newSourcePort = 0; - - /** - * NatInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationPort = 0; - - /** - * NatInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationPort = 0; - - /** - * NatInfo routerUri. - * @member {string} routerUri - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.routerUri = ""; - - /** - * NatInfo natGatewayName. - * @member {string} natGatewayName - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - */ - NatInfo.prototype.natGatewayName = ""; - - /** - * Creates a new NatInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.INatInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo instance - */ - NatInfo.create = function create(properties) { - return new NatInfo(properties); - }; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); - if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); - if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); - return writer; - }; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.NatInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.NatInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.protocol = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.oldSourceIp = reader.string(); - break; - } - case 5: { - message.newSourceIp = reader.string(); - break; - } - case 6: { - message.oldDestinationIp = reader.string(); - break; - } - case 7: { - message.newDestinationIp = reader.string(); - break; - } - case 8: { - message.oldSourcePort = reader.int32(); - break; - } - case 9: { - message.newSourcePort = reader.int32(); - break; - } - case 10: { - message.oldDestinationPort = reader.int32(); - break; - } - case 11: { - message.newDestinationPort = reader.int32(); - break; - } - case 12: { - message.routerUri = reader.string(); - break; - } - case 13: { - message.natGatewayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NatInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NatInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - if (!$util.isString(message.routerUri)) - return "routerUri: string expected"; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - if (!$util.isString(message.natGatewayName)) - return "natGatewayName: string expected"; - return null; - }; - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.NatInfo} NatInfo - */ - NatInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.NatInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.NatInfo(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INTERNAL_TO_EXTERNAL": - case 1: - message.type = 1; - break; - case "EXTERNAL_TO_INTERNAL": - case 2: - message.type = 2; - break; - case "CLOUD_NAT": - case 3: - message.type = 3; - break; - case "PRIVATE_SERVICE_CONNECT": - case 4: - message.type = 4; - break; - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.routerUri != null) - message.routerUri = String(object.routerUri); - if (object.natGatewayName != null) - message.natGatewayName = String(object.natGatewayName); - return message; - }; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1.NatInfo} message NatInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NatInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.protocol = ""; - object.networkUri = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.routerUri = ""; - object.natGatewayName = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1.NatInfo.Type[message.type] : message.type; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - object.routerUri = message.routerUri; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - object.natGatewayName = message.natGatewayName; - return object; - }; - - /** - * Converts this NatInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @instance - * @returns {Object.} JSON object - */ - NatInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NatInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.NatInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.NatInfo"; - }; - - /** - * Type enum. - * @name google.cloud.networkmanagement.v1.NatInfo.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value - * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value - * @property {number} CLOUD_NAT=3 CLOUD_NAT value - * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value - */ - NatInfo.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; - values[valuesById[3] = "CLOUD_NAT"] = 3; - values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; - return values; - })(); - - return NatInfo; - })(); - - v1.ProxyConnectionInfo = (function() { - - /** - * Properties of a ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IProxyConnectionInfo - * @property {string|null} [protocol] ProxyConnectionInfo protocol - * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp - * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp - * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp - * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp - * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort - * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort - * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort - * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort - * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri - * @property {string|null} [networkUri] ProxyConnectionInfo networkUri - */ - - /** - * Constructs a new ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ProxyConnectionInfo. - * @implements IProxyConnectionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set - */ - function ProxyConnectionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProxyConnectionInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.protocol = ""; - - /** - * ProxyConnectionInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourceIp = ""; - - /** - * ProxyConnectionInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourceIp = ""; - - /** - * ProxyConnectionInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationIp = ""; - - /** - * ProxyConnectionInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationIp = ""; - - /** - * ProxyConnectionInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourcePort = 0; - - /** - * ProxyConnectionInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourcePort = 0; - - /** - * ProxyConnectionInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationPort = 0; - - /** - * ProxyConnectionInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationPort = 0; - - /** - * ProxyConnectionInfo subnetUri. - * @member {string} subnetUri - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.subnetUri = ""; - - /** - * ProxyConnectionInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.networkUri = ""; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo instance - */ - ProxyConnectionInfo.create = function create(properties) { - return new ProxyConnectionInfo(properties); - }; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); - if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); - return writer; - }; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ProxyConnectionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.protocol = reader.string(); - break; - } - case 2: { - message.oldSourceIp = reader.string(); - break; - } - case 3: { - message.newSourceIp = reader.string(); - break; - } - case 4: { - message.oldDestinationIp = reader.string(); - break; - } - case 5: { - message.newDestinationIp = reader.string(); - break; - } - case 6: { - message.oldSourcePort = reader.int32(); - break; - } - case 7: { - message.newSourcePort = reader.int32(); - break; - } - case 8: { - message.oldDestinationPort = reader.int32(); - break; - } - case 9: { - message.newDestinationPort = reader.int32(); - break; - } - case 10: { - message.subnetUri = reader.string(); - break; - } - case 11: { - message.networkUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProxyConnectionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProxyConnectionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - if (!$util.isString(message.subnetUri)) - return "subnetUri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - return null; - }; - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ProxyConnectionInfo} ProxyConnectionInfo - */ - ProxyConnectionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ProxyConnectionInfo(); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.subnetUri != null) - message.subnetUri = String(object.subnetUri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - return message; - }; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1.ProxyConnectionInfo} message ProxyConnectionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProxyConnectionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.protocol = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.subnetUri = ""; - object.networkUri = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - object.subnetUri = message.subnetUri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - return object; - }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @instance - * @returns {Object.} JSON object - */ - ProxyConnectionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ProxyConnectionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ProxyConnectionInfo"; - }; - - return ProxyConnectionInfo; - })(); - - v1.LoadBalancerBackendInfo = (function() { - - /** - * Properties of a LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface ILoadBalancerBackendInfo - * @property {string|null} [name] LoadBalancerBackendInfo name - * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri - * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri - * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri - * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri - * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri - * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget - * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri - * @property {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState - */ - - /** - * Constructs a new LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a LoadBalancerBackendInfo. - * @implements ILoadBalancerBackendInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set - */ - function LoadBalancerBackendInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackendInfo name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.name = ""; - - /** - * LoadBalancerBackendInfo instanceUri. - * @member {string} instanceUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceUri = ""; - - /** - * LoadBalancerBackendInfo backendServiceUri. - * @member {string} backendServiceUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendServiceUri = ""; - - /** - * LoadBalancerBackendInfo instanceGroupUri. - * @member {string} instanceGroupUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; - - /** - * LoadBalancerBackendInfo networkEndpointGroupUri. - * @member {string} networkEndpointGroupUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; - - /** - * LoadBalancerBackendInfo backendBucketUri. - * @member {string} backendBucketUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendBucketUri = ""; - - /** - * LoadBalancerBackendInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * LoadBalancerBackendInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; - - /** - * LoadBalancerBackendInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerBackendInfo healthCheckFirewallsConfigState. - * @member {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance - */ - LoadBalancerBackendInfo.create = function create(properties) { - return new LoadBalancerBackendInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); - if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); - if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); - if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); - if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); - if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.instanceUri = reader.string(); - break; - } - case 3: { - message.backendServiceUri = reader.string(); - break; - } - case 4: { - message.instanceGroupUri = reader.string(); - break; - } - case 5: { - message.networkEndpointGroupUri = reader.string(); - break; - } - case 8: { - message.backendBucketUri = reader.string(); - break; - } - case 9: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 10: { - message.pscGoogleApiTarget = reader.string(); - break; - } - case 6: { - message.healthCheckUri = reader.string(); - break; - } - case 7: { - message.healthCheckFirewallsConfigState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackendInfo.verify = function verify(message) { - if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) - if (!$util.isString(message.instanceUri)) - return "instanceUri: string expected"; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - if (!$util.isString(message.backendServiceUri)) - return "backendServiceUri: string expected"; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - if (!$util.isString(message.instanceGroupUri)) - return "instanceGroupUri: string expected"; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - if (!$util.isString(message.networkEndpointGroupUri)) - return "networkEndpointGroupUri: string expected"; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - if (!$util.isString(message.backendBucketUri)) - return "backendBucketUri: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - switch (message.healthCheckFirewallsConfigState) { - default: - return "healthCheckFirewallsConfigState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - */ - LoadBalancerBackendInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.instanceUri != null) - message.instanceUri = String(object.instanceUri); - if (object.backendServiceUri != null) - message.backendServiceUri = String(object.backendServiceUri); - if (object.instanceGroupUri != null) - message.instanceGroupUri = String(object.instanceGroupUri); - if (object.networkEndpointGroupUri != null) - message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); - if (object.backendBucketUri != null) - message.backendBucketUri = String(object.backendBucketUri); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - switch (object.healthCheckFirewallsConfigState) { - default: - if (typeof object.healthCheckFirewallsConfigState === "number") { - message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; - break; - } - break; - case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallsConfigState = 0; - break; - case "FIREWALLS_CONFIGURED": - case 1: - message.healthCheckFirewallsConfigState = 1; - break; - case "FIREWALLS_PARTIALLY_CONFIGURED": - case 2: - message.healthCheckFirewallsConfigState = 2; - break; - case "FIREWALLS_NOT_CONFIGURED": - case 3: - message.healthCheckFirewallsConfigState = 3; - break; - case "FIREWALLS_UNSUPPORTED": - case 4: - message.healthCheckFirewallsConfigState = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackendInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.instanceUri = ""; - object.backendServiceUri = ""; - object.instanceGroupUri = ""; - object.networkEndpointGroupUri = ""; - object.healthCheckUri = ""; - object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; - object.backendBucketUri = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) - object.instanceUri = message.instanceUri; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - object.backendServiceUri = message.backendServiceUri; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - object.instanceGroupUri = message.instanceGroupUri; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - object.networkEndpointGroupUri = message.networkEndpointGroupUri; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - object.backendBucketUri = message.backendBucketUri; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.LoadBalancerBackendInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.LoadBalancerBackendInfo"; - }; - - /** - * HealthCheckFirewallsConfigState enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value - * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value - * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value - * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value - * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value - */ - LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; - values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; - values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; - values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; - return values; - })(); - - return LoadBalancerBackendInfo; - })(); - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value - * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value - * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value - * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value - * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value - * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value - * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value - * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value - * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value - * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value - */ - v1.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; - values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; - values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; - values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; - values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; - values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; - values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; - values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; - values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; - values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; - return values; - })(); - - v1.StorageBucketInfo = (function() { - - /** - * Properties of a StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IStorageBucketInfo - * @property {string|null} [bucket] StorageBucketInfo bucket - */ - - /** - * Constructs a new StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a StorageBucketInfo. - * @implements IStorageBucketInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set - */ - function StorageBucketInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageBucketInfo bucket. - * @member {string} bucket - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @instance - */ - StorageBucketInfo.prototype.bucket = ""; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo instance - */ - StorageBucketInfo.create = function create(properties) { - return new StorageBucketInfo(properties); - }; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - return writer; - }; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.StorageBucketInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageBucketInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageBucketInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - return null; - }; - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.StorageBucketInfo} StorageBucketInfo - */ - StorageBucketInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.StorageBucketInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.StorageBucketInfo(); - if (object.bucket != null) - message.bucket = String(object.bucket); - return message; - }; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1.StorageBucketInfo} message StorageBucketInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageBucketInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bucket = ""; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - return object; - }; - - /** - * Converts this StorageBucketInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @instance - * @returns {Object.} JSON object - */ - StorageBucketInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageBucketInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.StorageBucketInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.StorageBucketInfo"; - }; - - return StorageBucketInfo; - })(); - - v1.ServerlessNegInfo = (function() { - - /** - * Properties of a ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1 - * @interface IServerlessNegInfo - * @property {string|null} [negUri] ServerlessNegInfo negUri - */ - - /** - * Constructs a new ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ServerlessNegInfo. - * @implements IServerlessNegInfo - * @constructor - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set - */ - function ServerlessNegInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerlessNegInfo negUri. - * @member {string} negUri - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @instance - */ - ServerlessNegInfo.prototype.negUri = ""; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo instance - */ - ServerlessNegInfo.create = function create(properties) { - return new ServerlessNegInfo(properties); - }; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); - return writer; - }; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ServerlessNegInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.negUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerlessNegInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerlessNegInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.negUri != null && message.hasOwnProperty("negUri")) - if (!$util.isString(message.negUri)) - return "negUri: string expected"; - return null; - }; - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ServerlessNegInfo} ServerlessNegInfo - */ - ServerlessNegInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ServerlessNegInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ServerlessNegInfo(); - if (object.negUri != null) - message.negUri = String(object.negUri); - return message; - }; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1.ServerlessNegInfo} message ServerlessNegInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerlessNegInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.negUri = ""; - if (message.negUri != null && message.hasOwnProperty("negUri")) - object.negUri = message.negUri; - return object; - }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @instance - * @returns {Object.} JSON object - */ - ServerlessNegInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerlessNegInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ServerlessNegInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ServerlessNegInfo"; - }; - - return ServerlessNegInfo; - })(); - - v1.ReachabilityService = (function() { - - /** - * Constructs a new ReachabilityService service. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ReachabilityService - * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; - - /** - * Creates new ReachabilityService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. - */ - ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|listConnectivityTests}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef ListConnectivityTestsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse - */ - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { - return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse, request, callback); - }, "name", { value: "ListConnectivityTests" }); - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|getConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef GetConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} [response] ConnectivityTest - */ - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { - return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1.ConnectivityTest, request, callback); - }, "name", { value: "GetConnectivityTest" }); - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|createConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef CreateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { - return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConnectivityTest" }); - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|updateConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef UpdateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { - return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateConnectivityTest" }); - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|rerunConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef RerunConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { - return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RerunConnectivityTest" }); - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1.ReachabilityService|deleteConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @typedef DeleteConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { - return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConnectivityTest" }); - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ReachabilityService; - })(); - - v1.ListConnectivityTestsRequest = (function() { - - /** - * Properties of a ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IListConnectivityTestsRequest - * @property {string|null} [parent] ListConnectivityTestsRequest parent - * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize - * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken - * @property {string|null} [filter] ListConnectivityTestsRequest filter - * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy - */ - - /** - * Constructs a new ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ListConnectivityTestsRequest. - * @implements IListConnectivityTestsRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set - */ - function ListConnectivityTestsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListConnectivityTestsRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.parent = ""; - - /** - * ListConnectivityTestsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageSize = 0; - - /** - * ListConnectivityTestsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageToken = ""; - - /** - * ListConnectivityTestsRequest filter. - * @member {string} filter - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.filter = ""; - - /** - * ListConnectivityTestsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance - */ - ListConnectivityTestsRequest.create = function create(properties) { - return new ListConnectivityTestsRequest(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - */ - ListConnectivityTestsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsRequest"; - }; - - return ListConnectivityTestsRequest; - })(); - - v1.ListConnectivityTestsResponse = (function() { - - /** - * Properties of a ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1 - * @interface IListConnectivityTestsResponse - * @property {Array.|null} [resources] ListConnectivityTestsResponse resources - * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable - */ - - /** - * Constructs a new ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a ListConnectivityTestsResponse. - * @implements IListConnectivityTestsResponse - * @constructor - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set - */ - function ListConnectivityTestsResponse(properties) { - this.resources = []; - 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]]; - } - - /** - * ListConnectivityTestsResponse resources. - * @member {Array.} resources - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; - - /** - * ListConnectivityTestsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.nextPageToken = ""; - - /** - * ListConnectivityTestsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance - */ - ListConnectivityTestsResponse.create = function create(properties) { - return new ListConnectivityTestsResponse(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.networkmanagement.v1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resources[i]); - if (error) - return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - */ - ListConnectivityTestsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse) - return object; - var message = new $root.google.cloud.networkmanagement.v1.ListConnectivityTestsResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.networkmanagement.v1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.ListConnectivityTestsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.ListConnectivityTestsResponse"; - }; - - return ListConnectivityTestsResponse; - })(); - - v1.GetConnectivityTestRequest = (function() { - - /** - * Properties of a GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IGetConnectivityTestRequest - * @property {string|null} [name] GetConnectivityTestRequest name - */ - - /** - * Constructs a new GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a GetConnectivityTestRequest. - * @implements IGetConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set - */ - function GetConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @instance - */ - GetConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest instance - */ - GetConnectivityTestRequest.create = function create(properties) { - return new GetConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encode = function encode(message, writer) { - 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.GetConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); - 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetConnectivityTestRequest.verify = function verify(message) { - if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} GetConnectivityTestRequest - */ - GetConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.GetConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.GetConnectivityTestRequest} message GetConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - GetConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.GetConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.GetConnectivityTestRequest"; - }; - - return GetConnectivityTestRequest; - })(); - - v1.CreateConnectivityTestRequest = (function() { - - /** - * Properties of a CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface ICreateConnectivityTestRequest - * @property {string|null} [parent] CreateConnectivityTestRequest parent - * @property {string|null} [testId] CreateConnectivityTestRequest testId - * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource - */ - - /** - * Constructs a new CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a CreateConnectivityTestRequest. - * @implements ICreateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set - */ - function CreateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateConnectivityTestRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.parent = ""; - - /** - * CreateConnectivityTestRequest testId. - * @member {string} testId - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.testId = ""; - - /** - * CreateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance - */ - CreateConnectivityTestRequest.create = function create(properties) { - return new CreateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.testId = reader.string(); - break; - } - case 3: { - message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) - if (!$util.isString(message.testId)) - return "testId: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - */ - CreateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.testId != null) - message.testId = String(object.testId); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.CreateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.testId = ""; - object.resource = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.testId != null && message.hasOwnProperty("testId")) - object.testId = message.testId; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.CreateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.CreateConnectivityTestRequest"; - }; - - return CreateConnectivityTestRequest; - })(); - - v1.UpdateConnectivityTestRequest = (function() { - - /** - * Properties of an UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IUpdateConnectivityTestRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask - * @property {google.cloud.networkmanagement.v1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource - */ - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an UpdateConnectivityTestRequest. - * @implements IUpdateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set - */ - function UpdateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateConnectivityTestRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.updateMask = null; - - /** - * UpdateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance - */ - UpdateConnectivityTestRequest.create = function create(properties) { - return new UpdateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); - 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.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - */ - UpdateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.resource = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest"; - }; - - return UpdateConnectivityTestRequest; - })(); - - v1.DeleteConnectivityTestRequest = (function() { - - /** - * Properties of a DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IDeleteConnectivityTestRequest - * @property {string|null} [name] DeleteConnectivityTestRequest name - */ - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a DeleteConnectivityTestRequest. - * @implements IDeleteConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set - */ - function DeleteConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @instance - */ - DeleteConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance - */ - DeleteConnectivityTestRequest.create = function create(properties) { - return new DeleteConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encode = function encode(message, writer) { - 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); - 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConnectivityTestRequest.verify = function verify(message) { - if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - */ - DeleteConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest"; - }; - - return DeleteConnectivityTestRequest; - })(); - - v1.RerunConnectivityTestRequest = (function() { - - /** - * Properties of a RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @interface IRerunConnectivityTestRequest - * @property {string|null} [name] RerunConnectivityTestRequest name - */ - - /** - * Constructs a new RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents a RerunConnectivityTestRequest. - * @implements IRerunConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set - */ - function RerunConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RerunConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @instance - */ - RerunConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance - */ - RerunConnectivityTestRequest.create = function create(properties) { - return new RerunConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encode = function encode(message, writer) { - 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); - 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RerunConnectivityTestRequest.verify = function verify(message) { - if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - */ - RerunConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1.RerunConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1.RerunConnectivityTestRequest"; - }; - - return RerunConnectivityTestRequest; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.networkmanagement.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} [statusDetail] OperationMetadata statusDetail - * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.networkmanagement.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusDetail = ""; - - /** - * OperationMetadata cancelRequested. - * @member {boolean} cancelRequested - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.cancelRequested = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); - if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusDetail = reader.string(); - break; - } - case 6: { - message.cancelRequested = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - 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.networkmanagement.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - if (typeof message.cancelRequested !== "boolean") - return "cancelRequested: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: 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.networkmanagement.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.networkmanagement.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networkmanagement.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.networkmanagement.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.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.cancelRequested != null) - message.cancelRequested = Boolean(object.cancelRequested); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusDetail = ""; - object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - object.cancelRequested = message.cancelRequested; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.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.networkmanagement.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.networkmanagement.v1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - return v1; - })(); - - return networkmanagement; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - 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; - })(); - - 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.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; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - 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; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - 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"]); - } - 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.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.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.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - google.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-networkmanagement/v1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json deleted file mode 100644 index e9c42233e71..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/protos/protos.json +++ /dev/null @@ -1,4280 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "networkmanagement": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.NetworkManagement.V1", - "go_package": "cloud.google.com/go/networkmanagement/apiv1/networkmanagementpb;networkmanagementpb", - "java_multiple_files": true, - "java_outer_classname": "ReachabilityServiceProto", - "java_package": "com.google.cloud.networkmanagement.v1", - "php_namespace": "Google\\Cloud\\NetworkManagement\\V1", - "ruby_package": "Google::Cloud::NetworkManagement::V1" - }, - "nested": { - "ConnectivityTest": { - "options": { - "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", - "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "source": { - "type": "Endpoint", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destination": { - "type": "Endpoint", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "protocol": { - "type": "string", - "id": 5 - }, - "relatedProjects": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reachabilityDetails": { - "type": "ReachabilityDetails", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "probingDetails": { - "type": "ProbingDetails", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bypassFirewallChecks": { - "type": "bool", - "id": 17 - } - } - }, - "Endpoint": { - "oneofs": { - "_forwardingRuleTarget": { - "oneof": [ - "forwardingRuleTarget" - ] - }, - "_loadBalancerId": { - "oneof": [ - "loadBalancerId" - ] - }, - "_loadBalancerType": { - "oneof": [ - "loadBalancerType" - ] - } - }, - "fields": { - "ipAddress": { - "type": "string", - "id": 1 - }, - "port": { - "type": "int32", - "id": 2 - }, - "instance": { - "type": "string", - "id": 3 - }, - "forwardingRule": { - "type": "string", - "id": 13 - }, - "forwardingRuleTarget": { - "type": "ForwardingRuleTarget", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "gkeMasterCluster": { - "type": "string", - "id": 7 - }, - "fqdn": { - "type": "string", - "id": 19 - }, - "cloudSqlInstance": { - "type": "string", - "id": 8 - }, - "redisInstance": { - "type": "string", - "id": 17 - }, - "redisCluster": { - "type": "string", - "id": 18 - }, - "cloudFunction": { - "type": "CloudFunctionEndpoint", - "id": 10 - }, - "appEngineVersion": { - "type": "AppEngineVersionEndpoint", - "id": 11 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionEndpoint", - "id": 12 - }, - "network": { - "type": "string", - "id": 4 - }, - "networkType": { - "type": "NetworkType", - "id": 5 - }, - "projectId": { - "type": "string", - "id": 6 - } - }, - "nested": { - "NetworkType": { - "values": { - "NETWORK_TYPE_UNSPECIFIED": 0, - "GCP_NETWORK": 1, - "NON_GCP_NETWORK": 2 - } - }, - "ForwardingRuleTarget": { - "values": { - "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "LOAD_BALANCER": 2, - "VPN_GATEWAY": 3, - "PSC": 4 - } - }, - "CloudFunctionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "AppEngineVersionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "CloudRunRevisionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - } - } - }, - "ReachabilityDetails": { - "fields": { - "result": { - "type": "Result", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "traces": { - "rule": "repeated", - "type": "Trace", - "id": 5 - } - }, - "nested": { - "Result": { - "values": { - "RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "AMBIGUOUS": 4, - "UNDETERMINED": 5 - } - } - } - }, - "LatencyPercentile": { - "fields": { - "percent": { - "type": "int32", - "id": 1 - }, - "latencyMicros": { - "type": "int64", - "id": 2 - } - } - }, - "LatencyDistribution": { - "fields": { - "latencyPercentiles": { - "rule": "repeated", - "type": "LatencyPercentile", - "id": 1 - } - } - }, - "ProbingDetails": { - "fields": { - "result": { - "type": "ProbingResult", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "abortCause": { - "type": "ProbingAbortCause", - "id": 4 - }, - "sentProbeCount": { - "type": "int32", - "id": 5 - }, - "successfulProbeCount": { - "type": "int32", - "id": 6 - }, - "endpointInfo": { - "type": "EndpointInfo", - "id": 7 - }, - "probingLatency": { - "type": "LatencyDistribution", - "id": 8 - }, - "destinationEgressLocation": { - "type": "EdgeLocation", - "id": 9 - } - }, - "nested": { - "ProbingResult": { - "values": { - "PROBING_RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "REACHABILITY_INCONSISTENT": 3, - "UNDETERMINED": 4 - } - }, - "ProbingAbortCause": { - "values": { - "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, - "PERMISSION_DENIED": 1, - "NO_SOURCE_LOCATION": 2 - } - }, - "EdgeLocation": { - "fields": { - "metropolitanArea": { - "type": "string", - "id": 1 - } - } - } - } - }, - "Trace": { - "fields": { - "endpointInfo": { - "type": "EndpointInfo", - "id": 1 - }, - "steps": { - "rule": "repeated", - "type": "Step", - "id": 2 - }, - "forwardTraceId": { - "type": "int32", - "id": 4 - } - } - }, - "Step": { - "oneofs": { - "stepInfo": { - "oneof": [ - "instance", - "firewall", - "route", - "endpoint", - "googleService", - "forwardingRule", - "vpnGateway", - "vpnTunnel", - "vpcConnector", - "deliver", - "forward", - "abort", - "drop", - "loadBalancer", - "network", - "gkeMaster", - "cloudSqlInstance", - "redisInstance", - "redisCluster", - "cloudFunction", - "appEngineVersion", - "cloudRunRevision", - "nat", - "proxyConnection", - "loadBalancerBackendInfo", - "storageBucket", - "serverlessNeg" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - }, - "causesDrop": { - "type": "bool", - "id": 3 - }, - "projectId": { - "type": "string", - "id": 4 - }, - "instance": { - "type": "InstanceInfo", - "id": 5 - }, - "firewall": { - "type": "FirewallInfo", - "id": 6 - }, - "route": { - "type": "RouteInfo", - "id": 7 - }, - "endpoint": { - "type": "EndpointInfo", - "id": 8 - }, - "googleService": { - "type": "GoogleServiceInfo", - "id": 24 - }, - "forwardingRule": { - "type": "ForwardingRuleInfo", - "id": 9 - }, - "vpnGateway": { - "type": "VpnGatewayInfo", - "id": 10 - }, - "vpnTunnel": { - "type": "VpnTunnelInfo", - "id": 11 - }, - "vpcConnector": { - "type": "VpcConnectorInfo", - "id": 21 - }, - "deliver": { - "type": "DeliverInfo", - "id": 12 - }, - "forward": { - "type": "ForwardInfo", - "id": 13 - }, - "abort": { - "type": "AbortInfo", - "id": 14 - }, - "drop": { - "type": "DropInfo", - "id": 15 - }, - "loadBalancer": { - "type": "LoadBalancerInfo", - "id": 16, - "options": { - "deprecated": true - } - }, - "network": { - "type": "NetworkInfo", - "id": 17 - }, - "gkeMaster": { - "type": "GKEMasterInfo", - "id": 18 - }, - "cloudSqlInstance": { - "type": "CloudSQLInstanceInfo", - "id": 19 - }, - "redisInstance": { - "type": "RedisInstanceInfo", - "id": 30 - }, - "redisCluster": { - "type": "RedisClusterInfo", - "id": 31 - }, - "cloudFunction": { - "type": "CloudFunctionInfo", - "id": 20 - }, - "appEngineVersion": { - "type": "AppEngineVersionInfo", - "id": 22 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionInfo", - "id": 23 - }, - "nat": { - "type": "NatInfo", - "id": 25 - }, - "proxyConnection": { - "type": "ProxyConnectionInfo", - "id": 26 - }, - "loadBalancerBackendInfo": { - "type": "LoadBalancerBackendInfo", - "id": 27 - }, - "storageBucket": { - "type": "StorageBucketInfo", - "id": 28 - }, - "serverlessNeg": { - "type": "ServerlessNegInfo", - "id": 29 - } - }, - "nested": { - "State": { - "valuesOptions": { - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { - "deprecated": true - }, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { - "deprecated": true - } - }, - "values": { - "STATE_UNSPECIFIED": 0, - "START_FROM_INSTANCE": 1, - "START_FROM_INTERNET": 2, - "START_FROM_GOOGLE_SERVICE": 27, - "START_FROM_PRIVATE_NETWORK": 3, - "START_FROM_GKE_MASTER": 21, - "START_FROM_CLOUD_SQL_INSTANCE": 22, - "START_FROM_REDIS_INSTANCE": 32, - "START_FROM_REDIS_CLUSTER": 33, - "START_FROM_CLOUD_FUNCTION": 23, - "START_FROM_APP_ENGINE_VERSION": 25, - "START_FROM_CLOUD_RUN_REVISION": 26, - "START_FROM_STORAGE_BUCKET": 29, - "START_FROM_PSC_PUBLISHED_SERVICE": 30, - "START_FROM_SERVERLESS_NEG": 31, - "APPLY_INGRESS_FIREWALL_RULE": 4, - "APPLY_EGRESS_FIREWALL_RULE": 5, - "APPLY_ROUTE": 6, - "APPLY_FORWARDING_RULE": 7, - "ANALYZE_LOAD_BALANCER_BACKEND": 28, - "SPOOFING_APPROVED": 8, - "ARRIVE_AT_INSTANCE": 9, - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, - "ARRIVE_AT_VPN_GATEWAY": 12, - "ARRIVE_AT_VPN_TUNNEL": 13, - "ARRIVE_AT_VPC_CONNECTOR": 24, - "NAT": 14, - "PROXY_CONNECTION": 15, - "DELIVER": 16, - "DROP": 17, - "FORWARD": 18, - "ABORT": 19, - "VIEWER_PERMISSION_MISSING": 20 - } - } - } - }, - "InstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "interface": { - "type": "string", - "id": 3 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "networkTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "serviceAccount": { - "type": "string", - "id": 8, - "options": { - "deprecated": true - } - }, - "pscNetworkAttachmentUri": { - "type": "string", - "id": 9 - } - } - }, - "NetworkInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedSubnetUri": { - "type": "string", - "id": 5 - }, - "matchedIpRange": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "FirewallInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "direction": { - "type": "string", - "id": 3 - }, - "action": { - "type": "string", - "id": 4 - }, - "priority": { - "type": "int32", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 6 - }, - "targetTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "targetServiceAccounts": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "policy": { - "type": "string", - "id": 9 - }, - "policyUri": { - "type": "string", - "id": 11 - }, - "firewallRuleType": { - "type": "FirewallRuleType", - "id": 10 - } - }, - "nested": { - "FirewallRuleType": { - "values": { - "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, - "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, - "VPC_FIREWALL_RULE": 2, - "IMPLIED_VPC_FIREWALL_RULE": 3, - "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, - "NETWORK_FIREWALL_POLICY_RULE": 5, - "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, - "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, - "TRACKING_STATE": 101 - } - } - } - }, - "RouteInfo": { - "oneofs": { - "_nccHubUri": { - "oneof": [ - "nccHubUri" - ] - }, - "_nccSpokeUri": { - "oneof": [ - "nccSpokeUri" - ] - }, - "_advertisedRouteSourceRouterUri": { - "oneof": [ - "advertisedRouteSourceRouterUri" - ] - }, - "_advertisedRouteNextHopUri": { - "oneof": [ - "advertisedRouteNextHopUri" - ] - } - }, - "fields": { - "routeType": { - "type": "RouteType", - "id": 8 - }, - "nextHopType": { - "type": "NextHopType", - "id": 9 - }, - "routeScope": { - "type": "RouteScope", - "id": 14 - }, - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "region": { - "type": "string", - "id": 19 - }, - "destIpRange": { - "type": "string", - "id": 3 - }, - "nextHop": { - "type": "string", - "id": 4 - }, - "networkUri": { - "type": "string", - "id": 5 - }, - "priority": { - "type": "int32", - "id": 6 - }, - "instanceTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "srcIpRange": { - "type": "string", - "id": 10 - }, - "destPortRanges": { - "rule": "repeated", - "type": "string", - "id": 11 - }, - "srcPortRanges": { - "rule": "repeated", - "type": "string", - "id": 12 - }, - "protocols": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "nccHubUri": { - "type": "string", - "id": 15, - "options": { - "proto3_optional": true - } - }, - "nccSpokeUri": { - "type": "string", - "id": 16, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteSourceRouterUri": { - "type": "string", - "id": 17, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteNextHopUri": { - "type": "string", - "id": 18, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "RouteType": { - "values": { - "ROUTE_TYPE_UNSPECIFIED": 0, - "SUBNET": 1, - "STATIC": 2, - "DYNAMIC": 3, - "PEERING_SUBNET": 4, - "PEERING_STATIC": 5, - "PEERING_DYNAMIC": 6, - "POLICY_BASED": 7, - "ADVERTISED": 101 - } - }, - "NextHopType": { - "values": { - "NEXT_HOP_TYPE_UNSPECIFIED": 0, - "NEXT_HOP_IP": 1, - "NEXT_HOP_INSTANCE": 2, - "NEXT_HOP_NETWORK": 3, - "NEXT_HOP_PEERING": 4, - "NEXT_HOP_INTERCONNECT": 5, - "NEXT_HOP_VPN_TUNNEL": 6, - "NEXT_HOP_VPN_GATEWAY": 7, - "NEXT_HOP_INTERNET_GATEWAY": 8, - "NEXT_HOP_BLACKHOLE": 9, - "NEXT_HOP_ILB": 10, - "NEXT_HOP_ROUTER_APPLIANCE": 11, - "NEXT_HOP_NCC_HUB": 12 - } - }, - "RouteScope": { - "values": { - "ROUTE_SCOPE_UNSPECIFIED": 0, - "NETWORK": 1, - "NCC_HUB": 2 - } - } - } - }, - "GoogleServiceInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "googleServiceType": { - "type": "GoogleServiceType", - "id": 2 - } - }, - "nested": { - "GoogleServiceType": { - "values": { - "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, - "IAP": 1, - "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, - "CLOUD_DNS": 3, - "GOOGLE_API": 4, - "GOOGLE_API_PSC": 5, - "GOOGLE_API_VPC_SC": 6 - } - } - } - }, - "ForwardingRuleInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedProtocol": { - "type": "string", - "id": 3 - }, - "matchedPortRange": { - "type": "string", - "id": 6 - }, - "vip": { - "type": "string", - "id": 4 - }, - "target": { - "type": "string", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "loadBalancerName": { - "type": "string", - "id": 9 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 10 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerInfo": { - "fields": { - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 1 - }, - "healthCheckUri": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "backends": { - "rule": "repeated", - "type": "LoadBalancerBackend", - "id": 3 - }, - "backendType": { - "type": "BackendType", - "id": 4 - }, - "backendUri": { - "type": "string", - "id": 5 - } - }, - "nested": { - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "INTERNAL_TCP_UDP": 1, - "NETWORK_TCP_UDP": 2, - "HTTP_PROXY": 3, - "TCP_PROXY": 4, - "SSL_PROXY": 5 - } - }, - "BackendType": { - "values": { - "BACKEND_TYPE_UNSPECIFIED": 0, - "BACKEND_SERVICE": 1, - "TARGET_POOL": 2, - "TARGET_INSTANCE": 3 - } - } - } - }, - "LoadBalancerBackend": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "healthCheckFirewallState": { - "type": "HealthCheckFirewallState", - "id": 3 - }, - "healthCheckAllowingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "healthCheckBlockingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "HealthCheckFirewallState": { - "values": { - "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, - "CONFIGURED": 1, - "MISCONFIGURED": 2 - } - } - } - }, - "VpnGatewayInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "ipAddress": { - "type": "string", - "id": 4 - }, - "vpnTunnelUri": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "VpnTunnelInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "sourceGateway": { - "type": "string", - "id": 3 - }, - "remoteGateway": { - "type": "string", - "id": 4 - }, - "remoteGatewayIp": { - "type": "string", - "id": 5 - }, - "sourceGatewayIp": { - "type": "string", - "id": 6 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "routingType": { - "type": "RoutingType", - "id": 9 - } - }, - "nested": { - "RoutingType": { - "values": { - "ROUTING_TYPE_UNSPECIFIED": 0, - "ROUTE_BASED": 1, - "POLICY_BASED": 2, - "DYNAMIC": 3 - } - } - } - }, - "EndpointInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "destinationIp": { - "type": "string", - "id": 2 - }, - "protocol": { - "type": "string", - "id": 3 - }, - "sourcePort": { - "type": "int32", - "id": 4 - }, - "destinationPort": { - "type": "int32", - "id": 5 - }, - "sourceNetworkUri": { - "type": "string", - "id": 6 - }, - "destinationNetworkUri": { - "type": "string", - "id": 7 - }, - "sourceAgentUri": { - "type": "string", - "id": 8 - } - } - }, - "DeliverInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "storageBucket": { - "type": "string", - "id": 4 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Target": { - "values": { - "TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "INTERNET": 2, - "GOOGLE_API": 3, - "GKE_MASTER": 4, - "CLOUD_SQL_INSTANCE": 5, - "PSC_PUBLISHED_SERVICE": 6, - "PSC_GOOGLE_API": 7, - "PSC_VPC_SC": 8, - "SERVERLESS_NEG": 9, - "STORAGE_BUCKET": 10, - "PRIVATE_NETWORK": 11, - "CLOUD_FUNCTION": 12, - "APP_ENGINE_VERSION": 13, - "CLOUD_RUN_REVISION": 14, - "GOOGLE_MANAGED_SERVICE": 15, - "REDIS_INSTANCE": 16, - "REDIS_CLUSTER": 17 - } - } - } - }, - "ForwardInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - } - }, - "nested": { - "Target": { - "valuesOptions": { - "GKE_MASTER": { - "deprecated": true - }, - "CLOUD_SQL_INSTANCE": { - "deprecated": true - } - }, - "values": { - "TARGET_UNSPECIFIED": 0, - "PEERING_VPC": 1, - "VPN_GATEWAY": 2, - "INTERCONNECT": 3, - "GKE_MASTER": 4, - "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, - "CLOUD_SQL_INSTANCE": 6, - "ANOTHER_PROJECT": 7, - "NCC_HUB": 8, - "ROUTER_APPLIANCE": 9 - } - } - } - }, - "AbortInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "projectsMissingPermission": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Cause": { - "valuesOptions": { - "UNKNOWN_NETWORK": { - "deprecated": true - }, - "UNKNOWN_PROJECT": { - "deprecated": true - }, - "NO_EXTERNAL_IP": { - "deprecated": true - }, - "UNINTENDED_DESTINATION": { - "deprecated": true - }, - "SOURCE_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_SOURCE_NETWORK": { - "deprecated": true - }, - "DESTINATION_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_DESTINATION_NETWORK": { - "deprecated": true - } - }, - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_NETWORK": 1, - "UNKNOWN_PROJECT": 3, - "NO_EXTERNAL_IP": 7, - "UNINTENDED_DESTINATION": 8, - "SOURCE_ENDPOINT_NOT_FOUND": 11, - "MISMATCHED_SOURCE_NETWORK": 12, - "DESTINATION_ENDPOINT_NOT_FOUND": 13, - "MISMATCHED_DESTINATION_NETWORK": 14, - "UNKNOWN_IP": 2, - "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, - "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, - "PERMISSION_DENIED": 4, - "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, - "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, - "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, - "NO_SOURCE_LOCATION": 5, - "INVALID_ARGUMENT": 6, - "TRACE_TOO_LONG": 9, - "INTERNAL_ERROR": 10, - "UNSUPPORTED": 15, - "MISMATCHED_IP_VERSION": 16, - "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, - "RESOURCE_CONFIG_NOT_FOUND": 18, - "VM_INSTANCE_CONFIG_NOT_FOUND": 24, - "NETWORK_CONFIG_NOT_FOUND": 25, - "FIREWALL_CONFIG_NOT_FOUND": 26, - "ROUTE_CONFIG_NOT_FOUND": 27, - "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, - "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, - "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, - "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, - "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, - "NON_ROUTABLE_IP_ADDRESS": 22, - "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, - "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 - } - } - } - }, - "DropInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "sourceIp": { - "type": "string", - "id": 3 - }, - "destinationIp": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Cause": { - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_EXTERNAL_ADDRESS": 1, - "FOREIGN_IP_DISALLOWED": 2, - "FIREWALL_RULE": 3, - "NO_ROUTE": 4, - "ROUTE_BLACKHOLE": 5, - "ROUTE_WRONG_NETWORK": 6, - "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, - "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, - "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, - "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, - "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, - "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, - "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, - "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, - "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, - "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, - "PRIVATE_TRAFFIC_TO_INTERNET": 7, - "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, - "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, - "NO_EXTERNAL_ADDRESS": 9, - "UNKNOWN_INTERNAL_ADDRESS": 10, - "FORWARDING_RULE_MISMATCH": 11, - "FORWARDING_RULE_NO_INSTANCES": 12, - "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, - "INSTANCE_NOT_RUNNING": 14, - "GKE_CLUSTER_NOT_RUNNING": 27, - "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, - "REDIS_INSTANCE_NOT_RUNNING": 68, - "REDIS_CLUSTER_NOT_RUNNING": 69, - "TRAFFIC_TYPE_BLOCKED": 15, - "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, - "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, - "DROPPED_INSIDE_GKE_SERVICE": 18, - "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, - "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, - "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, - "GKE_PSC_ENDPOINT_MISSING": 36, - "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, - "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, - "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, - "GKE_CONTROL_PLANE_NO_ROUTE": 32, - "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, - "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, - "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, - "CLOUD_SQL_CONNECTOR_REQUIRED": 63, - "CLOUD_FUNCTION_NOT_ACTIVE": 22, - "VPC_CONNECTOR_NOT_SET": 23, - "VPC_CONNECTOR_NOT_RUNNING": 24, - "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, - "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, - "FORWARDING_RULE_REGION_MISMATCH": 25, - "PSC_CONNECTION_NOT_ACCEPTED": 26, - "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, - "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, - "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, - "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, - "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, - "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, - "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, - "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, - "CLOUD_RUN_REVISION_NOT_READY": 29, - "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, - "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, - "CLOUD_NAT_NO_ADDRESSES": 40, - "ROUTING_LOOP": 59, - "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, - "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, - "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, - "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, - "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, - "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, - "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, - "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, - "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, - "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, - "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, - "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, - "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, - "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, - "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, - "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, - "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, - "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 - } - } - } - }, - "GKEMasterInfo": { - "fields": { - "clusterUri": { - "type": "string", - "id": 2 - }, - "clusterNetworkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "dnsEndpoint": { - "type": "string", - "id": 7 - } - } - }, - "CloudSQLInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "region": { - "type": "string", - "id": 7 - } - } - }, - "RedisInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "primaryEndpointIp": { - "type": "string", - "id": 4 - }, - "readEndpointIp": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "RedisClusterInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "discoveryEndpointIpAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "secondaryEndpointIpAddress": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "location": { - "type": "string", - "id": 6 - } - } - }, - "CloudFunctionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - }, - "versionId": { - "type": "int64", - "id": 4 - } - } - }, - "CloudRunRevisionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 4 - }, - "serviceUri": { - "type": "string", - "id": 5 - } - } - }, - "AppEngineVersionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "runtime": { - "type": "string", - "id": 3 - }, - "environment": { - "type": "string", - "id": 4 - } - } - }, - "VpcConnectorInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - } - } - }, - "NatInfo": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "protocol": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "oldSourceIp": { - "type": "string", - "id": 4 - }, - "newSourceIp": { - "type": "string", - "id": 5 - }, - "oldDestinationIp": { - "type": "string", - "id": 6 - }, - "newDestinationIp": { - "type": "string", - "id": 7 - }, - "oldSourcePort": { - "type": "int32", - "id": 8 - }, - "newSourcePort": { - "type": "int32", - "id": 9 - }, - "oldDestinationPort": { - "type": "int32", - "id": 10 - }, - "newDestinationPort": { - "type": "int32", - "id": 11 - }, - "routerUri": { - "type": "string", - "id": 12 - }, - "natGatewayName": { - "type": "string", - "id": 13 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "INTERNAL_TO_EXTERNAL": 1, - "EXTERNAL_TO_INTERNAL": 2, - "CLOUD_NAT": 3, - "PRIVATE_SERVICE_CONNECT": 4 - } - } - } - }, - "ProxyConnectionInfo": { - "fields": { - "protocol": { - "type": "string", - "id": 1 - }, - "oldSourceIp": { - "type": "string", - "id": 2 - }, - "newSourceIp": { - "type": "string", - "id": 3 - }, - "oldDestinationIp": { - "type": "string", - "id": 4 - }, - "newDestinationIp": { - "type": "string", - "id": 5 - }, - "oldSourcePort": { - "type": "int32", - "id": 6 - }, - "newSourcePort": { - "type": "int32", - "id": 7 - }, - "oldDestinationPort": { - "type": "int32", - "id": 8 - }, - "newDestinationPort": { - "type": "int32", - "id": 9 - }, - "subnetUri": { - "type": "string", - "id": 10 - }, - "networkUri": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerBackendInfo": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "instanceUri": { - "type": "string", - "id": 2 - }, - "backendServiceUri": { - "type": "string", - "id": 3 - }, - "instanceGroupUri": { - "type": "string", - "id": 4 - }, - "networkEndpointGroupUri": { - "type": "string", - "id": 5 - }, - "backendBucketUri": { - "type": "string", - "id": 8 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 9 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 10 - }, - "healthCheckUri": { - "type": "string", - "id": 6 - }, - "healthCheckFirewallsConfigState": { - "type": "HealthCheckFirewallsConfigState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "HealthCheckFirewallsConfigState": { - "values": { - "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, - "FIREWALLS_CONFIGURED": 1, - "FIREWALLS_PARTIALLY_CONFIGURED": 2, - "FIREWALLS_NOT_CONFIGURED": 3, - "FIREWALLS_UNSUPPORTED": 4 - } - } - } - }, - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "HTTPS_ADVANCED_LOAD_BALANCER": 1, - "HTTPS_LOAD_BALANCER": 2, - "REGIONAL_HTTPS_LOAD_BALANCER": 3, - "INTERNAL_HTTPS_LOAD_BALANCER": 4, - "SSL_PROXY_LOAD_BALANCER": 5, - "TCP_PROXY_LOAD_BALANCER": 6, - "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, - "NETWORK_LOAD_BALANCER": 8, - "LEGACY_NETWORK_LOAD_BALANCER": 9, - "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 - } - }, - "StorageBucketInfo": { - "fields": { - "bucket": { - "type": "string", - "id": 1 - } - } - }, - "ServerlessNegInfo": { - "fields": { - "negUri": { - "type": "string", - "id": 1 - } - } - }, - "ReachabilityService": { - "options": { - "(google.api.default_host)": "networkmanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListConnectivityTests": { - "requestType": "ListConnectivityTestsRequest", - "responseType": "ListConnectivityTestsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/global}/connectivityTests", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/global}/connectivityTests" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetConnectivityTest": { - "requestType": "GetConnectivityTestRequest", - "responseType": "ConnectivityTest", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/global/connectivityTests/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/global/connectivityTests/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateConnectivityTest": { - "requestType": "CreateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/global}/connectivityTests", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "parent,test_id,resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/global}/connectivityTests", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "parent,test_id,resource" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateConnectivityTest": { - "requestType": "UpdateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "update_mask,resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "update_mask,resource" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RerunConnectivityTest": { - "requestType": "RerunConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteConnectivityTest": { - "requestType": "DeleteConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/global/connectivityTests/*}", - "(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/global/connectivityTests/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "ListConnectivityTestsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListConnectivityTestsResponse": { - "fields": { - "resources": { - "rule": "repeated", - "type": "ConnectivityTest", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "CreateConnectivityTestRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "testId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateConnectivityTestRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "RerunConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "target": { - "type": "string", - "id": 3 - }, - "verb": { - "type": "string", - "id": 4 - }, - "statusDetail": { - "type": "string", - "id": 5 - }, - "cancelRequested": { - "type": "bool", - "id": 6 - }, - "apiVersion": { - "type": "string", - "id": 7 - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - } - } - }, - "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 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "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-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js deleted file mode 100644 index cbd3d9c9f0e..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.create_connectivity_test.js +++ /dev/null @@ -1,79 +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, testId, resource) { - // [START networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - */ - // const testId = 'abc123' - /** - * Required. A `ConnectivityTest` resource - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callCreateConnectivityTest() { - // Construct request - const request = { - parent, - testId, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.createConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js deleted file mode 100644 index 7cd83e08556..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.delete_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callDeleteConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.deleteConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.js deleted file mode 100644 index 36f308151bf..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.get_connectivity_test.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 networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callGetConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await networkmanagementClient.getConnectivityTest(request); - console.log(response); - } - - callGetConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.js deleted file mode 100644 index 11366d5248a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.list_connectivity_tests.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(parent) { - // [START networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Number of `ConnectivityTests` to return. - */ - // const pageSize = 1234 - /** - * Page token from an earlier query, as returned in `next_page_token`. - */ - // const pageToken = 'abc123' - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callListConnectivityTests() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = networkmanagementClient.listConnectivityTestsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListConnectivityTests(); - // [END networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js deleted file mode 100644 index e279d602dd1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.rerun_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callRerunConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.rerunConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRerunConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js deleted file mode 100644 index 808714b00bb..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/reachability_service.update_connectivity_test.js +++ /dev/null @@ -1,68 +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, resource) { - // [START networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. Only fields specified in update_mask are updated. - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callUpdateConnectivityTest() { - // Construct request - const request = { - updateMask, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.updateConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateConnectivityTest(); - // [END networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json b/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json deleted file mode 100644 index 9c56c9e9913..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/samples/generated/v1/snippet_metadata_google.cloud.networkmanagement.v1.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-networkmanagement", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.networkmanagement.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async", - "title": "ReachabilityService listConnectivityTests Sample", - "origin": "API_DEFINITION", - "description": " Lists all Connectivity Tests owned by a project.", - "canonical": true, - "file": "reachability_service.list_connectivity_tests.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", - "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.networkmanagement.v1.ListConnectivityTestsResponse", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.ListConnectivityTests", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async", - "title": "ReachabilityService getConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific Connectivity Test.", - "canonical": true, - "file": "reachability_service.get_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.networkmanagement.v1.ConnectivityTest", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.GetConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async", - "title": "ReachabilityService createConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", - "canonical": true, - "file": "reachability_service.create_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "test_id", - "type": "TYPE_STRING" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.CreateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async", - "title": "ReachabilityService updateConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", - "canonical": true, - "file": "reachability_service.update_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.UpdateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async", - "title": "ReachabilityService rerunConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", - "canonical": true, - "file": "reachability_service.rerun_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.RerunConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async", - "title": "ReachabilityService deleteConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific `ConnectivityTest`.", - "canonical": true, - "file": "reachability_service.delete_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityServiceClient" - }, - "method": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService.DeleteConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1.ReachabilityService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/index.ts deleted file mode 100644 index 88c81931ccf..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 ReachabilityServiceClient = v1.ReachabilityServiceClient; -type ReachabilityServiceClient = v1.ReachabilityServiceClient; -export {v1, ReachabilityServiceClient}; -export default {v1, ReachabilityServiceClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json deleted file mode 100644 index 0a5d92ed4df..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.networkmanagement.v1", - "libraryPackage": "@google-cloud/network-management", - "services": { - "ReachabilityService": { - "clients": { - "grpc": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/index.ts deleted file mode 100644 index 5d88a6370d7..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from './reachability_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts deleted file mode 100644 index f7fc6ca3bf5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client.ts +++ /dev/null @@ -1,1595 +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/reachability_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './reachability_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The Reachability service in the Google Cloud Network Management API provides - * services that analyze the reachability within a single Google Virtual Private - * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - * networks, or between VPC networks and internet hosts. A reachability analysis - * is based on Google Cloud network configurations. - * - * You can use the analysis results to verify these configurations and - * to troubleshoot connectivity issues. - * @class - * @memberof v1 - */ -export class ReachabilityServiceClient { - 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; - reachabilityServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ReachabilityServiceClient. - * - * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; - 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 = 'networkmanagement.' + 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 = { - connectivityTestPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/global/connectivityTests/{test}' - ), - 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 = { - listConnectivityTests: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') - }; - - 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/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/global}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; - const createConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - const updateConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; - const updateConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - const rerunConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.ConnectivityTest') as gax.protobuf.Type; - const rerunConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - const deleteConnectivityTestResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), - createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), - updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), - updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), - rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), - rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), - deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), - deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.networkmanagement.v1.ReachabilityService', 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.reachabilityServiceStub) { - return this.reachabilityServiceStub; - } - - // Put together the "service stub" for - // google.cloud.networkmanagement.v1.ReachabilityService. - this.reachabilityServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1.ReachabilityService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.networkmanagement.v1.ReachabilityService, - 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 reachabilityServiceStubMethods = - ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; - for (const methodName of reachabilityServiceStubMethods) { - const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; - } - - /** - * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. - * 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/reachability_service.get_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_GetConnectivityTest_async - */ - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|undefined, {}|undefined - ]>; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - callback: Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); - } - -/** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param {string} request.testId - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource - * Required. A `ConnectivityTest` 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 - * 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/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async - */ - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.ICreateConnectivityTestRequest, - 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.createConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createConnectivityTest()`. - * @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/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_CreateConnectivityTest_async - */ - async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for more details. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.networkmanagement.v1.ConnectivityTest} request.resource - * Required. Only fields specified in update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IUpdateConnectivityTestRequest, - 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({ - 'resource.name': request.resource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateConnectivityTest()`. - * @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/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async - */ - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IRerunConnectivityTestRequest, - 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.rerunConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `rerunConnectivityTest()`. - * @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/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_RerunConnectivityTest_async - */ - async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific `ConnectivityTest`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1.IDeleteConnectivityTestRequest, - 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.deleteConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteConnectivityTest()`. - * @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/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all Connectivity Tests owned by a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. - * 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse - ]>; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>): void; - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>, - callback?: PaginationCallback< - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1.IConnectivityTest>): - Promise<[ - protos.google.cloud.networkmanagement.v1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1.IListConnectivityTestsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTestsStream( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.createStream( - this.innerApiCalls.listConnectivityTests as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listConnectivityTests`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1.ConnectivityTest|ConnectivityTest}. 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/reachability_service.list_connectivity_tests.js - * region_tag:networkmanagement_v1_generated_ReachabilityService_ListConnectivityTests_async - */ - listConnectivityTestsAsync( - request?: protos.google.cloud.networkmanagement.v1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.asyncIterate( - this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. - * - * @param {string} project - * @param {string} test - * @returns {string} Resource name string. - */ - connectivityTestPath(project:string,test:string) { - return this.pathTemplates.connectivityTestPathTemplate.render({ - project: project, - test: test, - }); - } - - /** - * Parse the project from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; - } - - /** - * Parse the test from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the test. - */ - matchTestFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; - } - - /** - * 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.reachabilityServiceStub && !this._terminated) { - return this.reachabilityServiceStub.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-networkmanagement/v1/src/v1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json deleted file mode 100644 index 6fcdab96cf2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_client_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1.ReachabilityService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListConnectivityTests": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RerunConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json deleted file mode 100644 index d84c76feae1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/src/v1/reachability_service_proto_list.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "../../protos/google/cloud/networkmanagement/v1/connectivity_test.proto", - "../../protos/google/cloud/networkmanagement/v1/reachability.proto", - "../../protos/google/cloud/networkmanagement/v1/trace.proto" -] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index ef3e3b070ae..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 networkmanagement = require('@google-cloud/network-management'); - -function main() { - const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index d3182081b86..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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 {ReachabilityServiceClient} from '@google-cloud/network-management'; - -// check that the client class type name can be used -function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const reachabilityServiceClient = new ReachabilityServiceClient(); - doStuffWithReachabilityServiceClient(reachabilityServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/test/gapic_reachability_service_v1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts deleted file mode 100644 index 35e3ba63eb8..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1/test/gapic_reachability_service_v1.ts +++ /dev/null @@ -1,2018 +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 reachabilityserviceModule 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.ReachabilityServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); - 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 = reachabilityserviceModule.v1.ReachabilityServiceClient.servicePath; - assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = reachabilityserviceModule.v1.ReachabilityServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = reachabilityserviceModule.v1.ReachabilityServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - await client.initialize(); - assert(client.reachabilityServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.reachabilityServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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('getConnectivityTest', () => { - it('invokes getConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); - const [response] = await client.getConnectivityTest(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConnectivityTest( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with closed client', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConnectivityTest(request), expectedError); - }); - }); - - describe('createConnectivityTest', () => { - it('invokes createConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createConnectivityTest( - 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.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateConnectivityTest', () => { - it('invokes updateConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateConnectivityTest( - 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.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('rerunConnectivityTest', () => { - it('invokes rerunConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.rerunConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rerunConnectivityTest( - 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.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.rerunConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.rerunConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRerunConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRerunConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteConnectivityTest', () => { - it('invokes deleteConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteConnectivityTest( - 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.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listConnectivityTests', () => { - it('invokes listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectivityTests(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests without error using callback', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listConnectivityTests( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1.IConnectivityTest[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listConnectivityTests(request), expectedError); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTestsStream without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { - 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.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listConnectivityTestsStream with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1.ConnectivityTest) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; - const iterable = client.listConnectivityTestsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectivityTestsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.networkmanagement.v1.IConnectivityTest[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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('connectivityTest', () => { - const fakePath = "/rendered/path/connectivityTest"; - const expectedParameters = { - project: "projectValue", - test: "testValue", - }; - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectivityTestPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectivityTestPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectivityTestPath', () => { - const result = client.connectivityTestPath("projectValue", "testValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectivityTestName', () => { - const result = client.matchProjectFromConnectivityTestName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTestFromConnectivityTestName', () => { - const result = client.matchTestFromConnectivityTestName(fakePath); - assert.strictEqual(result, "testValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new reachabilityserviceModule.v1.ReachabilityServiceClient({ - 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-networkmanagement/v1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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-networkmanagement/v1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1/webpack.config.js deleted file mode 100644 index d975be0ab73..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/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: 'ReachabilityService', - filename: './reachability-service.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.jsdoc.js deleted file mode 100644 index 22d92e8132c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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/network-management', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/.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-networkmanagement/v1beta1/README.md b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md deleted file mode 100644 index 90c3778ad46..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/README.md +++ /dev/null @@ -1 +0,0 @@ -Networkmanagement: Nodejs Client diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json deleted file mode 100644 index d6594c83107..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@google-cloud/network-management", - "version": "0.1.0", - "description": "Networkmanagement client for Node.js", - "repository": "googleapis/nodejs-networkmanagement", - "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 networkmanagement", - "networkmanagement", - "reachability service", - "vpc flow logs service" - ], - "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-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto deleted file mode 100644 index a001077d66c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto +++ /dev/null @@ -1,422 +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.networkmanagement.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1beta1/trace.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TestOuterClass"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// A Connectivity Test for a network reachability analysis. -message ConnectivityTest { - option (google.api.resource) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - pattern: "projects/{project}/locations/global/connectivityTests/{test}" - }; - - // Identifier. Unique name of the resource using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // The user-supplied description of the Connectivity Test. - // Maximum of 512 characters. - string description = 2; - - // Required. Source specification of the Connectivity Test. - // - // You can use a combination of source IP address, virtual machine - // (VM) instance, or Compute Engine network to uniquely identify - // the source location. - // - // Examples: - // If the source IP address is an internal IP address within a Google Cloud - // Virtual Private Cloud (VPC) network, then you must also specify the VPC - // network. Otherwise, specify the VM instance, which already contains its - // internal IP address and VPC network information. - // - // If the source of the test is within an on-premises network, then you must - // provide the destination VPC network. - // - // If the source endpoint is a Compute Engine VM instance with multiple - // network interfaces, the instance itself is not sufficient to identify the - // endpoint. So, you must also specify the source IP address or VPC network. - // - // A reachability analysis proceeds even if the source location is - // ambiguous. However, the test result may include endpoints that you don't - // intend to test. - Endpoint source = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. Destination specification of the Connectivity Test. - // - // You can use a combination of destination IP address, Compute Engine - // VM instance, or VPC network to uniquely identify the destination - // location. - // - // Even if the destination IP address is not unique, the source IP - // location is unique. Usually, the analysis can infer the destination - // endpoint from route information. - // - // If the destination you specify is a VM instance and the instance has - // multiple network interfaces, then you must also specify either - // a destination IP address or VPC network to identify the destination - // interface. - // - // A reachability analysis proceeds even if the destination location is - // ambiguous. However, the result can include endpoints that you don't - // intend to test. - Endpoint destination = 4 [(google.api.field_behavior) = REQUIRED]; - - // IP Protocol of the test. When not provided, "TCP" is assumed. - string protocol = 5; - - // Other projects that may be relevant for reachability analysis. - // This is applicable to scenarios where a test can cross project boundaries. - repeated string related_projects = 6; - - // Output only. The display name of a Connectivity Test. - string display_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Resource labels to represent user-provided metadata. - map labels = 8; - - // Output only. The time the test was created. - google.protobuf.Timestamp create_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the test's configuration was updated. - google.protobuf.Timestamp update_time = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The reachability details of this test from the latest run. - // The details are updated when creating a new test, updating an - // existing test, or triggering a one-time rerun of an existing test. - ReachabilityDetails reachability_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The probing details of this test from the latest run, present - // for applicable tests only. The details are updated when creating a new - // test, updating an existing test, or triggering a one-time rerun of an - // existing test. - ProbingDetails probing_details = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Whether the test should skip firewall checking. - // If not provided, we assume false. - bool bypass_firewall_checks = 17; -} - -// Source or destination of the Connectivity Test. -message Endpoint { - // The type definition of an endpoint's network. Use one of the - // following choices: - enum NetworkType { - // Default type if unspecified. - NETWORK_TYPE_UNSPECIFIED = 0; - - // A network hosted within Google Cloud. - // To receive more detailed output, specify the URI for the source or - // destination network. - GCP_NETWORK = 1; - - // A network hosted outside of Google Cloud. - // This can be an on-premises network, or a network hosted by another cloud - // provider. - NON_GCP_NETWORK = 2; - } - - // Type of the target of a forwarding rule. - enum ForwardingRuleTarget { - // Forwarding rule target is unknown. - FORWARDING_RULE_TARGET_UNSPECIFIED = 0; - - // Compute Engine instance for protocol forwarding. - INSTANCE = 1; - - // Load Balancer. The specific type can be found from [load_balancer_type] - // [google.cloud.networkmanagement.v1beta1.Endpoint.load_balancer_type]. - LOAD_BALANCER = 2; - - // Classic Cloud VPN Gateway. - VPN_GATEWAY = 3; - - // Forwarding Rule is a Private Service Connect endpoint. - PSC = 4; - } - - // Wrapper for Cloud Function attributes. - message CloudFunctionEndpoint { - // A [Cloud Function](https://cloud.google.com/functions) name. - string uri = 1; - } - - // Wrapper for the App Engine service version attributes. - message AppEngineVersionEndpoint { - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) - // name. - string uri = 1; - } - - // Wrapper for Cloud Run revision attributes. - message CloudRunRevisionEndpoint { - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - // URI. The format is: - // projects/{project}/locations/{location}/revisions/{revision} - string uri = 1; - } - - // The IP address of the endpoint, which can be an external or internal IP. - string ip_address = 1; - - // The IP protocol port of the endpoint. - // Only applicable when protocol is TCP or UDP. - int32 port = 2; - - // A Compute Engine instance URI. - string instance = 3; - - // A forwarding rule and its corresponding IP address represent the frontend - // configuration of a Google Cloud load balancer. Forwarding rules are also - // used for protocol forwarding, Private Service Connect and other network - // services to provide forwarding information in the control plane. Format: - // projects/{project}/global/forwardingRules/{id} or - // projects/{project}/regions/{region}/forwardingRules/{id} - string forwarding_rule = 13; - - // Output only. Specifies the type of the target of the forwarding rule. - optional ForwardingRuleTarget forwarding_rule_target = 14 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. ID of the load balancer the forwarding rule points to. Empty - // for forwarding rules not related to load balancers. - optional string load_balancer_id = 15 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Type of the load balancer the forwarding rule points to. - optional LoadBalancerType load_balancer_type = 16 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // A cluster URI for [Google Kubernetes Engine cluster control - // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - string gke_master_cluster = 7; - - // DNS endpoint of [Google Kubernetes Engine cluster control - // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). - // Requires gke_master_cluster to be set, can't be used simultaneoulsly with - // ip_address or network. Applicable only to destination endpoint. - string fqdn = 19; - - // A [Cloud SQL](https://cloud.google.com/sql) instance URI. - string cloud_sql_instance = 8; - - // A [Redis Instance](https://cloud.google.com/memorystore/docs/redis) - // URI. - string redis_instance = 17; - - // A [Redis Cluster](https://cloud.google.com/memorystore/docs/cluster) - // URI. - string redis_cluster = 18; - - // A [Cloud Function](https://cloud.google.com/functions). - CloudFunctionEndpoint cloud_function = 10; - - // An [App Engine](https://cloud.google.com/appengine) [service - // version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions). - AppEngineVersionEndpoint app_engine_version = 11; - - // A [Cloud Run](https://cloud.google.com/run) - // [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) - CloudRunRevisionEndpoint cloud_run_revision = 12; - - // A Compute Engine network URI. - string network = 4; - - // Type of the network where the endpoint is located. - // Applicable only to source endpoint, as destination network type can be - // inferred from the source. - NetworkType network_type = 5; - - // Project ID where the endpoint is located. - // The Project ID can be derived from the URI if you provide a VM instance or - // network URI. - // The following are two cases where you must provide the project ID: - // 1. Only the IP address is specified, and the IP address is within a Google - // Cloud project. - // 2. When you are using Shared VPC and the IP address that you provide is - // from the service project. In this case, the network that the IP address - // resides in is defined in the host project. - string project_id = 6; -} - -// Results of the configuration analysis from the last run of the test. -message ReachabilityDetails { - // The overall result of the test's configuration analysis. - enum Result { - // No result was specified. - RESULT_UNSPECIFIED = 0; - - // Possible scenarios are: - // - // * The configuration analysis determined that a packet originating from - // the source is expected to reach the destination. - // * The analysis didn't complete because the user lacks permission for - // some of the resources in the trace. However, at the time the user's - // permission became insufficient, the trace had been successful so far. - REACHABLE = 1; - - // A packet originating from the source is expected to be dropped before - // reaching the destination. - UNREACHABLE = 2; - - // The source and destination endpoints do not uniquely identify - // the test location in the network, and the reachability result contains - // multiple traces. For some traces, a packet could be delivered, and for - // others, it would not be. This result is also assigned to - // configuration analysis of return path if on its own it should be - // REACHABLE, but configuration analysis of forward path is AMBIGUOUS. - AMBIGUOUS = 4; - - // The configuration analysis did not complete. Possible reasons are: - // - // * A permissions error occurred--for example, the user might not have - // read permission for all of the resources named in the test. - // * An internal error occurred. - // * The analyzer received an invalid or unsupported argument or was unable - // to identify a known endpoint. - UNDETERMINED = 5; - } - - // The overall result of the test's configuration analysis. - Result result = 1; - - // The time of the configuration analysis. - google.protobuf.Timestamp verify_time = 2; - - // The details of a failure or a cancellation of reachability analysis. - google.rpc.Status error = 3; - - // Result may contain a list of traces if a test has multiple possible - // paths in the network, such as when destination endpoint is a load balancer - // with multiple backends. - repeated Trace traces = 5; -} - -// Latency percentile rank and value. -message LatencyPercentile { - // Percentage of samples this data point applies to. - int32 percent = 1; - - // percent-th percentile of latency observed, in microseconds. - // Fraction of percent/100 of samples have latency lower or - // equal to the value of this field. - int64 latency_micros = 2; -} - -// Describes measured latency distribution. -message LatencyDistribution { - // Representative latency percentiles. - repeated LatencyPercentile latency_percentiles = 1; -} - -// Results of active probing from the last run of the test. -message ProbingDetails { - // Overall probing result of the test. - enum ProbingResult { - // No result was specified. - PROBING_RESULT_UNSPECIFIED = 0; - - // At least 95% of packets reached the destination. - REACHABLE = 1; - - // No packets reached the destination. - UNREACHABLE = 2; - - // Less than 95% of packets reached the destination. - REACHABILITY_INCONSISTENT = 3; - - // Reachability could not be determined. Possible reasons are: - // * The user lacks permission to access some of the network resources - // required to run the test. - // * No valid source endpoint could be derived from the request. - // * An internal error occurred. - UNDETERMINED = 4; - } - - // Abort cause types. - enum ProbingAbortCause { - // No reason was specified. - PROBING_ABORT_CAUSE_UNSPECIFIED = 0; - - // The user lacks permission to access some of the - // network resources required to run the test. - PERMISSION_DENIED = 1; - - // No valid source endpoint could be derived from the request. - NO_SOURCE_LOCATION = 2; - } - - // Representation of a network edge location as per - // https://cloud.google.com/vpc/docs/edge-locations. - message EdgeLocation { - // Name of the metropolitan area. - string metropolitan_area = 1; - } - - // The overall result of active probing. - ProbingResult result = 1; - - // The time that reachability was assessed through active probing. - google.protobuf.Timestamp verify_time = 2; - - // Details about an internal failure or the cancellation of active probing. - google.rpc.Status error = 3; - - // The reason probing was aborted. - ProbingAbortCause abort_cause = 4; - - // Number of probes sent. - int32 sent_probe_count = 5; - - // Number of probes that reached the destination. - int32 successful_probe_count = 6; - - // The source and destination endpoints derived from the test input and used - // for active probing. - EndpointInfo endpoint_info = 7; - - // Latency as measured by active probing in one direction: - // from the source to the destination endpoint. - LatencyDistribution probing_latency = 8; - - // The EdgeLocation from which a packet destined for/originating from the - // internet will egress/ingress the Google network. - // This will only be populated for a connectivity test which has an internet - // destination/source address. - // The absence of this field *must not* be used as an indication that the - // destination/source is part of the Google network. - EdgeLocation destination_egress_location = 9; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto deleted file mode 100644 index d888696545b..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/reachability.proto +++ /dev/null @@ -1,304 +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.networkmanagement.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1beta1/connectivity_test.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "ReachabilityServiceProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// The Reachability service in Google Cloud Network Management API - -// The Reachability service in the Google Cloud Network Management API provides -// services that analyze the reachability within a single Google Virtual Private -// Cloud (VPC) network, between peered VPC networks, between VPC and on-premises -// networks, or between VPC networks and internet hosts. A reachability analysis -// is based on Google Cloud network configurations. -// -// You can use the analysis results to verify these configurations and -// to troubleshoot connectivity issues. -service ReachabilityService { - option (google.api.default_host) = "networkmanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all Connectivity Tests owned by a project. - rpc ListConnectivityTests(ListConnectivityTestsRequest) - returns (ListConnectivityTestsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - }; - } - - // Gets the details of a specific Connectivity Test. - rpc GetConnectivityTest(GetConnectivityTestRequest) - returns (ConnectivityTest) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - }; - } - - // Creates a new Connectivity Test. - // After you create a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, containing non-existent resources in the network, or you - // don't have read permissions to the network configurations of listed - // projects), then the reachability result returns a value of `UNKNOWN`. - // - // If the endpoint specifications in `ConnectivityTest` are - // incomplete, the reachability result returns a value of - // AMBIGUOUS. For more information, - // see the Connectivity Test documentation. - rpc CreateConnectivityTest(CreateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - body: "resource" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Updates the configuration of an existing `ConnectivityTest`. - // After you update a test, the reachability analysis is performed as part - // of the long running operation, which completes when the analysis completes. - // The Reachability state in the test resource is updated with the new result. - // - // If the endpoint specifications in `ConnectivityTest` are invalid - // (for example, they contain non-existent resources in the network, or the - // user does not have read permissions to the network configurations of - // listed projects), then the reachability result returns a value of - // UNKNOWN. - // - // If the endpoint specifications in `ConnectivityTest` are incomplete, the - // reachability result returns a value of `AMBIGUOUS`. See the documentation - // in `ConnectivityTest` for more details. - rpc UpdateConnectivityTest(UpdateConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}" - body: "resource" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Rerun an existing `ConnectivityTest`. - // After the user triggers the rerun, the reachability analysis is performed - // as part of the long running operation, which completes when the analysis - // completes. - // - // Even though the test configuration remains the same, the reachability - // result may change due to underlying network configuration changes. - // - // If the endpoint specifications in `ConnectivityTest` become invalid (for - // example, specified resources are deleted in the network, or you lost - // read permissions to the network configurations of listed projects), then - // the reachability result returns a value of `UNKNOWN`. - rpc RerunConnectivityTest(RerunConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.networkmanagement.v1beta1.ConnectivityTest" - metadata_type: "OperationMetadata" - }; - } - - // Deletes a specific `ConnectivityTest`. - rpc DeleteConnectivityTest(DeleteConnectivityTestRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - }; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } -} - -// Request for the `ListConnectivityTests` method. -message ListConnectivityTestsRequest { - // Required. The parent resource of the Connectivity Tests: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Number of `ConnectivityTests` to return. - int32 page_size = 2; - - // Page token from an earlier query, as returned in `next_page_token`. - string page_token = 3; - - // Lists the `ConnectivityTests` that match the filter expression. A filter - // expression filters the resources listed in the response. The expression - // must be of the form ` ` where operators: `<`, `>`, - // `<=`, - // `>=`, - // `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - // roughly synonymous with equality). can refer to a proto or JSON - // field, or a synthetic field. Field names can be camelCase or snake_case. - // - // Examples: - // - Filter by name: - // name = "projects/proj-1/locations/global/connectivityTests/test-1 - // - // - Filter by labels: - // - Resources that have a key called `foo` - // labels.foo:* - // - Resources that have a key called `foo` whose value is `bar` - // labels.foo = bar - string filter = 4; - - // Field to use to sort the list. - string order_by = 5; -} - -// Response for the `ListConnectivityTests` method. -message ListConnectivityTestsResponse { - // List of Connectivity Tests. - repeated ConnectivityTest resources = 1; - - // Page token to fetch the next set of Connectivity Tests. - string next_page_token = 2; - - // Locations that could not be reached (when querying all locations with `-`). - repeated string unreachable = 3; -} - -// Request for the `GetConnectivityTest` method. -message GetConnectivityTestRequest { - // Required. `ConnectivityTest` resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `CreateConnectivityTest` method. -message CreateConnectivityTestRequest { - // Required. The parent resource of the Connectivity Test to create: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The logical name of the Connectivity Test in your project - // with the following restrictions: - // - // * Must contain only lowercase letters, numbers, and hyphens. - // * Must start with a letter. - // * Must be between 1-40 characters. - // * Must end with a number or a letter. - // * Must be unique within the customer project - string test_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A `ConnectivityTest` resource - ConnectivityTest resource = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `UpdateConnectivityTest` method. -message UpdateConnectivityTestRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - ConnectivityTest resource = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `DeleteConnectivityTest` method. -message DeleteConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Request for the `RerunConnectivityTest` method. -message RerunConnectivityTestRequest { - // Required. Connectivity Test resource name using the form: - // `projects/{project_id}/locations/global/connectivityTests/{test_id}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/ConnectivityTest" - } - ]; -} - -// Metadata describing an [Operation][google.longrunning.Operation] -message OperationMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1; - - // The time the operation finished running. - google.protobuf.Timestamp end_time = 2; - - // Target of the operation - for example - // projects/project-1/locations/global/connectivityTests/test-1 - string target = 3; - - // Name of the verb executed by the operation. - string verb = 4; - - // Human-readable status of the operation, if any. - string status_detail = 5; - - // Specifies if cancellation was requested for the operation. - bool cancel_requested = 6; - - // API version. - string api_version = 7; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto deleted file mode 100644 index b8169361686..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/trace.proto +++ /dev/null @@ -1,1876 +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.networkmanagement.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/field_info.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "TraceProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// Trace represents one simulated packet forwarding path. -// -// * Each trace contains multiple ordered steps. -// * Each step is in a particular state with associated configuration. -// * State is categorized as final or non-final states. -// * Each final state has a reason associated. -// * Each trace must end with a final state (the last step). -// ``` -// |---------------------Trace----------------------| -// Step1(State) Step2(State) --- StepN(State(final)) -// ``` -message Trace { - // Derived from the source and destination endpoints definition specified by - // user request, and validated by the data plane model. - // If there are multiple traces starting from different source locations, then - // the endpoint_info may be different between traces. - EndpointInfo endpoint_info = 1; - - // A trace of a test contains multiple steps from the initial state to the - // final state (delivered, dropped, forwarded, or aborted). - // - // The steps are ordered by the processing sequence within the simulated - // network state machine. It is critical to preserve the order of the steps - // and avoid reordering or sorting them. - repeated Step steps = 2; - - // ID of trace. For forward traces, this ID is unique for each trace. For - // return traces, it matches ID of associated forward trace. A single forward - // trace can be associated with none, one or more than one return trace. - int32 forward_trace_id = 4; -} - -// A simulated forwarding path is composed of multiple steps. -// Each step has a well-defined state and an associated configuration. -message Step { - // Type of states that are defined in the network state machine. - // Each step in the packet trace is in a specific state. - enum State { - // Unspecified state. - STATE_UNSPECIFIED = 0; - - // Initial state: packet originating from a Compute Engine instance. - // An InstanceInfo is populated with starting instance information. - START_FROM_INSTANCE = 1; - - // Initial state: packet originating from the internet. - // The endpoint information is populated. - START_FROM_INTERNET = 2; - - // Initial state: packet originating from a Google service. - // The google_service information is populated. - START_FROM_GOOGLE_SERVICE = 27; - - // Initial state: packet originating from a VPC or on-premises network - // with internal source IP. - // If the source is a VPC network visible to the user, a NetworkInfo - // is populated with details of the network. - START_FROM_PRIVATE_NETWORK = 3; - - // Initial state: packet originating from a Google Kubernetes Engine cluster - // master. A GKEMasterInfo is populated with starting instance information. - START_FROM_GKE_MASTER = 21; - - // Initial state: packet originating from a Cloud SQL instance. - // A CloudSQLInstanceInfo is populated with starting instance information. - START_FROM_CLOUD_SQL_INSTANCE = 22; - - // Initial state: packet originating from a Redis instance. - // A RedisInstanceInfo is populated with starting instance information. - START_FROM_REDIS_INSTANCE = 32; - - // Initial state: packet originating from a Redis Cluster. - // A RedisClusterInfo is populated with starting Cluster information. - START_FROM_REDIS_CLUSTER = 33; - - // Initial state: packet originating from a Cloud Function. - // A CloudFunctionInfo is populated with starting function information. - START_FROM_CLOUD_FUNCTION = 23; - - // Initial state: packet originating from an App Engine service version. - // An AppEngineVersionInfo is populated with starting version information. - START_FROM_APP_ENGINE_VERSION = 25; - - // Initial state: packet originating from a Cloud Run revision. - // A CloudRunRevisionInfo is populated with starting revision information. - START_FROM_CLOUD_RUN_REVISION = 26; - - // Initial state: packet originating from a Storage Bucket. Used only for - // return traces. - // The storage_bucket information is populated. - START_FROM_STORAGE_BUCKET = 29; - - // Initial state: packet originating from a published service that uses - // Private Service Connect. Used only for return traces. - START_FROM_PSC_PUBLISHED_SERVICE = 30; - - // Initial state: packet originating from a serverless network endpoint - // group backend. Used only for return traces. - // The serverless_neg information is populated. - START_FROM_SERVERLESS_NEG = 31; - - // Config checking state: verify ingress firewall rule. - APPLY_INGRESS_FIREWALL_RULE = 4; - - // Config checking state: verify egress firewall rule. - APPLY_EGRESS_FIREWALL_RULE = 5; - - // Config checking state: verify route. - APPLY_ROUTE = 6; - - // Config checking state: match forwarding rule. - APPLY_FORWARDING_RULE = 7; - - // Config checking state: verify load balancer backend configuration. - ANALYZE_LOAD_BALANCER_BACKEND = 28; - - // Config checking state: packet sent or received under foreign IP - // address and allowed. - SPOOFING_APPROVED = 8; - - // Forwarding state: arriving at a Compute Engine instance. - ARRIVE_AT_INSTANCE = 9; - - // Forwarding state: arriving at a Compute Engine internal load balancer. - // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not - // used in new tests. - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10 [deprecated = true]; - - // Forwarding state: arriving at a Compute Engine external load balancer. - // Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not - // used in new tests. - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11 [deprecated = true]; - - // Forwarding state: arriving at a Cloud VPN gateway. - ARRIVE_AT_VPN_GATEWAY = 12; - - // Forwarding state: arriving at a Cloud VPN tunnel. - ARRIVE_AT_VPN_TUNNEL = 13; - - // Forwarding state: arriving at a VPC connector. - ARRIVE_AT_VPC_CONNECTOR = 24; - - // Transition state: packet header translated. - NAT = 14; - - // Transition state: original connection is terminated and a new proxied - // connection is initiated. - PROXY_CONNECTION = 15; - - // Final state: packet could be delivered. - DELIVER = 16; - - // Final state: packet could be dropped. - DROP = 17; - - // Final state: packet could be forwarded to a network with an unknown - // configuration. - FORWARD = 18; - - // Final state: analysis is aborted. - ABORT = 19; - - // Special state: viewer of the test result does not have permission to - // see the configuration in this step. - VIEWER_PERMISSION_MISSING = 20; - } - - // A description of the step. Usually this is a summary of the state. - string description = 1; - - // Each step is in one of the pre-defined states. - State state = 2; - - // This is a step that leads to the final state Drop. - bool causes_drop = 3; - - // Project ID that contains the configuration this step is validating. - string project_id = 4; - - // Configuration or metadata associated with each step. - // The configuration is filtered based on viewer's permission. If a viewer - // has no permission to view the configuration in this step, for non-final - // states a special state is populated (VIEWER_PERMISSION_MISSING), and for - // final state the configuration is cleared. - oneof step_info { - // Display information of a Compute Engine instance. - InstanceInfo instance = 5; - - // Display information of a Compute Engine firewall rule. - FirewallInfo firewall = 6; - - // Display information of a Compute Engine route. - RouteInfo route = 7; - - // Display information of the source and destination under analysis. - // The endpoint information in an intermediate state may differ with the - // initial input, as it might be modified by state like NAT, - // or Connection Proxy. - EndpointInfo endpoint = 8; - - // Display information of a Google service - GoogleServiceInfo google_service = 24; - - // Display information of a Compute Engine forwarding rule. - ForwardingRuleInfo forwarding_rule = 9; - - // Display information of a Compute Engine VPN gateway. - VpnGatewayInfo vpn_gateway = 10; - - // Display information of a Compute Engine VPN tunnel. - VpnTunnelInfo vpn_tunnel = 11; - - // Display information of a VPC connector. - VpcConnectorInfo vpc_connector = 21; - - // Display information of the final state "deliver" and reason. - DeliverInfo deliver = 12; - - // Display information of the final state "forward" and reason. - ForwardInfo forward = 13; - - // Display information of the final state "abort" and reason. - AbortInfo abort = 14; - - // Display information of the final state "drop" and reason. - DropInfo drop = 15; - - // Display information of the load balancers. Deprecated in favor of the - // `load_balancer_backend_info` field, not used in new tests. - LoadBalancerInfo load_balancer = 16 [deprecated = true]; - - // Display information of a Google Cloud network. - NetworkInfo network = 17; - - // Display information of a Google Kubernetes Engine cluster master. - GKEMasterInfo gke_master = 18; - - // Display information of a Cloud SQL instance. - CloudSQLInstanceInfo cloud_sql_instance = 19; - - // Display information of a Redis Instance. - RedisInstanceInfo redis_instance = 30; - - // Display information of a Redis Cluster. - RedisClusterInfo redis_cluster = 31; - - // Display information of a Cloud Function. - CloudFunctionInfo cloud_function = 20; - - // Display information of an App Engine service version. - AppEngineVersionInfo app_engine_version = 22; - - // Display information of a Cloud Run revision. - CloudRunRevisionInfo cloud_run_revision = 23; - - // Display information of a NAT. - NatInfo nat = 25; - - // Display information of a ProxyConnection. - ProxyConnectionInfo proxy_connection = 26; - - // Display information of a specific load balancer backend. - LoadBalancerBackendInfo load_balancer_backend_info = 27; - - // Display information of a Storage Bucket. Used only for return traces. - StorageBucketInfo storage_bucket = 28; - - // Display information of a Serverless network endpoint group backend. Used - // only for return traces. - ServerlessNegInfo serverless_neg = 29; - } -} - -// For display only. Metadata associated with a Compute Engine instance. -message InstanceInfo { - // Name of a Compute Engine instance. - string display_name = 1; - - // URI of a Compute Engine instance. - string uri = 2; - - // Name of the network interface of a Compute Engine instance. - string interface = 3; - - // URI of a Compute Engine network. - string network_uri = 4; - - // Internal IP address of the network interface. - string internal_ip = 5; - - // External IP address of the network interface. - string external_ip = 6; - - // Network tags configured on the instance. - repeated string network_tags = 7; - - // Service account authorized for the instance. - string service_account = 8 [deprecated = true]; - - // URI of the PSC network attachment the NIC is attached to (if relevant). - string psc_network_attachment_uri = 9; -} - -// For display only. Metadata associated with a Compute Engine network. -// Next ID: 7 -message NetworkInfo { - // Name of a Compute Engine network. - string display_name = 1; - - // URI of a Compute Engine network. - string uri = 2; - - // URI of the subnet matching the source IP address of the test. - string matched_subnet_uri = 5; - - // The IP range of the subnet matching the source IP address of the test. - string matched_ip_range = 4; - - // The region of the subnet matching the source IP address of the test. - string region = 6; -} - -// For display only. Metadata associated with a VPC firewall rule, an implied -// VPC firewall rule, or a firewall policy rule. -message FirewallInfo { - // The firewall rule's type. - enum FirewallRuleType { - // Unspecified type. - FIREWALL_RULE_TYPE_UNSPECIFIED = 0; - - // Hierarchical firewall policy rule. For details, see - // [Hierarchical firewall policies - // overview](https://cloud.google.com/vpc/docs/firewall-policies). - HIERARCHICAL_FIREWALL_POLICY_RULE = 1; - - // VPC firewall rule. For details, see - // [VPC firewall rules - // overview](https://cloud.google.com/vpc/docs/firewalls). - VPC_FIREWALL_RULE = 2; - - // Implied VPC firewall rule. For details, see - // [Implied - // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules). - IMPLIED_VPC_FIREWALL_RULE = 3; - - // Implicit firewall rules that are managed by serverless VPC access to - // allow ingress access. They are not visible in the Google Cloud console. - // For details, see [VPC connector's implicit - // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access). - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4; - - // Global network firewall policy rule. - // For details, see [Network firewall - // policies](https://cloud.google.com/vpc/docs/network-firewall-policies). - NETWORK_FIREWALL_POLICY_RULE = 5; - - // Regional network firewall policy rule. - // For details, see [Regional network firewall - // policies](https://cloud.google.com/firewall/docs/regional-firewall-policies). - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6; - - // Firewall policy rule containing attributes not yet supported in - // Connectivity tests. Firewall analysis is skipped if such a rule can - // potentially be matched. Please see the [list of unsupported - // configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs). - UNSUPPORTED_FIREWALL_POLICY_RULE = 100; - - // Tracking state for response traffic created when request traffic goes - // through allow firewall rule. - // For details, see [firewall rules - // specifications](https://cloud.google.com/firewall/docs/firewalls#specifications) - TRACKING_STATE = 101; - } - - // The display name of the firewall rule. This field might be empty for - // firewall policy rules. - string display_name = 1; - - // The URI of the firewall rule. This field is not applicable to implied - // VPC firewall rules. - string uri = 2; - - // Possible values: INGRESS, EGRESS - string direction = 3; - - // Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP - string action = 4; - - // The priority of the firewall rule. - int32 priority = 5; - - // The URI of the VPC network that the firewall rule is associated with. - // This field is not applicable to hierarchical firewall policy rules. - string network_uri = 6; - - // The target tags defined by the VPC firewall rule. This field is not - // applicable to firewall policy rules. - repeated string target_tags = 7; - - // The target service accounts specified by the firewall rule. - repeated string target_service_accounts = 8; - - // The name of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy = 9; - - // The URI of the firewall policy that this rule is associated with. - // This field is not applicable to VPC firewall rules and implied VPC firewall - // rules. - string policy_uri = 11; - - // The firewall rule's type. - FirewallRuleType firewall_rule_type = 10; -} - -// For display only. Metadata associated with a Compute Engine route. -message RouteInfo { - // Type of route: - enum RouteType { - // Unspecified type. Default value. - ROUTE_TYPE_UNSPECIFIED = 0; - - // Route is a subnet route automatically created by the system. - SUBNET = 1; - - // Static route created by the user, including the default route to the - // internet. - STATIC = 2; - - // Dynamic route exchanged between BGP peers. - DYNAMIC = 3; - - // A subnet route received from peering network. - PEERING_SUBNET = 4; - - // A static route received from peering network. - PEERING_STATIC = 5; - - // A dynamic route received from peering network. - PEERING_DYNAMIC = 6; - - // Policy based route. - POLICY_BASED = 7; - - // Advertised route. Synthetic route which is used to transition from the - // StartFromPrivateNetwork state in Connectivity tests. - ADVERTISED = 101; - } - - // Type of next hop: - enum NextHopType { - // Unspecified type. Default value. - NEXT_HOP_TYPE_UNSPECIFIED = 0; - - // Next hop is an IP address. - NEXT_HOP_IP = 1; - - // Next hop is a Compute Engine instance. - NEXT_HOP_INSTANCE = 2; - - // Next hop is a VPC network gateway. - NEXT_HOP_NETWORK = 3; - - // Next hop is a peering VPC. - NEXT_HOP_PEERING = 4; - - // Next hop is an interconnect. - NEXT_HOP_INTERCONNECT = 5; - - // Next hop is a VPN tunnel. - NEXT_HOP_VPN_TUNNEL = 6; - - // Next hop is a VPN gateway. This scenario only happens when tracing - // connectivity from an on-premises network to Google Cloud through a VPN. - // The analysis simulates a packet departing from the on-premises network - // through a VPN tunnel and arriving at a Cloud VPN gateway. - NEXT_HOP_VPN_GATEWAY = 7; - - // Next hop is an internet gateway. - NEXT_HOP_INTERNET_GATEWAY = 8; - - // Next hop is blackhole; that is, the next hop either does not exist or is - // not running. - NEXT_HOP_BLACKHOLE = 9; - - // Next hop is the forwarding rule of an Internal Load Balancer. - NEXT_HOP_ILB = 10; - - // Next hop is a - // [router appliance - // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview). - NEXT_HOP_ROUTER_APPLIANCE = 11; - - // Next hop is an NCC hub. - NEXT_HOP_NCC_HUB = 12; - } - - // Indicates where routes are applicable. - enum RouteScope { - // Unspecified scope. Default value. - ROUTE_SCOPE_UNSPECIFIED = 0; - - // Route is applicable to packets in Network. - NETWORK = 1; - - // Route is applicable to packets using NCC Hub's routing table. - NCC_HUB = 2; - } - - // Type of route. - RouteType route_type = 8; - - // Type of next hop. - NextHopType next_hop_type = 9; - - // Indicates where route is applicable. - RouteScope route_scope = 14; - - // Name of a route. - string display_name = 1; - - // URI of a route (if applicable). - string uri = 2; - - // Region of the route (if applicable). - string region = 19; - - // Destination IP range of the route. - string dest_ip_range = 3; - - // Next hop of the route. - string next_hop = 4; - - // URI of a Compute Engine network. NETWORK routes only. - string network_uri = 5; - - // Priority of the route. - int32 priority = 6; - - // Instance tags of the route. - repeated string instance_tags = 7; - - // Source IP address range of the route. Policy based routes only. - string src_ip_range = 10; - - // Destination port ranges of the route. Policy based routes only. - repeated string dest_port_ranges = 11; - - // Source port ranges of the route. Policy based routes only. - repeated string src_port_ranges = 12; - - // Protocols of the route. Policy based routes only. - repeated string protocols = 13; - - // URI of a NCC Hub. NCC_HUB routes only. - optional string ncc_hub_uri = 15; - - // URI of a NCC Spoke. NCC_HUB routes only. - optional string ncc_spoke_uri = 16; - - // For advertised dynamic routes, the URI of the Cloud Router that advertised - // the corresponding IP prefix. - optional string advertised_route_source_router_uri = 17; - - // For advertised routes, the URI of their next hop, i.e. the URI of the - // hybrid endpoint (VPN tunnel, Interconnect attachment, NCC router appliance) - // the advertised prefix is advertised through, or URI of the source peered - // network. - optional string advertised_route_next_hop_uri = 18; -} - -// For display only. Details of a Google Service sending packets to a -// VPC network. Although the source IP might be a publicly routable address, -// some Google Services use special routes within Google production -// infrastructure to reach Compute Engine Instances. -// https://cloud.google.com/vpc/docs/routes#special_return_paths -message GoogleServiceInfo { - // Recognized type of a Google Service. - enum GoogleServiceType { - // Unspecified Google Service. - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0; - - // Identity aware proxy. - // https://cloud.google.com/iap/docs/using-tcp-forwarding - IAP = 1; - - // One of two services sharing IP ranges: - // * Load Balancer proxy - // * Centralized Health Check prober - // https://cloud.google.com/load-balancing/docs/firewall-rules - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2; - - // Connectivity from Cloud DNS to forwarding targets or alternate name - // servers that use private routing. - // https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules - // https://cloud.google.com/dns/docs/policies#firewall-rules - CLOUD_DNS = 3; - - // private.googleapis.com and restricted.googleapis.com - GOOGLE_API = 4; - - // Google API via Private Service Connect. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_PSC = 5; - - // Google API via VPC Service Controls. - // https://cloud.google.com/vpc/docs/configure-private-service-connect-apis - GOOGLE_API_VPC_SC = 6; - } - - // Source IP address. - string source_ip = 1; - - // Recognized type of a Google Service. - GoogleServiceType google_service_type = 2; -} - -// For display only. Metadata associated with a Compute Engine forwarding rule. -message ForwardingRuleInfo { - // Name of the forwarding rule. - string display_name = 1; - - // URI of the forwarding rule. - string uri = 2; - - // Protocol defined in the forwarding rule that matches the packet. - string matched_protocol = 3; - - // Port range defined in the forwarding rule that matches the packet. - string matched_port_range = 6; - - // VIP of the forwarding rule. - string vip = 4; - - // Target type of the forwarding rule. - string target = 5; - - // Network URI. - string network_uri = 7; - - // Region of the forwarding rule. Set only for regional forwarding rules. - string region = 8; - - // Name of the load balancer the forwarding rule belongs to. Empty for - // forwarding rules not related to load balancers (like PSC forwarding rules). - string load_balancer_name = 9; - - // URI of the PSC service attachment this forwarding rule targets (if - // applicable). - string psc_service_attachment_uri = 10; - - // PSC Google API target this forwarding rule targets (if applicable). - string psc_google_api_target = 11; -} - -// For display only. Metadata associated with a load balancer. -message LoadBalancerInfo { - // The type definition for a load balancer: - enum LoadBalancerType { - // Type is unspecified. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Internal TCP/UDP load balancer. - INTERNAL_TCP_UDP = 1; - - // Network TCP/UDP load balancer. - NETWORK_TCP_UDP = 2; - - // HTTP(S) proxy load balancer. - HTTP_PROXY = 3; - - // TCP proxy load balancer. - TCP_PROXY = 4; - - // SSL proxy load balancer. - SSL_PROXY = 5; - } - - // The type definition for a load balancer backend configuration: - enum BackendType { - // Type is unspecified. - BACKEND_TYPE_UNSPECIFIED = 0; - - // Backend Service as the load balancer's backend. - BACKEND_SERVICE = 1; - - // Target Pool as the load balancer's backend. - TARGET_POOL = 2; - - // Target Instance as the load balancer's backend. - TARGET_INSTANCE = 3; - } - - // Type of the load balancer. - LoadBalancerType load_balancer_type = 1; - - // URI of the health check for the load balancer. Deprecated and no longer - // populated as different load balancer backends might have different health - // checks. - string health_check_uri = 2 [deprecated = true]; - - // Information for the loadbalancer backends. - repeated LoadBalancerBackend backends = 3; - - // Type of load balancer's backend configuration. - BackendType backend_type = 4; - - // Backend configuration URI. - string backend_uri = 5; -} - -// For display only. Metadata associated with a specific load balancer backend. -message LoadBalancerBackend { - // State of a health check firewall configuration: - enum HealthCheckFirewallState { - // State is unspecified. Default state if not populated. - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0; - - // There are configured firewall rules to allow health check probes to the - // backend. - CONFIGURED = 1; - - // There are firewall rules configured to allow partial health check ranges - // or block all health check ranges. - // If a health check probe is sent from denied IP ranges, - // the health check to the backend will fail. Then, the backend will be - // marked unhealthy and will not receive traffic sent to the load balancer. - MISCONFIGURED = 2; - } - - // Name of a Compute Engine instance or network endpoint. - string display_name = 1; - - // URI of a Compute Engine instance or network endpoint. - string uri = 2; - - // State of the health check firewall configuration. - HealthCheckFirewallState health_check_firewall_state = 3; - - // A list of firewall rule URIs allowing probes from health check IP ranges. - repeated string health_check_allowing_firewall_rules = 4; - - // A list of firewall rule URIs blocking probes from health check IP ranges. - repeated string health_check_blocking_firewall_rules = 5; -} - -// For display only. Metadata associated with a Compute Engine VPN gateway. -message VpnGatewayInfo { - // Name of a VPN gateway. - string display_name = 1; - - // URI of a VPN gateway. - string uri = 2; - - // URI of a Compute Engine network where the VPN gateway is configured. - string network_uri = 3; - - // IP address of the VPN gateway. - string ip_address = 4; - - // A VPN tunnel that is associated with this VPN gateway. - // There may be multiple VPN tunnels configured on a VPN gateway, and only - // the one relevant to the test is displayed. - string vpn_tunnel_uri = 5; - - // Name of a Google Cloud region where this VPN gateway is configured. - string region = 6; -} - -// For display only. Metadata associated with a Compute Engine VPN tunnel. -message VpnTunnelInfo { - // Types of VPN routing policy. For details, refer to [Networks and Tunnel - // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/). - enum RoutingType { - // Unspecified type. Default value. - ROUTING_TYPE_UNSPECIFIED = 0; - - // Route based VPN. - ROUTE_BASED = 1; - - // Policy based routing. - POLICY_BASED = 2; - - // Dynamic (BGP) routing. - DYNAMIC = 3; - } - - // Name of a VPN tunnel. - string display_name = 1; - - // URI of a VPN tunnel. - string uri = 2; - - // URI of the VPN gateway at local end of the tunnel. - string source_gateway = 3; - - // URI of a VPN gateway at remote end of the tunnel. - string remote_gateway = 4; - - // Remote VPN gateway's IP address. - string remote_gateway_ip = 5; - - // Local VPN gateway's IP address. - string source_gateway_ip = 6; - - // URI of a Compute Engine network where the VPN tunnel is configured. - string network_uri = 7; - - // Name of a Google Cloud region where this VPN tunnel is configured. - string region = 8; - - // Type of the routing policy. - RoutingType routing_type = 9; -} - -// For display only. The specification of the endpoints for the test. -// EndpointInfo is derived from source and destination Endpoint and validated -// by the backend data plane model. -message EndpointInfo { - // Source IP address. - string source_ip = 1; - - // Destination IP address. - string destination_ip = 2; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 3; - - // Source port. Only valid when protocol is TCP or UDP. - int32 source_port = 4; - - // Destination port. Only valid when protocol is TCP or UDP. - int32 destination_port = 5; - - // URI of the network where this packet originates from. - string source_network_uri = 6; - - // URI of the network where this packet is sent to. - string destination_network_uri = 7; - - // URI of the source telemetry agent this packet originates from. - string source_agent_uri = 8; -} - -// Details of the final state "deliver" and associated resource. -message DeliverInfo { - // Deliver target types: - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Target is a Compute Engine instance. - INSTANCE = 1; - - // Target is the internet. - INTERNET = 2; - - // Target is a Google API. - GOOGLE_API = 3; - - // Target is a Google Kubernetes Engine cluster master. - GKE_MASTER = 4; - - // Target is a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 5; - - // Target is a published service that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - PSC_PUBLISHED_SERVICE = 6; - - // Target is Google APIs that use [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_GOOGLE_API = 7; - - // Target is a VPC-SC that uses [Private Service - // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis). - PSC_VPC_SC = 8; - - // Target is a serverless network endpoint group. - SERVERLESS_NEG = 9; - - // Target is a Cloud Storage bucket. - STORAGE_BUCKET = 10; - - // Target is a private network. Used only for return traces. - PRIVATE_NETWORK = 11; - - // Target is a Cloud Function. Used only for return traces. - CLOUD_FUNCTION = 12; - - // Target is a App Engine service version. Used only for return traces. - APP_ENGINE_VERSION = 13; - - // Target is a Cloud Run revision. Used only for return traces. - CLOUD_RUN_REVISION = 14; - - // Target is a Google-managed service. Used only for return traces. - GOOGLE_MANAGED_SERVICE = 15; - - // Target is a Redis Instance. - REDIS_INSTANCE = 16; - - // Target is a Redis Cluster. - REDIS_CLUSTER = 17; - } - - // Target type where the packet is delivered to. - Target target = 1; - - // URI of the resource that the packet is delivered to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the Cloud Storage Bucket the packet is delivered to (if - // applicable). - string storage_bucket = 4; - - // PSC Google API target the packet is delivered to (if applicable). - string psc_google_api_target = 5; -} - -// Details of the final state "forward" and associated resource. -message ForwardInfo { - // Forward target types. - enum Target { - // Target not specified. - TARGET_UNSPECIFIED = 0; - - // Forwarded to a VPC peering network. - PEERING_VPC = 1; - - // Forwarded to a Cloud VPN gateway. - VPN_GATEWAY = 2; - - // Forwarded to a Cloud Interconnect connection. - INTERCONNECT = 3; - - // Forwarded to a Google Kubernetes Engine Container cluster master. - GKE_MASTER = 4 [deprecated = true]; - - // Forwarded to the next hop of a custom route imported from a peering VPC. - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5; - - // Forwarded to a Cloud SQL instance. - CLOUD_SQL_INSTANCE = 6 [deprecated = true]; - - // Forwarded to a VPC network in another project. - ANOTHER_PROJECT = 7; - - // Forwarded to an NCC Hub. - NCC_HUB = 8; - - // Forwarded to a router appliance. - ROUTER_APPLIANCE = 9; - } - - // Target type where this packet is forwarded to. - Target target = 1; - - // URI of the resource that the packet is forwarded to. - string resource_uri = 2; - - // IP address of the target (if applicable). - string ip_address = 3 [(google.api.field_info).format = IPV4_OR_IPV6]; -} - -// Details of the final state "abort" and associated resource. -message AbortInfo { - // Abort cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Aborted due to unknown network. Deprecated, not used in the new tests. - UNKNOWN_NETWORK = 1 [deprecated = true]; - - // Aborted because no project information can be derived from the test - // input. Deprecated, not used in the new tests. - UNKNOWN_PROJECT = 3 [deprecated = true]; - - // Aborted because traffic is sent from a public IP to an instance without - // an external IP. Deprecated, not used in the new tests. - NO_EXTERNAL_IP = 7 [deprecated = true]; - - // Aborted because none of the traces matches destination information - // specified in the input test request. Deprecated, not used in the new - // tests. - UNINTENDED_DESTINATION = 8 [deprecated = true]; - - // Aborted because the source endpoint could not be found. Deprecated, not - // used in the new tests. - SOURCE_ENDPOINT_NOT_FOUND = 11 [deprecated = true]; - - // Aborted because the source network does not match the source endpoint. - // Deprecated, not used in the new tests. - MISMATCHED_SOURCE_NETWORK = 12 [deprecated = true]; - - // Aborted because the destination endpoint could not be found. Deprecated, - // not used in the new tests. - DESTINATION_ENDPOINT_NOT_FOUND = 13 [deprecated = true]; - - // Aborted because the destination network does not match the destination - // endpoint. Deprecated, not used in the new tests. - MISMATCHED_DESTINATION_NETWORK = 14 [deprecated = true]; - - // Aborted because no endpoint with the packet's destination IP address is - // found. - UNKNOWN_IP = 2; - - // Aborted because no endpoint with the packet's destination IP is found in - // the Google-managed project. - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32; - - // Aborted because the source IP address doesn't belong to any of the - // subnets of the source VPC network. - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23; - - // Aborted because user lacks permission to access all or part of the - // network configurations required to run the test. - PERMISSION_DENIED = 4; - - // Aborted because user lacks permission to access Cloud NAT configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28; - - // Aborted because user lacks permission to access Network endpoint group - // endpoint configs required to run the test. - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29; - - // Aborted because user lacks permission to access Cloud Router configs - // required to run the test. - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36; - - // Aborted because no valid source or destination endpoint is derived from - // the input test request. - NO_SOURCE_LOCATION = 5; - - // Aborted because the source or destination endpoint specified in - // the request is invalid. Some examples: - // - The request might contain malformed resource URI, project ID, or IP - // address. - // - The request might contain inconsistent information (for example, the - // request might include both the instance and the network, but the instance - // might not have a NIC in that network). - INVALID_ARGUMENT = 6; - - // Aborted because the number of steps in the trace exceeds a certain - // limit. It might be caused by a routing loop. - TRACE_TOO_LONG = 9; - - // Aborted due to internal server error. - INTERNAL_ERROR = 10; - - // Aborted because the test scenario is not supported. - UNSUPPORTED = 15; - - // Aborted because the source and destination resources have no common IP - // version. - MISMATCHED_IP_VERSION = 16; - - // Aborted because the connection between the control plane and the node of - // the source cluster is initiated by the node and managed by the - // Konnectivity proxy. - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17; - - // Aborted because expected resource configuration was missing. - RESOURCE_CONFIG_NOT_FOUND = 18; - - // Aborted because expected VM instance configuration was missing. - VM_INSTANCE_CONFIG_NOT_FOUND = 24; - - // Aborted because expected network configuration was missing. - NETWORK_CONFIG_NOT_FOUND = 25; - - // Aborted because expected firewall configuration was missing. - FIREWALL_CONFIG_NOT_FOUND = 26; - - // Aborted because expected route configuration was missing. - ROUTE_CONFIG_NOT_FOUND = 27; - - // Aborted because a PSC endpoint selection for the Google-managed service - // is ambiguous (several PSC endpoints satisfy test input). - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19; - - // Aborted because tests with a PSC-based Cloud SQL instance as a source are - // not supported. - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20; - - // Aborted because tests with a Redis Cluster as a source are not supported. - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34; - - // Aborted because tests with a Redis Instance as a source are not - // supported. - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35; - - // Aborted because tests with a forwarding rule as a source are not - // supported. - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21; - - // Aborted because one of the endpoints is a non-routable IP address - // (loopback, link-local, etc). - NON_ROUTABLE_IP_ADDRESS = 22; - - // Aborted due to an unknown issue in the Google-managed project. - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30; - - // Aborted due to an unsupported configuration of the Google-managed - // project. - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31; - } - - // Causes that the analysis is aborted. - Cause cause = 1; - - // URI of the resource that caused the abort. - string resource_uri = 2; - - // IP address that caused the abort. - string ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6]; - - // List of project IDs the user specified in the request but lacks access to. - // In this case, analysis is aborted with the PERMISSION_DENIED cause. - repeated string projects_missing_permission = 3; -} - -// Details of the final state "drop" and associated resource. -message DropInfo { - // Drop cause types: - enum Cause { - // Cause is unspecified. - CAUSE_UNSPECIFIED = 0; - - // Destination external address cannot be resolved to a known target. If - // the address is used in a Google Cloud project, provide the project ID - // as test input. - UNKNOWN_EXTERNAL_ADDRESS = 1; - - // A Compute Engine instance can only send or receive a packet with a - // foreign IP address if ip_forward is enabled. - FOREIGN_IP_DISALLOWED = 2; - - // Dropped due to a firewall rule, unless allowed due to connection - // tracking. - FIREWALL_RULE = 3; - - // Dropped due to no matching routes. - NO_ROUTE = 4; - - // Dropped due to invalid route. Route's next hop is a blackhole. - ROUTE_BLACKHOLE = 5; - - // Packet is sent to a wrong (unintended) network. Example: you trace a - // packet from VM1:Network1 to VM2:Network2, however, the route configured - // in Network1 sends the packet destined for VM2's IP address to Network3. - ROUTE_WRONG_NETWORK = 6; - - // Route's next hop IP address cannot be resolved to a GCP resource. - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42; - - // Route's next hop resource is not found. - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43; - - // Route's next hop instance doesn't have a NIC in the route's network. - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49; - - // Route's next hop IP address is not a primary IP address of the next hop - // instance. - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50; - - // Route's next hop forwarding rule doesn't match next hop IP address. - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51; - - // Route's next hop VPN tunnel is down (does not have valid IKE SAs). - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52; - - // Route's next hop forwarding rule type is invalid (it's not a forwarding - // rule of the internal passthrough load balancer). - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53; - - // Packet is sent from the Internet to the private IPv6 address. - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44; - - // The packet does not match a policy-based VPN tunnel local selector. - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45; - - // The packet does not match a policy-based VPN tunnel remote selector. - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46; - - // Packet with internal destination address sent to the internet gateway. - PRIVATE_TRAFFIC_TO_INTERNET = 7; - - // Instance with only an internal IP address tries to access Google API and - // services, but private Google access is not enabled in the subnet. - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8; - - // Source endpoint tries to access Google API and services through the VPN - // tunnel to another network, but Private Google Access needs to be enabled - // in the source endpoint network. - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47; - - // Instance with only an internal IP address tries to access external hosts, - // but Cloud NAT is not enabled in the subnet, unless special configurations - // on a VM allow this connection. - NO_EXTERNAL_ADDRESS = 9; - - // Destination internal address cannot be resolved to a known target. If - // this is a shared VPC scenario, verify if the service project ID is - // provided as test input. Otherwise, verify if the IP address is being - // used in the project. - UNKNOWN_INTERNAL_ADDRESS = 10; - - // Forwarding rule's protocol and ports do not match the packet header. - FORWARDING_RULE_MISMATCH = 11; - - // Forwarding rule does not have backends configured. - FORWARDING_RULE_NO_INSTANCES = 12; - - // Firewalls block the health check probes to the backends and cause - // the backends to be unavailable for traffic from the load balancer. - // For more details, see [Health check firewall - // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules). - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13; - - // Packet is sent from or to a Compute Engine instance that is not in a - // running state. - INSTANCE_NOT_RUNNING = 14; - - // Packet sent from or to a GKE cluster that is not in running state. - GKE_CLUSTER_NOT_RUNNING = 27; - - // Packet sent from or to a Cloud SQL instance that is not in running state. - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28; - - // Packet sent from or to a Redis Instance that is not in running state. - REDIS_INSTANCE_NOT_RUNNING = 68; - - // Packet sent from or to a Redis Cluster that is not in running state. - REDIS_CLUSTER_NOT_RUNNING = 69; - - // The type of traffic is blocked and the user cannot configure a firewall - // rule to enable it. See [Always blocked - // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for - // more details. - TRAFFIC_TYPE_BLOCKED = 15; - - // Access to Google Kubernetes Engine cluster master's endpoint is not - // authorized. See [Access to the cluster - // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) - // for more details. - GKE_MASTER_UNAUTHORIZED_ACCESS = 16; - - // Access to the Cloud SQL instance endpoint is not authorized. - // See [Authorizing with authorized - // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for - // more details. - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17; - - // Packet was dropped inside Google Kubernetes Engine Service. - DROPPED_INSIDE_GKE_SERVICE = 18; - - // Packet was dropped inside Cloud SQL Service. - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19; - - // Packet was dropped because there is no peering between the originating - // network and the Google Managed Services Network. - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20; - - // Packet was dropped because the Google-managed service uses Private - // Service Connect (PSC), but the PSC endpoint is not found in the project. - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38; - - // Packet was dropped because the GKE cluster uses Private Service Connect - // (PSC), but the PSC endpoint is not found in the project. - GKE_PSC_ENDPOINT_MISSING = 36; - - // Packet was dropped because the Cloud SQL instance has neither a private - // nor a public IP address. - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21; - - // Packet was dropped because a GKE cluster private endpoint is - // unreachable from a region different from the cluster's region. - GKE_CONTROL_PLANE_REGION_MISMATCH = 30; - - // Packet sent from a public GKE cluster control plane to a private - // IP address. - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31; - - // Packet was dropped because there is no route from a GKE cluster - // control plane to a destination network. - GKE_CONTROL_PLANE_NO_ROUTE = 32; - - // Packet sent from a Cloud SQL instance to an external IP address is not - // allowed. The Cloud SQL instance is not configured to send packets to - // external IP addresses. - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33; - - // Packet sent from a Cloud SQL instance with only a public IP address to a - // private IP address. - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34; - - // Packet was dropped because there is no route from a Cloud SQL - // instance to a destination network. - CLOUD_SQL_INSTANCE_NO_ROUTE = 35; - - // Packet was dropped because the Cloud SQL instance requires all - // connections to use Cloud SQL connectors and to target the Cloud SQL proxy - // port (3307). - CLOUD_SQL_CONNECTOR_REQUIRED = 63; - - // Packet could be dropped because the Cloud Function is not in an active - // status. - CLOUD_FUNCTION_NOT_ACTIVE = 22; - - // Packet could be dropped because no VPC connector is set. - VPC_CONNECTOR_NOT_SET = 23; - - // Packet could be dropped because the VPC connector is not in a running - // state. - VPC_CONNECTOR_NOT_RUNNING = 24; - - // Packet could be dropped because the traffic from the serverless service - // to the VPC connector is not allowed. - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60; - - // Packet could be dropped because the health check traffic to the VPC - // connector is not allowed. - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61; - - // Packet could be dropped because it was sent from a different region - // to a regional forwarding without global access. - FORWARDING_RULE_REGION_MISMATCH = 25; - - // The Private Service Connect endpoint is in a project that is not approved - // to connect to the service. - PSC_CONNECTION_NOT_ACCEPTED = 26; - - // The packet is sent to the Private Service Connect endpoint over the - // peering, but [it's not - // supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises). - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule does not have - // global access enabled. - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group), but the producer PSC forwarding rule has multiple ports - // specified. - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54; - - // The packet is sent to the Private Service Connect backend (network - // endpoint group) targeting a Cloud SQL service attachment, but this - // configuration is not supported. - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58; - - // No NAT subnets are defined for the PSC service attachment. - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57; - - // PSC endpoint is accessed via NCC, but PSC transitivity configuration is - // not yet propagated. - PSC_TRANSITIVITY_NOT_PROPAGATED = 64; - - // The packet sent from the hybrid NEG proxy matches a non-dynamic route, - // but such a configuration is not supported. - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55; - - // The packet sent from the hybrid NEG proxy matches a dynamic route with a - // next hop in a different region, but such a configuration is not - // supported. - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56; - - // Packet sent from a Cloud Run revision that is not ready. - CLOUD_RUN_REVISION_NOT_READY = 29; - - // Packet was dropped inside Private Service Connect service producer. - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37; - - // Packet sent to a load balancer, which requires a proxy-only subnet and - // the subnet is not found. - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39; - - // Packet sent to Cloud Nat without active NAT IPs. - CLOUD_NAT_NO_ADDRESSES = 40; - - // Packet is stuck in a routing loop. - ROUTING_LOOP = 59; - - // Packet is dropped inside a Google-managed service due to being delivered - // in return trace to an endpoint that doesn't match the endpoint the packet - // was sent from in forward trace. Used only for return traces. - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62; - - // Packet is dropped due to a load balancer backend instance not having a - // network interface in the network expected by the load balancer. - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65; - - // Packet is dropped due to a backend service named port not being defined - // on the instance group level. - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66; - - // Packet is dropped due to a destination IP range being part of a Private - // NAT IP range. - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67; - - // Generic drop cause for a packet being dropped inside a Redis Instance - // service project. - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Instance. Port 6379 should be used to connect to a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PORT = 71; - - // Packet is dropped due to connecting from PUPI address to a PSA based - // Redis Instance. - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72; - - // Packet is dropped due to no route to the destination network. - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73; - - // Redis Instance does not have an external IP address. - REDIS_INSTANCE_NO_EXTERNAL_IP = 74; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Instance. Only TCP connections are accepted by a Redis Instance. - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78; - - // Generic drop cause for a packet being dropped inside a Redis Cluster - // service project. - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75; - - // Packet is dropped due to an unsupported port being used to connect to a - // Redis Cluster. Ports 6379 and 11000 to 13047 should be used to connect to - // a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PORT = 76; - - // Redis Cluster does not have an external IP address. - REDIS_CLUSTER_NO_EXTERNAL_IP = 77; - - // Packet is dropped due to an unsupported protocol being used to connect to - // a Redis Cluster. Only TCP connections are accepted by a Redis Cluster. - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix advertised - // via BGP by the Cloud Router. - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80; - - // Packet from the non-GCP (on-prem) or unknown GCP network is dropped due - // to the destination IP address not belonging to any IP prefix included to - // the local traffic selector of the VPN tunnel. - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81; - - // Packet from the unknown peered network is dropped due to no known route - // from the source network to the destination IP address. - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; - - // Sending packets processed by the Private NAT Gateways to the Private - // Service Connect endpoints is not supported. - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; - } - - // Cause that the packet is dropped. - Cause cause = 1; - - // URI of the resource that caused the drop. - string resource_uri = 2; - - // Source IP address of the dropped packet (if relevant). - string source_ip = 3; - - // Destination IP address of the dropped packet (if relevant). - string destination_ip = 4; - - // Region of the dropped packet (if relevant). - string region = 5; -} - -// For display only. Metadata associated with a Google Kubernetes Engine (GKE) -// cluster master. -message GKEMasterInfo { - // URI of a GKE cluster. - string cluster_uri = 2; - - // URI of a GKE cluster network. - string cluster_network_uri = 4; - - // Internal IP address of a GKE cluster control plane. - string internal_ip = 5; - - // External IP address of a GKE cluster control plane. - string external_ip = 6; - - // DNS endpoint of a GKE cluster control plane. - string dns_endpoint = 7; -} - -// For display only. Metadata associated with a Cloud SQL instance. -message CloudSQLInstanceInfo { - // Name of a Cloud SQL instance. - string display_name = 1; - - // URI of a Cloud SQL instance. - string uri = 2; - - // URI of a Cloud SQL instance network or empty string if the instance does - // not have one. - string network_uri = 4; - - // Internal IP address of a Cloud SQL instance. - string internal_ip = 5; - - // External IP address of a Cloud SQL instance. - string external_ip = 6; - - // Region in which the Cloud SQL instance is running. - string region = 7; -} - -// For display only. Metadata associated with a Cloud Redis Instance. -message RedisInstanceInfo { - // Name of a Cloud Redis Instance. - string display_name = 1; - - // URI of a Cloud Redis Instance. - string uri = 2; - - // URI of a Cloud Redis Instance network. - string network_uri = 3; - - // Primary endpoint IP address of a Cloud Redis Instance. - string primary_endpoint_ip = 4; - - // Read endpoint IP address of a Cloud Redis Instance (if applicable). - string read_endpoint_ip = 5; - - // Region in which the Cloud Redis Instance is defined. - string region = 6; -} - -// For display only. Metadata associated with a Redis Cluster. -message RedisClusterInfo { - // Name of a Redis Cluster. - string display_name = 1; - - // URI of a Redis Cluster in format - // "projects/{project_id}/locations/{location}/clusters/{cluster_id}" - string uri = 2; - - // URI of a Redis Cluster network in format - // "projects/{project_id}/global/networks/{network_id}". - string network_uri = 3; - - // Discovery endpoint IP address of a Redis Cluster. - string discovery_endpoint_ip_address = 4 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Secondary endpoint IP address of a Redis Cluster. - string secondary_endpoint_ip_address = 5 - [(google.api.field_info).format = IPV4_OR_IPV6]; - - // Name of the region in which the Redis Cluster is defined. For example, - // "us-central1". - string location = 6; -} - -// For display only. Metadata associated with a Cloud Function. -message CloudFunctionInfo { - // Name of a Cloud Function. - string display_name = 1; - - // URI of a Cloud Function. - string uri = 2; - - // Location in which the Cloud Function is deployed. - string location = 3; - - // Latest successfully deployed version id of the Cloud Function. - int64 version_id = 4; -} - -// For display only. Metadata associated with a Cloud Run revision. -message CloudRunRevisionInfo { - // Name of a Cloud Run revision. - string display_name = 1; - - // URI of a Cloud Run revision. - string uri = 2; - - // Location in which this revision is deployed. - string location = 4; - - // URI of Cloud Run service this revision belongs to. - string service_uri = 5; -} - -// For display only. Metadata associated with an App Engine version. -message AppEngineVersionInfo { - // Name of an App Engine version. - string display_name = 1; - - // URI of an App Engine version. - string uri = 2; - - // Runtime of the App Engine version. - string runtime = 3; - - // App Engine execution environment for a version. - string environment = 4; -} - -// For display only. Metadata associated with a VPC connector. -message VpcConnectorInfo { - // Name of a VPC connector. - string display_name = 1; - - // URI of a VPC connector. - string uri = 2; - - // Location in which the VPC connector is deployed. - string location = 3; -} - -// For display only. Metadata associated with NAT. -message NatInfo { - // Types of NAT. - enum Type { - // Type is unspecified. - TYPE_UNSPECIFIED = 0; - - // From Compute Engine instance's internal address to external address. - INTERNAL_TO_EXTERNAL = 1; - - // From Compute Engine instance's external address to internal address. - EXTERNAL_TO_INTERNAL = 2; - - // Cloud NAT Gateway. - CLOUD_NAT = 3; - - // Private service connect NAT. - PRIVATE_SERVICE_CONNECT = 4; - } - - // Type of NAT. - Type type = 1; - - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 2; - - // URI of the network where NAT translation takes place. - string network_uri = 3; - - // Source IP address before NAT translation. - string old_source_ip = 4; - - // Source IP address after NAT translation. - string new_source_ip = 5; - - // Destination IP address before NAT translation. - string old_destination_ip = 6; - - // Destination IP address after NAT translation. - string new_destination_ip = 7; - - // Source port before NAT translation. Only valid when protocol is TCP or UDP. - int32 old_source_port = 8; - - // Source port after NAT translation. Only valid when protocol is TCP or UDP. - int32 new_source_port = 9; - - // Destination port before NAT translation. Only valid when protocol is TCP or - // UDP. - int32 old_destination_port = 10; - - // Destination port after NAT translation. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 11; - - // Uri of the Cloud Router. Only valid when type is CLOUD_NAT. - string router_uri = 12; - - // The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT. - string nat_gateway_name = 13; -} - -// For display only. Metadata associated with ProxyConnection. -message ProxyConnectionInfo { - // IP protocol in string format, for example: "TCP", "UDP", "ICMP". - string protocol = 1; - - // Source IP address of an original connection. - string old_source_ip = 2; - - // Source IP address of a new connection. - string new_source_ip = 3; - - // Destination IP address of an original connection - string old_destination_ip = 4; - - // Destination IP address of a new connection. - string new_destination_ip = 5; - - // Source port of an original connection. Only valid when protocol is TCP or - // UDP. - int32 old_source_port = 6; - - // Source port of a new connection. Only valid when protocol is TCP or UDP. - int32 new_source_port = 7; - - // Destination port of an original connection. Only valid when protocol is TCP - // or UDP. - int32 old_destination_port = 8; - - // Destination port of a new connection. Only valid when protocol is TCP or - // UDP. - int32 new_destination_port = 9; - - // Uri of proxy subnet. - string subnet_uri = 10; - - // URI of the network where connection is proxied. - string network_uri = 11; -} - -// For display only. Metadata associated with the load balancer backend. -message LoadBalancerBackendInfo { - // Health check firewalls configuration state enum. - enum HealthCheckFirewallsConfigState { - // Configuration state unspecified. It usually means that the backend has - // no health check attached, or there was an unexpected configuration error - // preventing Connectivity tests from verifying health check configuration. - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0; - - // Firewall rules (policies) allowing health check traffic from all required - // IP ranges to the backend are configured. - FIREWALLS_CONFIGURED = 1; - - // Firewall rules (policies) allow health check traffic only from a part of - // required IP ranges. - FIREWALLS_PARTIALLY_CONFIGURED = 2; - - // Firewall rules (policies) deny health check traffic from all required - // IP ranges to the backend. - FIREWALLS_NOT_CONFIGURED = 3; - - // The network contains firewall rules of unsupported types, so Connectivity - // tests were not able to verify health check configuration status. Please - // refer to the documentation for the list of unsupported configurations: - // https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs - FIREWALLS_UNSUPPORTED = 4; - } - - // Display name of the backend. For example, it might be an instance name for - // the instance group backends, or an IP address and port for zonal network - // endpoint group backends. - string name = 1; - - // URI of the backend instance (if applicable). Populated for instance group - // backends, and zonal NEG backends. - string instance_uri = 2; - - // URI of the backend service this backend belongs to (if applicable). - string backend_service_uri = 3; - - // URI of the instance group this backend belongs to (if applicable). - string instance_group_uri = 4; - - // URI of the network endpoint group this backend belongs to (if applicable). - string network_endpoint_group_uri = 5; - - // URI of the backend bucket this backend targets (if applicable). - string backend_bucket_uri = 8; - - // URI of the PSC service attachment this PSC NEG backend targets (if - // applicable). - string psc_service_attachment_uri = 9; - - // PSC Google API target this PSC NEG backend targets (if applicable). - string psc_google_api_target = 10; - - // URI of the health check attached to this backend (if applicable). - string health_check_uri = 6; - - // Output only. Health check firewalls configuration state for the backend. - // This is a result of the static firewall analysis (verifying that health - // check traffic from required IP ranges to the backend is allowed or not). - // The backend might still be unhealthy even if these firewalls are - // configured. Please refer to the documentation for more information: - // https://cloud.google.com/load-balancing/docs/firewall-rules - HealthCheckFirewallsConfigState health_check_firewalls_config_state = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Type of a load balancer. For more information, see [Summary of Google Cloud -// load -// balancers](https://cloud.google.com/load-balancing/docs/load-balancing-overview#summary-of-google-cloud-load-balancers). -enum LoadBalancerType { - // Forwarding rule points to a different target than a load balancer or a - // load balancer type is unknown. - LOAD_BALANCER_TYPE_UNSPECIFIED = 0; - - // Global external HTTP(S) load balancer. - HTTPS_ADVANCED_LOAD_BALANCER = 1; - - // Global external HTTP(S) load balancer (classic) - HTTPS_LOAD_BALANCER = 2; - - // Regional external HTTP(S) load balancer. - REGIONAL_HTTPS_LOAD_BALANCER = 3; - - // Internal HTTP(S) load balancer. - INTERNAL_HTTPS_LOAD_BALANCER = 4; - - // External SSL proxy load balancer. - SSL_PROXY_LOAD_BALANCER = 5; - - // External TCP proxy load balancer. - TCP_PROXY_LOAD_BALANCER = 6; - - // Internal regional TCP proxy load balancer. - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7; - - // External TCP/UDP Network load balancer. - NETWORK_LOAD_BALANCER = 8; - - // Target-pool based external TCP/UDP Network load balancer. - LEGACY_NETWORK_LOAD_BALANCER = 9; - - // Internal TCP/UDP load balancer. - TCP_UDP_INTERNAL_LOAD_BALANCER = 10; -} - -// For display only. Metadata associated with Storage Bucket. -message StorageBucketInfo { - // Cloud Storage Bucket name. - string bucket = 1; -} - -// For display only. Metadata associated with the serverless network endpoint -// group backend. -message ServerlessNegInfo { - // URI of the serverless network endpoint group. - string neg_uri = 1; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto deleted file mode 100644 index bb6d06d3af6..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto +++ /dev/null @@ -1,228 +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.networkmanagement.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/networkmanagement/v1beta1/reachability.proto"; -import "google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "VpcFlowLogsProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// The VPC Flow Logs service in the Google Cloud Network Management API provides -// configurations that generate Flow Logs. The service and the configuration -// resources created using this service are global. -service VpcFlowLogsService { - option (google.api.default_host) = "networkmanagement.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Lists all `VpcFlowLogsConfigs` in a given project. - rpc ListVpcFlowLogsConfigs(ListVpcFlowLogsConfigsRequest) - returns (ListVpcFlowLogsConfigsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets the details of a specific `VpcFlowLogsConfig`. - rpc GetVpcFlowLogsConfig(GetVpcFlowLogsConfigRequest) - returns (VpcFlowLogsConfig) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a new `VpcFlowLogsConfig`. - // If a configuration with the exact same settings already exists (even if the - // ID is different), the creation fails. - // Notes: - // 1. Creating a configuration with state=DISABLED will fail. - // 2. The following fields are not considrered as `settings` for the purpose - // of the check mentioned above, therefore - creating another configuration - // with the same fields but different values for the following fields will - // fail as well: - // - name - // - create_time - // - update_time - // - labels - // - description - rpc CreateVpcFlowLogsConfig(CreateVpcFlowLogsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" - body: "vpc_flow_logs_config" - }; - option (google.api.method_signature) = - "parent,vpc_flow_logs_config,vpc_flow_logs_config_id"; - option (google.longrunning.operation_info) = { - response_type: "VpcFlowLogsConfig" - metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }; - } - - // Updates an existing `VpcFlowLogsConfig`. - // If a configuration with the exact same settings already exists (even if the - // ID is different), the creation fails. - // Notes: - // 1. The following fields are not considrered as `settings` for the purpose - // of the check mentioned above, therefore - updating another configuration - // with the same fields but different values for the following fields will - // fail as well: - // - name - // - create_time - // - update_time - // - labels - // - description - rpc UpdateVpcFlowLogsConfig(UpdateVpcFlowLogsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - body: "vpc_flow_logs_config" - }; - option (google.api.method_signature) = "vpc_flow_logs_config,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "VpcFlowLogsConfig" - metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }; - } - - // Deletes a specific `VpcFlowLogsConfig`. - rpc DeleteVpcFlowLogsConfig(DeleteVpcFlowLogsConfigRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }; - } -} - -// Request for the `ListVpcFlowLogsConfigs` method. -message ListVpcFlowLogsConfigsRequest { - // Required. The parent resource of the VpcFlowLogsConfig: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; - - // Optional. Number of `VpcFlowLogsConfigs` to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Page token from an earlier query, as returned in - // `next_page_token`. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - // A filter expression must use the supported [CEL logic operators] - // (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Field to use to sort the list. - string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response for the `ListVpcFlowLogsConfigs` method. -message ListVpcFlowLogsConfigsResponse { - // List of VPC Flow Log configurations. - repeated VpcFlowLogsConfig vpc_flow_logs_configs = 1; - - // Page token to fetch the next set of configurations. - string next_page_token = 2; - - // Locations that could not be reached (when querying all locations with `-`). - repeated string unreachable = 3; -} - -// Request for the `GetVpcFlowLogsConfig` method. -message GetVpcFlowLogsConfigRequest { - // Required. `VpcFlowLogsConfig` resource name using the form: - // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; -} - -// Request for the `CreateVpcFlowLogsConfig` method. -message CreateVpcFlowLogsConfigRequest { - // Required. The parent resource of the VPC Flow Logs configuration to create: - // `projects/{project_id}/locations/global` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; - - // Required. ID of the `VpcFlowLogsConfig`. - string vpc_flow_logs_config_id = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; - - // Required. A `VpcFlowLogsConfig` resource - VpcFlowLogsConfig vpc_flow_logs_config = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `UpdateVpcFlowLogsConfig` method. -message UpdateVpcFlowLogsConfigRequest { - // Required. Mask of fields to update. At least one path must be supplied in - // this field. - google.protobuf.FieldMask update_mask = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Only fields specified in update_mask are updated. - VpcFlowLogsConfig vpc_flow_logs_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request for the `DeleteVpcFlowLogsConfig` method. -message DeleteVpcFlowLogsConfigRequest { - // Required. `VpcFlowLogsConfig` resource name using the form: - // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - ]; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto deleted file mode 100644 index 03137065ab0..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto +++ /dev/null @@ -1,152 +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.networkmanagement.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1"; -option go_package = "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb"; -option java_multiple_files = true; -option java_outer_classname = "VpcFlowLogsConfigProto"; -option java_package = "com.google.cloud.networkmanagement.v1beta1"; -option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1"; -option ruby_package = "Google::Cloud::NetworkManagement::V1beta1"; - -// A configuration to generate VPC Flow Logs. -message VpcFlowLogsConfig { - option (google.api.resource) = { - type: "networkmanagement.googleapis.com/VpcFlowLogsConfig" - pattern: "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}" - plural: "vpcFlowLogsConfigs" - singular: "vpcFlowLogsConfig" - }; - - // Determines whether this configuration will be generating logs. - // Setting state=DISABLED will pause the log generation for this config. - enum State { - // If not specified, will default to ENABLED. - STATE_UNSPECIFIED = 0; - - // When ENABLED, this configuration will generate logs. - ENABLED = 1; - - // When DISABLED, this configuration will not generate logs. - DISABLED = 2; - } - - // Toggles the aggregation interval for collecting flow logs by 5-tuple. - enum AggregationInterval { - // If not specified, will default to INTERVAL_5_SEC. - AGGREGATION_INTERVAL_UNSPECIFIED = 0; - - // Aggregate logs in 5s intervals. - INTERVAL_5_SEC = 1; - - // Aggregate logs in 30s intervals. - INTERVAL_30_SEC = 2; - - // Aggregate logs in 1m intervals. - INTERVAL_1_MIN = 3; - - // Aggregate logs in 5m intervals. - INTERVAL_5_MIN = 4; - - // Aggregate logs in 10m intervals. - INTERVAL_10_MIN = 5; - - // Aggregate logs in 15m intervals. - INTERVAL_15_MIN = 6; - } - - // Configures which log fields would be included. - enum Metadata { - // If not specified, will default to INCLUDE_ALL_METADATA. - METADATA_UNSPECIFIED = 0; - - // Include all metadata fields. - INCLUDE_ALL_METADATA = 1; - - // Exclude all metadata fields. - EXCLUDE_ALL_METADATA = 2; - - // Include only custom fields (specified in metadata_fields). - CUSTOM_METADATA = 3; - } - - // Identifier. Unique name of the configuration using the form: - // `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config_id}` - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The user-supplied description of the VPC Flow Logs configuration. - // Maximum of 512 characters. - optional string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The state of the VPC Flow Log configuration. Default value is - // ENABLED. When creating a new configuration, it must be enabled. - optional State state = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The aggregation interval for the logs. Default value is - // INTERVAL_5_SEC. - optional AggregationInterval aggregation_interval = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The value of the field must be in (0, 1]. The sampling rate of - // VPC Flow Logs where 1.0 means all collected logs are reported. Setting the - // sampling rate to 0.0 is not allowed. If you want to disable VPC Flow Logs, - // use the state field instead. Default value is 1.0. - optional float flow_sampling = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configures whether all, none or a subset of metadata fields - // should be added to the reported VPC flow logs. Default value is - // INCLUDE_ALL_METADATA. - optional Metadata metadata = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Custom metadata fields to include in the reported VPC flow logs. - // Can only be specified if "metadata" was set to CUSTOM_METADATA. - repeated string metadata_fields = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Export filter used to define which VPC Flow Logs should be - // logged. - optional string filter_expr = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Reference to the resource of the config scope. That is, the scope from - // which traffic is logged. The target resource must belong to the same - // project as the configuration. - oneof target_resource { - // Traffic will be logged from the Interconnect Attachment. - // Format: - // projects/{project_id}/regions/{region}/interconnectAttachments/{name} - string interconnect_attachment = 102; - - // Traffic will be logged from the VPN Tunnel. - // Format: projects/{project_id}/regions/{region}/vpnTunnels/{name} - string vpn_tunnel = 103; - } - - // Optional. Resource labels to represent user-provided metadata. - map labels = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The time the config was created. - google.protobuf.Timestamp create_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time the config was updated. - google.protobuf.Timestamp update_time = 10 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts deleted file mode 100644 index e4ee0905dff..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.d.ts +++ /dev/null @@ -1,15637 +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 networkmanagement. */ - namespace networkmanagement { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a ConnectivityTest. */ - interface IConnectivityTest { - - /** ConnectivityTest name */ - name?: (string|null); - - /** ConnectivityTest description */ - description?: (string|null); - - /** ConnectivityTest source */ - source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest destination */ - destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest protocol */ - protocol?: (string|null); - - /** ConnectivityTest relatedProjects */ - relatedProjects?: (string[]|null); - - /** ConnectivityTest displayName */ - displayName?: (string|null); - - /** ConnectivityTest labels */ - labels?: ({ [k: string]: string }|null); - - /** ConnectivityTest createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails */ - reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails */ - probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks */ - bypassFirewallChecks?: (boolean|null); - } - - /** Represents a ConnectivityTest. */ - class ConnectivityTest implements IConnectivityTest { - - /** - * Constructs a new ConnectivityTest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest); - - /** ConnectivityTest name. */ - public name: string; - - /** ConnectivityTest description. */ - public description: string; - - /** ConnectivityTest source. */ - public source?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest destination. */ - public destination?: (google.cloud.networkmanagement.v1beta1.IEndpoint|null); - - /** ConnectivityTest protocol. */ - public protocol: string; - - /** ConnectivityTest relatedProjects. */ - public relatedProjects: string[]; - - /** ConnectivityTest displayName. */ - public displayName: string; - - /** ConnectivityTest labels. */ - public labels: { [k: string]: string }; - - /** ConnectivityTest createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** ConnectivityTest reachabilityDetails. */ - public reachabilityDetails?: (google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null); - - /** ConnectivityTest probingDetails. */ - public probingDetails?: (google.cloud.networkmanagement.v1beta1.IProbingDetails|null); - - /** ConnectivityTest bypassFirewallChecks. */ - public bypassFirewallChecks: boolean; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectivityTest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IConnectivityTest): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @param message ConnectivityTest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IConnectivityTest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Verifies a ConnectivityTest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectivityTest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ConnectivityTest; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @param message ConnectivityTest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ConnectivityTest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectivityTest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConnectivityTest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Endpoint. */ - interface IEndpoint { - - /** Endpoint ipAddress */ - ipAddress?: (string|null); - - /** Endpoint port */ - port?: (number|null); - - /** Endpoint instance */ - instance?: (string|null); - - /** Endpoint forwardingRule */ - forwardingRule?: (string|null); - - /** Endpoint forwardingRuleTarget */ - forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId */ - loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster */ - gkeMasterCluster?: (string|null); - - /** Endpoint fqdn */ - fqdn?: (string|null); - - /** Endpoint cloudSqlInstance */ - cloudSqlInstance?: (string|null); - - /** Endpoint redisInstance */ - redisInstance?: (string|null); - - /** Endpoint redisCluster */ - redisCluster?: (string|null); - - /** Endpoint cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network */ - network?: (string|null); - - /** Endpoint networkType */ - networkType?: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null); - - /** Endpoint projectId */ - projectId?: (string|null); - } - - /** Represents an Endpoint. */ - class Endpoint implements IEndpoint { - - /** - * Constructs a new Endpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint); - - /** Endpoint ipAddress. */ - public ipAddress: string; - - /** Endpoint port. */ - public port: number; - - /** Endpoint instance. */ - public instance: string; - - /** Endpoint forwardingRule. */ - public forwardingRule: string; - - /** Endpoint forwardingRuleTarget. */ - public forwardingRuleTarget?: (google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null); - - /** Endpoint loadBalancerId. */ - public loadBalancerId?: (string|null); - - /** Endpoint loadBalancerType. */ - public loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerType|null); - - /** Endpoint gkeMasterCluster. */ - public gkeMasterCluster: string; - - /** Endpoint fqdn. */ - public fqdn: string; - - /** Endpoint cloudSqlInstance. */ - public cloudSqlInstance: string; - - /** Endpoint redisInstance. */ - public redisInstance: string; - - /** Endpoint redisCluster. */ - public redisCluster: string; - - /** Endpoint cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null); - - /** Endpoint appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null); - - /** Endpoint cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null); - - /** Endpoint network. */ - public network: string; - - /** Endpoint networkType. */ - public networkType: (google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|keyof typeof google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType); - - /** Endpoint projectId. */ - public projectId: string; - - /** Endpoint _forwardingRuleTarget. */ - public _forwardingRuleTarget?: "forwardingRuleTarget"; - - /** Endpoint _loadBalancerId. */ - public _loadBalancerId?: "loadBalancerId"; - - /** Endpoint _loadBalancerType. */ - public _loadBalancerType?: "loadBalancerType"; - - /** - * Creates a new Endpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns Endpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @param message Endpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Verifies an Endpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Endpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @param message Endpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Endpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Endpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Endpoint { - - /** NetworkType enum. */ - enum NetworkType { - NETWORK_TYPE_UNSPECIFIED = 0, - GCP_NETWORK = 1, - NON_GCP_NETWORK = 2 - } - - /** ForwardingRuleTarget enum. */ - enum ForwardingRuleTarget { - FORWARDING_RULE_TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - LOAD_BALANCER = 2, - VPN_GATEWAY = 3, - PSC = 4 - } - - /** Properties of a CloudFunctionEndpoint. */ - interface ICloudFunctionEndpoint { - - /** CloudFunctionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudFunctionEndpoint. */ - class CloudFunctionEndpoint implements ICloudFunctionEndpoint { - - /** - * Constructs a new CloudFunctionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint); - - /** CloudFunctionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @param message CloudFunctionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Verifies a CloudFunctionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @param message CloudFunctionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionEndpoint. */ - interface IAppEngineVersionEndpoint { - - /** AppEngineVersionEndpoint uri */ - uri?: (string|null); - } - - /** Represents an AppEngineVersionEndpoint. */ - class AppEngineVersionEndpoint implements IAppEngineVersionEndpoint { - - /** - * Constructs a new AppEngineVersionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint); - - /** AppEngineVersionEndpoint uri. */ - public uri: string; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @param message AppEngineVersionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @param message AppEngineVersionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionEndpoint. */ - interface ICloudRunRevisionEndpoint { - - /** CloudRunRevisionEndpoint uri */ - uri?: (string|null); - } - - /** Represents a CloudRunRevisionEndpoint. */ - class CloudRunRevisionEndpoint implements ICloudRunRevisionEndpoint { - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint); - - /** CloudRunRevisionEndpoint uri. */ - public uri: string; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionEndpoint instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @param message CloudRunRevisionEndpoint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionEndpoint - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @param message CloudRunRevisionEndpoint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a ReachabilityDetails. */ - interface IReachabilityDetails { - - /** ReachabilityDetails result */ - result?: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null); - - /** ReachabilityDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error */ - error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces */ - traces?: (google.cloud.networkmanagement.v1beta1.ITrace[]|null); - } - - /** Represents a ReachabilityDetails. */ - class ReachabilityDetails implements IReachabilityDetails { - - /** - * Constructs a new ReachabilityDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails); - - /** ReachabilityDetails result. */ - public result: (google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|keyof typeof google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result); - - /** ReachabilityDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ReachabilityDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ReachabilityDetails traces. */ - public traces: google.cloud.networkmanagement.v1beta1.ITrace[]; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ReachabilityDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IReachabilityDetails): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @param message ReachabilityDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IReachabilityDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Verifies a ReachabilityDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReachabilityDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ReachabilityDetails; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @param message ReachabilityDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ReachabilityDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReachabilityDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReachabilityDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReachabilityDetails { - - /** Result enum. */ - enum Result { - RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - AMBIGUOUS = 4, - UNDETERMINED = 5 - } - } - - /** Properties of a LatencyPercentile. */ - interface ILatencyPercentile { - - /** LatencyPercentile percent */ - percent?: (number|null); - - /** LatencyPercentile latencyMicros */ - latencyMicros?: (number|Long|string|null); - } - - /** Represents a LatencyPercentile. */ - class LatencyPercentile implements ILatencyPercentile { - - /** - * Constructs a new LatencyPercentile. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile); - - /** LatencyPercentile percent. */ - public percent: number; - - /** LatencyPercentile latencyMicros. */ - public latencyMicros: (number|Long|string); - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyPercentile instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyPercentile): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @param message LatencyPercentile message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyPercentile, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Verifies a LatencyPercentile message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyPercentile - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyPercentile; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @param message LatencyPercentile - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyPercentile, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyPercentile to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyPercentile - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LatencyDistribution. */ - interface ILatencyDistribution { - - /** LatencyDistribution latencyPercentiles */ - latencyPercentiles?: (google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]|null); - } - - /** Represents a LatencyDistribution. */ - class LatencyDistribution implements ILatencyDistribution { - - /** - * Constructs a new LatencyDistribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution); - - /** LatencyDistribution latencyPercentiles. */ - public latencyPercentiles: google.cloud.networkmanagement.v1beta1.ILatencyPercentile[]; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @param [properties] Properties to set - * @returns LatencyDistribution instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILatencyDistribution): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @param message LatencyDistribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILatencyDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Verifies a LatencyDistribution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatencyDistribution - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LatencyDistribution; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @param message LatencyDistribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LatencyDistribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatencyDistribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LatencyDistribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ProbingDetails. */ - interface IProbingDetails { - - /** ProbingDetails result */ - result?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null); - - /** ProbingDetails verifyTime */ - verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error */ - error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause */ - abortCause?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null); - - /** ProbingDetails sentProbeCount */ - sentProbeCount?: (number|null); - - /** ProbingDetails successfulProbeCount */ - successfulProbeCount?: (number|null); - - /** ProbingDetails endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** ProbingDetails probingLatency */ - probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation */ - destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); - } - - /** Represents a ProbingDetails. */ - class ProbingDetails implements IProbingDetails { - - /** - * Constructs a new ProbingDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails); - - /** ProbingDetails result. */ - public result: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult); - - /** ProbingDetails verifyTime. */ - public verifyTime?: (google.protobuf.ITimestamp|null); - - /** ProbingDetails error. */ - public error?: (google.rpc.IStatus|null); - - /** ProbingDetails abortCause. */ - public abortCause: (google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|keyof typeof google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause); - - /** ProbingDetails sentProbeCount. */ - public sentProbeCount: number; - - /** ProbingDetails successfulProbeCount. */ - public successfulProbeCount: number; - - /** ProbingDetails endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** ProbingDetails probingLatency. */ - public probingLatency?: (google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null); - - /** ProbingDetails destinationEgressLocation. */ - public destinationEgressLocation?: (google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null); - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns ProbingDetails instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IProbingDetails): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @param message ProbingDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProbingDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Verifies a ProbingDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProbingDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @param message ProbingDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProbingDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProbingDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ProbingDetails { - - /** ProbingResult enum. */ - enum ProbingResult { - PROBING_RESULT_UNSPECIFIED = 0, - REACHABLE = 1, - UNREACHABLE = 2, - REACHABILITY_INCONSISTENT = 3, - UNDETERMINED = 4 - } - - /** ProbingAbortCause enum. */ - enum ProbingAbortCause { - PROBING_ABORT_CAUSE_UNSPECIFIED = 0, - PERMISSION_DENIED = 1, - NO_SOURCE_LOCATION = 2 - } - - /** Properties of an EdgeLocation. */ - interface IEdgeLocation { - - /** EdgeLocation metropolitanArea */ - metropolitanArea?: (string|null); - } - - /** Represents an EdgeLocation. */ - class EdgeLocation implements IEdgeLocation { - - /** - * Constructs a new EdgeLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation); - - /** EdgeLocation metropolitanArea. */ - public metropolitanArea: string; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns EdgeLocation instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @param message EdgeLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Verifies an EdgeLocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EdgeLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @param message EdgeLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EdgeLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EdgeLocation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Trace. */ - interface ITrace { - - /** Trace endpointInfo */ - endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Trace steps */ - steps?: (google.cloud.networkmanagement.v1beta1.IStep[]|null); - - /** Trace forwardTraceId */ - forwardTraceId?: (number|null); - } - - /** Represents a Trace. */ - class Trace implements ITrace { - - /** - * Constructs a new Trace. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ITrace); - - /** Trace endpointInfo. */ - public endpointInfo?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Trace steps. */ - public steps: google.cloud.networkmanagement.v1beta1.IStep[]; - - /** Trace forwardTraceId. */ - public forwardTraceId: number; - - /** - * Creates a new Trace instance using the specified properties. - * @param [properties] Properties to set - * @returns Trace instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ITrace): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @param message Trace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ITrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Verifies a Trace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Trace - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Trace; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @param message Trace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Trace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Trace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Trace - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Step. */ - interface IStep { - - /** Step description */ - description?: (string|null); - - /** Step state */ - state?: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State|null); - - /** Step causesDrop */ - causesDrop?: (boolean|null); - - /** Step projectId */ - projectId?: (string|null); - - /** Step instance */ - instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); - - /** Step firewall */ - firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); - - /** Step route */ - route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); - - /** Step endpoint */ - endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Step googleService */ - googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); - - /** Step forwardingRule */ - forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); - - /** Step vpnGateway */ - vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); - - /** Step vpnTunnel */ - vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); - - /** Step vpcConnector */ - vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); - - /** Step deliver */ - deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); - - /** Step forward */ - forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); - - /** Step abort */ - abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); - - /** Step drop */ - drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); - - /** Step loadBalancer */ - loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); - - /** Step network */ - network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); - - /** Step gkeMaster */ - gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance */ - cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance */ - redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); - - /** Step redisCluster */ - redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); - - /** Step cloudFunction */ - cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); - - /** Step appEngineVersion */ - appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision */ - cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); - - /** Step nat */ - nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); - - /** Step proxyConnection */ - proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo */ - loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket */ - storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); - - /** Step serverlessNeg */ - serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); - } - - /** Represents a Step. */ - class Step implements IStep { - - /** - * Constructs a new Step. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IStep); - - /** Step description. */ - public description: string; - - /** Step state. */ - public state: (google.cloud.networkmanagement.v1beta1.Step.State|keyof typeof google.cloud.networkmanagement.v1beta1.Step.State); - - /** Step causesDrop. */ - public causesDrop: boolean; - - /** Step projectId. */ - public projectId: string; - - /** Step instance. */ - public instance?: (google.cloud.networkmanagement.v1beta1.IInstanceInfo|null); - - /** Step firewall. */ - public firewall?: (google.cloud.networkmanagement.v1beta1.IFirewallInfo|null); - - /** Step route. */ - public route?: (google.cloud.networkmanagement.v1beta1.IRouteInfo|null); - - /** Step endpoint. */ - public endpoint?: (google.cloud.networkmanagement.v1beta1.IEndpointInfo|null); - - /** Step googleService. */ - public googleService?: (google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null); - - /** Step forwardingRule. */ - public forwardingRule?: (google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null); - - /** Step vpnGateway. */ - public vpnGateway?: (google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null); - - /** Step vpnTunnel. */ - public vpnTunnel?: (google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null); - - /** Step vpcConnector. */ - public vpcConnector?: (google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null); - - /** Step deliver. */ - public deliver?: (google.cloud.networkmanagement.v1beta1.IDeliverInfo|null); - - /** Step forward. */ - public forward?: (google.cloud.networkmanagement.v1beta1.IForwardInfo|null); - - /** Step abort. */ - public abort?: (google.cloud.networkmanagement.v1beta1.IAbortInfo|null); - - /** Step drop. */ - public drop?: (google.cloud.networkmanagement.v1beta1.IDropInfo|null); - - /** Step loadBalancer. */ - public loadBalancer?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null); - - /** Step network. */ - public network?: (google.cloud.networkmanagement.v1beta1.INetworkInfo|null); - - /** Step gkeMaster. */ - public gkeMaster?: (google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null); - - /** Step cloudSqlInstance. */ - public cloudSqlInstance?: (google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null); - - /** Step redisInstance. */ - public redisInstance?: (google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null); - - /** Step redisCluster. */ - public redisCluster?: (google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null); - - /** Step cloudFunction. */ - public cloudFunction?: (google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null); - - /** Step appEngineVersion. */ - public appEngineVersion?: (google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null); - - /** Step cloudRunRevision. */ - public cloudRunRevision?: (google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null); - - /** Step nat. */ - public nat?: (google.cloud.networkmanagement.v1beta1.INatInfo|null); - - /** Step proxyConnection. */ - public proxyConnection?: (google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null); - - /** Step loadBalancerBackendInfo. */ - public loadBalancerBackendInfo?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null); - - /** Step storageBucket. */ - public storageBucket?: (google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null); - - /** Step serverlessNeg. */ - public serverlessNeg?: (google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null); - - /** Step stepInfo. */ - public stepInfo?: ("instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"); - - /** - * Creates a new Step instance using the specified properties. - * @param [properties] Properties to set - * @returns Step instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IStep): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @param message Step message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Step message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Verifies a Step message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Step - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.Step; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @param message Step - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.Step, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Step to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Step - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Step { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - START_FROM_INSTANCE = 1, - START_FROM_INTERNET = 2, - START_FROM_GOOGLE_SERVICE = 27, - START_FROM_PRIVATE_NETWORK = 3, - START_FROM_GKE_MASTER = 21, - START_FROM_CLOUD_SQL_INSTANCE = 22, - START_FROM_REDIS_INSTANCE = 32, - START_FROM_REDIS_CLUSTER = 33, - START_FROM_CLOUD_FUNCTION = 23, - START_FROM_APP_ENGINE_VERSION = 25, - START_FROM_CLOUD_RUN_REVISION = 26, - START_FROM_STORAGE_BUCKET = 29, - START_FROM_PSC_PUBLISHED_SERVICE = 30, - START_FROM_SERVERLESS_NEG = 31, - APPLY_INGRESS_FIREWALL_RULE = 4, - APPLY_EGRESS_FIREWALL_RULE = 5, - APPLY_ROUTE = 6, - APPLY_FORWARDING_RULE = 7, - ANALYZE_LOAD_BALANCER_BACKEND = 28, - SPOOFING_APPROVED = 8, - ARRIVE_AT_INSTANCE = 9, - ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10, - ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11, - ARRIVE_AT_VPN_GATEWAY = 12, - ARRIVE_AT_VPN_TUNNEL = 13, - ARRIVE_AT_VPC_CONNECTOR = 24, - NAT = 14, - PROXY_CONNECTION = 15, - DELIVER = 16, - DROP = 17, - FORWARD = 18, - ABORT = 19, - VIEWER_PERMISSION_MISSING = 20 - } - } - - /** Properties of an InstanceInfo. */ - interface IInstanceInfo { - - /** InstanceInfo displayName */ - displayName?: (string|null); - - /** InstanceInfo uri */ - uri?: (string|null); - - /** InstanceInfo interface */ - "interface"?: (string|null); - - /** InstanceInfo networkUri */ - networkUri?: (string|null); - - /** InstanceInfo internalIp */ - internalIp?: (string|null); - - /** InstanceInfo externalIp */ - externalIp?: (string|null); - - /** InstanceInfo networkTags */ - networkTags?: (string[]|null); - - /** InstanceInfo serviceAccount */ - serviceAccount?: (string|null); - - /** InstanceInfo pscNetworkAttachmentUri */ - pscNetworkAttachmentUri?: (string|null); - } - - /** Represents an InstanceInfo. */ - class InstanceInfo implements IInstanceInfo { - - /** - * Constructs a new InstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo); - - /** InstanceInfo displayName. */ - public displayName: string; - - /** InstanceInfo uri. */ - public uri: string; - - /** InstanceInfo interface. */ - public interface: string; - - /** InstanceInfo networkUri. */ - public networkUri: string; - - /** InstanceInfo internalIp. */ - public internalIp: string; - - /** InstanceInfo externalIp. */ - public externalIp: string; - - /** InstanceInfo networkTags. */ - public networkTags: string[]; - - /** InstanceInfo serviceAccount. */ - public serviceAccount: string; - - /** InstanceInfo pscNetworkAttachmentUri. */ - public pscNetworkAttachmentUri: string; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns InstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IInstanceInfo): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @param message InstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Verifies an InstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.InstanceInfo; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @param message InstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.InstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for InstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkInfo. */ - interface INetworkInfo { - - /** NetworkInfo displayName */ - displayName?: (string|null); - - /** NetworkInfo uri */ - uri?: (string|null); - - /** NetworkInfo matchedSubnetUri */ - matchedSubnetUri?: (string|null); - - /** NetworkInfo matchedIpRange */ - matchedIpRange?: (string|null); - - /** NetworkInfo region */ - region?: (string|null); - } - - /** Represents a NetworkInfo. */ - class NetworkInfo implements INetworkInfo { - - /** - * Constructs a new NetworkInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo); - - /** NetworkInfo displayName. */ - public displayName: string; - - /** NetworkInfo uri. */ - public uri: string; - - /** NetworkInfo matchedSubnetUri. */ - public matchedSubnetUri: string; - - /** NetworkInfo matchedIpRange. */ - public matchedIpRange: string; - - /** NetworkInfo region. */ - public region: string; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.INetworkInfo): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @param message NetworkInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INetworkInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Verifies a NetworkInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NetworkInfo; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @param message NetworkInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.NetworkInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FirewallInfo. */ - interface IFirewallInfo { - - /** FirewallInfo displayName */ - displayName?: (string|null); - - /** FirewallInfo uri */ - uri?: (string|null); - - /** FirewallInfo direction */ - direction?: (string|null); - - /** FirewallInfo action */ - action?: (string|null); - - /** FirewallInfo priority */ - priority?: (number|null); - - /** FirewallInfo networkUri */ - networkUri?: (string|null); - - /** FirewallInfo targetTags */ - targetTags?: (string[]|null); - - /** FirewallInfo targetServiceAccounts */ - targetServiceAccounts?: (string[]|null); - - /** FirewallInfo policy */ - policy?: (string|null); - - /** FirewallInfo policyUri */ - policyUri?: (string|null); - - /** FirewallInfo firewallRuleType */ - firewallRuleType?: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null); - } - - /** Represents a FirewallInfo. */ - class FirewallInfo implements IFirewallInfo { - - /** - * Constructs a new FirewallInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo); - - /** FirewallInfo displayName. */ - public displayName: string; - - /** FirewallInfo uri. */ - public uri: string; - - /** FirewallInfo direction. */ - public direction: string; - - /** FirewallInfo action. */ - public action: string; - - /** FirewallInfo priority. */ - public priority: number; - - /** FirewallInfo networkUri. */ - public networkUri: string; - - /** FirewallInfo targetTags. */ - public targetTags: string[]; - - /** FirewallInfo targetServiceAccounts. */ - public targetServiceAccounts: string[]; - - /** FirewallInfo policy. */ - public policy: string; - - /** FirewallInfo policyUri. */ - public policyUri: string; - - /** FirewallInfo firewallRuleType. */ - public firewallRuleType: (google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|keyof typeof google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType); - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns FirewallInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IFirewallInfo): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @param message FirewallInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IFirewallInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Verifies a FirewallInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FirewallInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.FirewallInfo; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @param message FirewallInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.FirewallInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FirewallInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FirewallInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FirewallInfo { - - /** FirewallRuleType enum. */ - enum FirewallRuleType { - FIREWALL_RULE_TYPE_UNSPECIFIED = 0, - HIERARCHICAL_FIREWALL_POLICY_RULE = 1, - VPC_FIREWALL_RULE = 2, - IMPLIED_VPC_FIREWALL_RULE = 3, - SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4, - NETWORK_FIREWALL_POLICY_RULE = 5, - NETWORK_REGIONAL_FIREWALL_POLICY_RULE = 6, - UNSUPPORTED_FIREWALL_POLICY_RULE = 100, - TRACKING_STATE = 101 - } - } - - /** Properties of a RouteInfo. */ - interface IRouteInfo { - - /** RouteInfo routeType */ - routeType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null); - - /** RouteInfo nextHopType */ - nextHopType?: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null); - - /** RouteInfo routeScope */ - routeScope?: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null); - - /** RouteInfo displayName */ - displayName?: (string|null); - - /** RouteInfo uri */ - uri?: (string|null); - - /** RouteInfo region */ - region?: (string|null); - - /** RouteInfo destIpRange */ - destIpRange?: (string|null); - - /** RouteInfo nextHop */ - nextHop?: (string|null); - - /** RouteInfo networkUri */ - networkUri?: (string|null); - - /** RouteInfo priority */ - priority?: (number|null); - - /** RouteInfo instanceTags */ - instanceTags?: (string[]|null); - - /** RouteInfo srcIpRange */ - srcIpRange?: (string|null); - - /** RouteInfo destPortRanges */ - destPortRanges?: (string[]|null); - - /** RouteInfo srcPortRanges */ - srcPortRanges?: (string[]|null); - - /** RouteInfo protocols */ - protocols?: (string[]|null); - - /** RouteInfo nccHubUri */ - nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri */ - nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri */ - advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri */ - advertisedRouteNextHopUri?: (string|null); - } - - /** Represents a RouteInfo. */ - class RouteInfo implements IRouteInfo { - - /** - * Constructs a new RouteInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo); - - /** RouteInfo routeType. */ - public routeType: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType); - - /** RouteInfo nextHopType. */ - public nextHopType: (google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType); - - /** RouteInfo routeScope. */ - public routeScope: (google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|keyof typeof google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope); - - /** RouteInfo displayName. */ - public displayName: string; - - /** RouteInfo uri. */ - public uri: string; - - /** RouteInfo region. */ - public region: string; - - /** RouteInfo destIpRange. */ - public destIpRange: string; - - /** RouteInfo nextHop. */ - public nextHop: string; - - /** RouteInfo networkUri. */ - public networkUri: string; - - /** RouteInfo priority. */ - public priority: number; - - /** RouteInfo instanceTags. */ - public instanceTags: string[]; - - /** RouteInfo srcIpRange. */ - public srcIpRange: string; - - /** RouteInfo destPortRanges. */ - public destPortRanges: string[]; - - /** RouteInfo srcPortRanges. */ - public srcPortRanges: string[]; - - /** RouteInfo protocols. */ - public protocols: string[]; - - /** RouteInfo nccHubUri. */ - public nccHubUri?: (string|null); - - /** RouteInfo nccSpokeUri. */ - public nccSpokeUri?: (string|null); - - /** RouteInfo advertisedRouteSourceRouterUri. */ - public advertisedRouteSourceRouterUri?: (string|null); - - /** RouteInfo advertisedRouteNextHopUri. */ - public advertisedRouteNextHopUri?: (string|null); - - /** RouteInfo _nccHubUri. */ - public _nccHubUri?: "nccHubUri"; - - /** RouteInfo _nccSpokeUri. */ - public _nccSpokeUri?: "nccSpokeUri"; - - /** RouteInfo _advertisedRouteSourceRouterUri. */ - public _advertisedRouteSourceRouterUri?: "advertisedRouteSourceRouterUri"; - - /** RouteInfo _advertisedRouteNextHopUri. */ - public _advertisedRouteNextHopUri?: "advertisedRouteNextHopUri"; - - /** - * Creates a new RouteInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RouteInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRouteInfo): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @param message RouteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRouteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Verifies a RouteInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RouteInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RouteInfo; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @param message RouteInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RouteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RouteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RouteInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace RouteInfo { - - /** RouteType enum. */ - enum RouteType { - ROUTE_TYPE_UNSPECIFIED = 0, - SUBNET = 1, - STATIC = 2, - DYNAMIC = 3, - PEERING_SUBNET = 4, - PEERING_STATIC = 5, - PEERING_DYNAMIC = 6, - POLICY_BASED = 7, - ADVERTISED = 101 - } - - /** NextHopType enum. */ - enum NextHopType { - NEXT_HOP_TYPE_UNSPECIFIED = 0, - NEXT_HOP_IP = 1, - NEXT_HOP_INSTANCE = 2, - NEXT_HOP_NETWORK = 3, - NEXT_HOP_PEERING = 4, - NEXT_HOP_INTERCONNECT = 5, - NEXT_HOP_VPN_TUNNEL = 6, - NEXT_HOP_VPN_GATEWAY = 7, - NEXT_HOP_INTERNET_GATEWAY = 8, - NEXT_HOP_BLACKHOLE = 9, - NEXT_HOP_ILB = 10, - NEXT_HOP_ROUTER_APPLIANCE = 11, - NEXT_HOP_NCC_HUB = 12 - } - - /** RouteScope enum. */ - enum RouteScope { - ROUTE_SCOPE_UNSPECIFIED = 0, - NETWORK = 1, - NCC_HUB = 2 - } - } - - /** Properties of a GoogleServiceInfo. */ - interface IGoogleServiceInfo { - - /** GoogleServiceInfo sourceIp */ - sourceIp?: (string|null); - - /** GoogleServiceInfo googleServiceType */ - googleServiceType?: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null); - } - - /** Represents a GoogleServiceInfo. */ - class GoogleServiceInfo implements IGoogleServiceInfo { - - /** - * Constructs a new GoogleServiceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo); - - /** GoogleServiceInfo sourceIp. */ - public sourceIp: string; - - /** GoogleServiceInfo googleServiceType. */ - public googleServiceType: (google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|keyof typeof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType); - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GoogleServiceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @param message GoogleServiceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Verifies a GoogleServiceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoogleServiceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GoogleServiceInfo; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @param message GoogleServiceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GoogleServiceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoogleServiceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GoogleServiceInfo { - - /** GoogleServiceType enum. */ - enum GoogleServiceType { - GOOGLE_SERVICE_TYPE_UNSPECIFIED = 0, - IAP = 1, - GFE_PROXY_OR_HEALTH_CHECK_PROBER = 2, - CLOUD_DNS = 3, - GOOGLE_API = 4, - GOOGLE_API_PSC = 5, - GOOGLE_API_VPC_SC = 6 - } - } - - /** Properties of a ForwardingRuleInfo. */ - interface IForwardingRuleInfo { - - /** ForwardingRuleInfo displayName */ - displayName?: (string|null); - - /** ForwardingRuleInfo uri */ - uri?: (string|null); - - /** ForwardingRuleInfo matchedProtocol */ - matchedProtocol?: (string|null); - - /** ForwardingRuleInfo matchedPortRange */ - matchedPortRange?: (string|null); - - /** ForwardingRuleInfo vip */ - vip?: (string|null); - - /** ForwardingRuleInfo target */ - target?: (string|null); - - /** ForwardingRuleInfo networkUri */ - networkUri?: (string|null); - - /** ForwardingRuleInfo region */ - region?: (string|null); - - /** ForwardingRuleInfo loadBalancerName */ - loadBalancerName?: (string|null); - - /** ForwardingRuleInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** ForwardingRuleInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a ForwardingRuleInfo. */ - class ForwardingRuleInfo implements IForwardingRuleInfo { - - /** - * Constructs a new ForwardingRuleInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo); - - /** ForwardingRuleInfo displayName. */ - public displayName: string; - - /** ForwardingRuleInfo uri. */ - public uri: string; - - /** ForwardingRuleInfo matchedProtocol. */ - public matchedProtocol: string; - - /** ForwardingRuleInfo matchedPortRange. */ - public matchedPortRange: string; - - /** ForwardingRuleInfo vip. */ - public vip: string; - - /** ForwardingRuleInfo target. */ - public target: string; - - /** ForwardingRuleInfo networkUri. */ - public networkUri: string; - - /** ForwardingRuleInfo region. */ - public region: string; - - /** ForwardingRuleInfo loadBalancerName. */ - public loadBalancerName: string; - - /** ForwardingRuleInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** ForwardingRuleInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardingRuleInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @param message ForwardingRuleInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Verifies a ForwardingRuleInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardingRuleInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @param message ForwardingRuleInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerInfo. */ - interface ILoadBalancerInfo { - - /** LoadBalancerInfo loadBalancerType */ - loadBalancerType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null); - - /** LoadBalancerInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerInfo backends */ - backends?: (google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]|null); - - /** LoadBalancerInfo backendType */ - backendType?: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null); - - /** LoadBalancerInfo backendUri */ - backendUri?: (string|null); - } - - /** Represents a LoadBalancerInfo. */ - class LoadBalancerInfo implements ILoadBalancerInfo { - - /** - * Constructs a new LoadBalancerInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo); - - /** LoadBalancerInfo loadBalancerType. */ - public loadBalancerType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType); - - /** LoadBalancerInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerInfo backends. */ - public backends: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend[]; - - /** LoadBalancerInfo backendType. */ - public backendType: (google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType); - - /** LoadBalancerInfo backendUri. */ - public backendUri: string; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @param message LoadBalancerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Verifies a LoadBalancerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerInfo; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @param message LoadBalancerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerInfo { - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - INTERNAL_TCP_UDP = 1, - NETWORK_TCP_UDP = 2, - HTTP_PROXY = 3, - TCP_PROXY = 4, - SSL_PROXY = 5 - } - - /** BackendType enum. */ - enum BackendType { - BACKEND_TYPE_UNSPECIFIED = 0, - BACKEND_SERVICE = 1, - TARGET_POOL = 2, - TARGET_INSTANCE = 3 - } - } - - /** Properties of a LoadBalancerBackend. */ - interface ILoadBalancerBackend { - - /** LoadBalancerBackend displayName */ - displayName?: (string|null); - - /** LoadBalancerBackend uri */ - uri?: (string|null); - - /** LoadBalancerBackend healthCheckFirewallState */ - healthCheckFirewallState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules */ - healthCheckAllowingFirewallRules?: (string[]|null); - - /** LoadBalancerBackend healthCheckBlockingFirewallRules */ - healthCheckBlockingFirewallRules?: (string[]|null); - } - - /** Represents a LoadBalancerBackend. */ - class LoadBalancerBackend implements ILoadBalancerBackend { - - /** - * Constructs a new LoadBalancerBackend. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend); - - /** LoadBalancerBackend displayName. */ - public displayName: string; - - /** LoadBalancerBackend uri. */ - public uri: string; - - /** LoadBalancerBackend healthCheckFirewallState. */ - public healthCheckFirewallState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState); - - /** LoadBalancerBackend healthCheckAllowingFirewallRules. */ - public healthCheckAllowingFirewallRules: string[]; - - /** LoadBalancerBackend healthCheckBlockingFirewallRules. */ - public healthCheckBlockingFirewallRules: string[]; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackend instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @param message LoadBalancerBackend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Verifies a LoadBalancerBackend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackend - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackend; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @param message LoadBalancerBackend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackend - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackend { - - /** HealthCheckFirewallState enum. */ - enum HealthCheckFirewallState { - HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0, - CONFIGURED = 1, - MISCONFIGURED = 2 - } - } - - /** Properties of a VpnGatewayInfo. */ - interface IVpnGatewayInfo { - - /** VpnGatewayInfo displayName */ - displayName?: (string|null); - - /** VpnGatewayInfo uri */ - uri?: (string|null); - - /** VpnGatewayInfo networkUri */ - networkUri?: (string|null); - - /** VpnGatewayInfo ipAddress */ - ipAddress?: (string|null); - - /** VpnGatewayInfo vpnTunnelUri */ - vpnTunnelUri?: (string|null); - - /** VpnGatewayInfo region */ - region?: (string|null); - } - - /** Represents a VpnGatewayInfo. */ - class VpnGatewayInfo implements IVpnGatewayInfo { - - /** - * Constructs a new VpnGatewayInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo); - - /** VpnGatewayInfo displayName. */ - public displayName: string; - - /** VpnGatewayInfo uri. */ - public uri: string; - - /** VpnGatewayInfo networkUri. */ - public networkUri: string; - - /** VpnGatewayInfo ipAddress. */ - public ipAddress: string; - - /** VpnGatewayInfo vpnTunnelUri. */ - public vpnTunnelUri: string; - - /** VpnGatewayInfo region. */ - public region: string; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnGatewayInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @param message VpnGatewayInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Verifies a VpnGatewayInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnGatewayInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnGatewayInfo; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @param message VpnGatewayInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnGatewayInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnGatewayInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpnTunnelInfo. */ - interface IVpnTunnelInfo { - - /** VpnTunnelInfo displayName */ - displayName?: (string|null); - - /** VpnTunnelInfo uri */ - uri?: (string|null); - - /** VpnTunnelInfo sourceGateway */ - sourceGateway?: (string|null); - - /** VpnTunnelInfo remoteGateway */ - remoteGateway?: (string|null); - - /** VpnTunnelInfo remoteGatewayIp */ - remoteGatewayIp?: (string|null); - - /** VpnTunnelInfo sourceGatewayIp */ - sourceGatewayIp?: (string|null); - - /** VpnTunnelInfo networkUri */ - networkUri?: (string|null); - - /** VpnTunnelInfo region */ - region?: (string|null); - - /** VpnTunnelInfo routingType */ - routingType?: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null); - } - - /** Represents a VpnTunnelInfo. */ - class VpnTunnelInfo implements IVpnTunnelInfo { - - /** - * Constructs a new VpnTunnelInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo); - - /** VpnTunnelInfo displayName. */ - public displayName: string; - - /** VpnTunnelInfo uri. */ - public uri: string; - - /** VpnTunnelInfo sourceGateway. */ - public sourceGateway: string; - - /** VpnTunnelInfo remoteGateway. */ - public remoteGateway: string; - - /** VpnTunnelInfo remoteGatewayIp. */ - public remoteGatewayIp: string; - - /** VpnTunnelInfo sourceGatewayIp. */ - public sourceGatewayIp: string; - - /** VpnTunnelInfo networkUri. */ - public networkUri: string; - - /** VpnTunnelInfo region. */ - public region: string; - - /** VpnTunnelInfo routingType. */ - public routingType: (google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|keyof typeof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType); - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpnTunnelInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @param message VpnTunnelInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Verifies a VpnTunnelInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpnTunnelInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpnTunnelInfo; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @param message VpnTunnelInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpnTunnelInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpnTunnelInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VpnTunnelInfo { - - /** RoutingType enum. */ - enum RoutingType { - ROUTING_TYPE_UNSPECIFIED = 0, - ROUTE_BASED = 1, - POLICY_BASED = 2, - DYNAMIC = 3 - } - } - - /** Properties of an EndpointInfo. */ - interface IEndpointInfo { - - /** EndpointInfo sourceIp */ - sourceIp?: (string|null); - - /** EndpointInfo destinationIp */ - destinationIp?: (string|null); - - /** EndpointInfo protocol */ - protocol?: (string|null); - - /** EndpointInfo sourcePort */ - sourcePort?: (number|null); - - /** EndpointInfo destinationPort */ - destinationPort?: (number|null); - - /** EndpointInfo sourceNetworkUri */ - sourceNetworkUri?: (string|null); - - /** EndpointInfo destinationNetworkUri */ - destinationNetworkUri?: (string|null); - - /** EndpointInfo sourceAgentUri */ - sourceAgentUri?: (string|null); - } - - /** Represents an EndpointInfo. */ - class EndpointInfo implements IEndpointInfo { - - /** - * Constructs a new EndpointInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo); - - /** EndpointInfo sourceIp. */ - public sourceIp: string; - - /** EndpointInfo destinationIp. */ - public destinationIp: string; - - /** EndpointInfo protocol. */ - public protocol: string; - - /** EndpointInfo sourcePort. */ - public sourcePort: number; - - /** EndpointInfo destinationPort. */ - public destinationPort: number; - - /** EndpointInfo sourceNetworkUri. */ - public sourceNetworkUri: string; - - /** EndpointInfo destinationNetworkUri. */ - public destinationNetworkUri: string; - - /** EndpointInfo sourceAgentUri. */ - public sourceAgentUri: string; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns EndpointInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IEndpointInfo): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @param message EndpointInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IEndpointInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Verifies an EndpointInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EndpointInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.EndpointInfo; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @param message EndpointInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.EndpointInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EndpointInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EndpointInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeliverInfo. */ - interface IDeliverInfo { - - /** DeliverInfo target */ - target?: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null); - - /** DeliverInfo resourceUri */ - resourceUri?: (string|null); - - /** DeliverInfo ipAddress */ - ipAddress?: (string|null); - - /** DeliverInfo storageBucket */ - storageBucket?: (string|null); - - /** DeliverInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - } - - /** Represents a DeliverInfo. */ - class DeliverInfo implements IDeliverInfo { - - /** - * Constructs a new DeliverInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo); - - /** DeliverInfo target. */ - public target: (google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.DeliverInfo.Target); - - /** DeliverInfo resourceUri. */ - public resourceUri: string; - - /** DeliverInfo ipAddress. */ - public ipAddress: string; - - /** DeliverInfo storageBucket. */ - public storageBucket: string; - - /** DeliverInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DeliverInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeliverInfo): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @param message DeliverInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeliverInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Verifies a DeliverInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeliverInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeliverInfo; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @param message DeliverInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DeliverInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeliverInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeliverInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DeliverInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - INSTANCE = 1, - INTERNET = 2, - GOOGLE_API = 3, - GKE_MASTER = 4, - CLOUD_SQL_INSTANCE = 5, - PSC_PUBLISHED_SERVICE = 6, - PSC_GOOGLE_API = 7, - PSC_VPC_SC = 8, - SERVERLESS_NEG = 9, - STORAGE_BUCKET = 10, - PRIVATE_NETWORK = 11, - CLOUD_FUNCTION = 12, - APP_ENGINE_VERSION = 13, - CLOUD_RUN_REVISION = 14, - GOOGLE_MANAGED_SERVICE = 15, - REDIS_INSTANCE = 16, - REDIS_CLUSTER = 17 - } - } - - /** Properties of a ForwardInfo. */ - interface IForwardInfo { - - /** ForwardInfo target */ - target?: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null); - - /** ForwardInfo resourceUri */ - resourceUri?: (string|null); - - /** ForwardInfo ipAddress */ - ipAddress?: (string|null); - } - - /** Represents a ForwardInfo. */ - class ForwardInfo implements IForwardInfo { - - /** - * Constructs a new ForwardInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo); - - /** ForwardInfo target. */ - public target: (google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|keyof typeof google.cloud.networkmanagement.v1beta1.ForwardInfo.Target); - - /** ForwardInfo resourceUri. */ - public resourceUri: string; - - /** ForwardInfo ipAddress. */ - public ipAddress: string; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ForwardInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IForwardInfo): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @param message ForwardInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IForwardInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Verifies a ForwardInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ForwardInfo; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @param message ForwardInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ForwardInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ForwardInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ForwardInfo { - - /** Target enum. */ - enum Target { - TARGET_UNSPECIFIED = 0, - PEERING_VPC = 1, - VPN_GATEWAY = 2, - INTERCONNECT = 3, - GKE_MASTER = 4, - IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5, - CLOUD_SQL_INSTANCE = 6, - ANOTHER_PROJECT = 7, - NCC_HUB = 8, - ROUTER_APPLIANCE = 9 - } - } - - /** Properties of an AbortInfo. */ - interface IAbortInfo { - - /** AbortInfo cause */ - cause?: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null); - - /** AbortInfo resourceUri */ - resourceUri?: (string|null); - - /** AbortInfo ipAddress */ - ipAddress?: (string|null); - - /** AbortInfo projectsMissingPermission */ - projectsMissingPermission?: (string[]|null); - } - - /** Represents an AbortInfo. */ - class AbortInfo implements IAbortInfo { - - /** - * Constructs a new AbortInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo); - - /** AbortInfo cause. */ - public cause: (google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.AbortInfo.Cause); - - /** AbortInfo resourceUri. */ - public resourceUri: string; - - /** AbortInfo ipAddress. */ - public ipAddress: string; - - /** AbortInfo projectsMissingPermission. */ - public projectsMissingPermission: string[]; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AbortInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IAbortInfo): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @param message AbortInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAbortInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Verifies an AbortInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AbortInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AbortInfo; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @param message AbortInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.AbortInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AbortInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AbortInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AbortInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_NETWORK = 1, - UNKNOWN_PROJECT = 3, - NO_EXTERNAL_IP = 7, - UNINTENDED_DESTINATION = 8, - SOURCE_ENDPOINT_NOT_FOUND = 11, - MISMATCHED_SOURCE_NETWORK = 12, - DESTINATION_ENDPOINT_NOT_FOUND = 13, - MISMATCHED_DESTINATION_NETWORK = 14, - UNKNOWN_IP = 2, - GOOGLE_MANAGED_SERVICE_UNKNOWN_IP = 32, - SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK = 23, - PERMISSION_DENIED = 4, - PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS = 28, - PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS = 29, - PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS = 36, - NO_SOURCE_LOCATION = 5, - INVALID_ARGUMENT = 6, - TRACE_TOO_LONG = 9, - INTERNAL_ERROR = 10, - UNSUPPORTED = 15, - MISMATCHED_IP_VERSION = 16, - GKE_KONNECTIVITY_PROXY_UNSUPPORTED = 17, - RESOURCE_CONFIG_NOT_FOUND = 18, - VM_INSTANCE_CONFIG_NOT_FOUND = 24, - NETWORK_CONFIG_NOT_FOUND = 25, - FIREWALL_CONFIG_NOT_FOUND = 26, - ROUTE_CONFIG_NOT_FOUND = 27, - GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT = 19, - SOURCE_PSC_CLOUD_SQL_UNSUPPORTED = 20, - SOURCE_REDIS_CLUSTER_UNSUPPORTED = 34, - SOURCE_REDIS_INSTANCE_UNSUPPORTED = 35, - SOURCE_FORWARDING_RULE_UNSUPPORTED = 21, - NON_ROUTABLE_IP_ADDRESS = 22, - UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT = 30, - UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG = 31 - } - } - - /** Properties of a DropInfo. */ - interface IDropInfo { - - /** DropInfo cause */ - cause?: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null); - - /** DropInfo resourceUri */ - resourceUri?: (string|null); - - /** DropInfo sourceIp */ - sourceIp?: (string|null); - - /** DropInfo destinationIp */ - destinationIp?: (string|null); - - /** DropInfo region */ - region?: (string|null); - } - - /** Represents a DropInfo. */ - class DropInfo implements IDropInfo { - - /** - * Constructs a new DropInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo); - - /** DropInfo cause. */ - public cause: (google.cloud.networkmanagement.v1beta1.DropInfo.Cause|keyof typeof google.cloud.networkmanagement.v1beta1.DropInfo.Cause); - - /** DropInfo resourceUri. */ - public resourceUri: string; - - /** DropInfo sourceIp. */ - public sourceIp: string; - - /** DropInfo destinationIp. */ - public destinationIp: string; - - /** DropInfo region. */ - public region: string; - - /** - * Creates a new DropInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DropInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDropInfo): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @param message DropInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDropInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Verifies a DropInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DropInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DropInfo; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @param message DropInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DropInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DropInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DropInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DropInfo { - - /** Cause enum. */ - enum Cause { - CAUSE_UNSPECIFIED = 0, - UNKNOWN_EXTERNAL_ADDRESS = 1, - FOREIGN_IP_DISALLOWED = 2, - FIREWALL_RULE = 3, - NO_ROUTE = 4, - ROUTE_BLACKHOLE = 5, - ROUTE_WRONG_NETWORK = 6, - ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED = 42, - ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND = 43, - ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK = 49, - ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP = 50, - ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH = 51, - ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED = 52, - ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID = 53, - NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS = 44, - VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH = 45, - VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH = 46, - PRIVATE_TRAFFIC_TO_INTERNET = 7, - PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8, - PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED = 47, - NO_EXTERNAL_ADDRESS = 9, - UNKNOWN_INTERNAL_ADDRESS = 10, - FORWARDING_RULE_MISMATCH = 11, - FORWARDING_RULE_NO_INSTANCES = 12, - FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13, - INSTANCE_NOT_RUNNING = 14, - GKE_CLUSTER_NOT_RUNNING = 27, - CLOUD_SQL_INSTANCE_NOT_RUNNING = 28, - REDIS_INSTANCE_NOT_RUNNING = 68, - REDIS_CLUSTER_NOT_RUNNING = 69, - TRAFFIC_TYPE_BLOCKED = 15, - GKE_MASTER_UNAUTHORIZED_ACCESS = 16, - CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17, - DROPPED_INSIDE_GKE_SERVICE = 18, - DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19, - GOOGLE_MANAGED_SERVICE_NO_PEERING = 20, - GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT = 38, - GKE_PSC_ENDPOINT_MISSING = 36, - CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21, - GKE_CONTROL_PLANE_REGION_MISMATCH = 30, - PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION = 31, - GKE_CONTROL_PLANE_NO_ROUTE = 32, - CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC = 33, - PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION = 34, - CLOUD_SQL_INSTANCE_NO_ROUTE = 35, - CLOUD_SQL_CONNECTOR_REQUIRED = 63, - CLOUD_FUNCTION_NOT_ACTIVE = 22, - VPC_CONNECTOR_NOT_SET = 23, - VPC_CONNECTOR_NOT_RUNNING = 24, - VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED = 60, - VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED = 61, - FORWARDING_RULE_REGION_MISMATCH = 25, - PSC_CONNECTION_NOT_ACCEPTED = 26, - PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK = 41, - PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS = 48, - PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS = 54, - CLOUD_SQL_PSC_NEG_UNSUPPORTED = 58, - NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT = 57, - PSC_TRANSITIVITY_NOT_PROPAGATED = 64, - HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED = 55, - HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED = 56, - CLOUD_RUN_REVISION_NOT_READY = 29, - DROPPED_INSIDE_PSC_SERVICE_PRODUCER = 37, - LOAD_BALANCER_HAS_NO_PROXY_SUBNET = 39, - CLOUD_NAT_NO_ADDRESSES = 40, - ROUTING_LOOP = 59, - DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE = 62, - LOAD_BALANCER_BACKEND_INVALID_NETWORK = 65, - BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED = 66, - DESTINATION_IS_PRIVATE_NAT_IP_RANGE = 67, - DROPPED_INSIDE_REDIS_INSTANCE_SERVICE = 70, - REDIS_INSTANCE_UNSUPPORTED_PORT = 71, - REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS = 72, - REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK = 73, - REDIS_INSTANCE_NO_EXTERNAL_IP = 74, - REDIS_INSTANCE_UNSUPPORTED_PROTOCOL = 78, - DROPPED_INSIDE_REDIS_CLUSTER_SERVICE = 75, - REDIS_CLUSTER_UNSUPPORTED_PORT = 76, - REDIS_CLUSTER_NO_EXTERNAL_IP = 77, - REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, - NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, - NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, - PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 - } - } - - /** Properties of a GKEMasterInfo. */ - interface IGKEMasterInfo { - - /** GKEMasterInfo clusterUri */ - clusterUri?: (string|null); - - /** GKEMasterInfo clusterNetworkUri */ - clusterNetworkUri?: (string|null); - - /** GKEMasterInfo internalIp */ - internalIp?: (string|null); - - /** GKEMasterInfo externalIp */ - externalIp?: (string|null); - - /** GKEMasterInfo dnsEndpoint */ - dnsEndpoint?: (string|null); - } - - /** Represents a GKEMasterInfo. */ - class GKEMasterInfo implements IGKEMasterInfo { - - /** - * Constructs a new GKEMasterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo); - - /** GKEMasterInfo clusterUri. */ - public clusterUri: string; - - /** GKEMasterInfo clusterNetworkUri. */ - public clusterNetworkUri: string; - - /** GKEMasterInfo internalIp. */ - public internalIp: string; - - /** GKEMasterInfo externalIp. */ - public externalIp: string; - - /** GKEMasterInfo dnsEndpoint. */ - public dnsEndpoint: string; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GKEMasterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @param message GKEMasterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGKEMasterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Verifies a GKEMasterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GKEMasterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GKEMasterInfo; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @param message GKEMasterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GKEMasterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GKEMasterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GKEMasterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudSQLInstanceInfo. */ - interface ICloudSQLInstanceInfo { - - /** CloudSQLInstanceInfo displayName */ - displayName?: (string|null); - - /** CloudSQLInstanceInfo uri */ - uri?: (string|null); - - /** CloudSQLInstanceInfo networkUri */ - networkUri?: (string|null); - - /** CloudSQLInstanceInfo internalIp */ - internalIp?: (string|null); - - /** CloudSQLInstanceInfo externalIp */ - externalIp?: (string|null); - - /** CloudSQLInstanceInfo region */ - region?: (string|null); - } - - /** Represents a CloudSQLInstanceInfo. */ - class CloudSQLInstanceInfo implements ICloudSQLInstanceInfo { - - /** - * Constructs a new CloudSQLInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo); - - /** CloudSQLInstanceInfo displayName. */ - public displayName: string; - - /** CloudSQLInstanceInfo uri. */ - public uri: string; - - /** CloudSQLInstanceInfo networkUri. */ - public networkUri: string; - - /** CloudSQLInstanceInfo internalIp. */ - public internalIp: string; - - /** CloudSQLInstanceInfo externalIp. */ - public externalIp: string; - - /** CloudSQLInstanceInfo region. */ - public region: string; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudSQLInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @param message CloudSQLInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudSQLInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @param message CloudSQLInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisInstanceInfo. */ - interface IRedisInstanceInfo { - - /** RedisInstanceInfo displayName */ - displayName?: (string|null); - - /** RedisInstanceInfo uri */ - uri?: (string|null); - - /** RedisInstanceInfo networkUri */ - networkUri?: (string|null); - - /** RedisInstanceInfo primaryEndpointIp */ - primaryEndpointIp?: (string|null); - - /** RedisInstanceInfo readEndpointIp */ - readEndpointIp?: (string|null); - - /** RedisInstanceInfo region */ - region?: (string|null); - } - - /** Represents a RedisInstanceInfo. */ - class RedisInstanceInfo implements IRedisInstanceInfo { - - /** - * Constructs a new RedisInstanceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo); - - /** RedisInstanceInfo displayName. */ - public displayName: string; - - /** RedisInstanceInfo uri. */ - public uri: string; - - /** RedisInstanceInfo networkUri. */ - public networkUri: string; - - /** RedisInstanceInfo primaryEndpointIp. */ - public primaryEndpointIp: string; - - /** RedisInstanceInfo readEndpointIp. */ - public readEndpointIp: string; - - /** RedisInstanceInfo region. */ - public region: string; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisInstanceInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @param message RedisInstanceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Verifies a RedisInstanceInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisInstanceInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisInstanceInfo; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @param message RedisInstanceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisInstanceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisInstanceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedisClusterInfo. */ - interface IRedisClusterInfo { - - /** RedisClusterInfo displayName */ - displayName?: (string|null); - - /** RedisClusterInfo uri */ - uri?: (string|null); - - /** RedisClusterInfo networkUri */ - networkUri?: (string|null); - - /** RedisClusterInfo discoveryEndpointIpAddress */ - discoveryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo secondaryEndpointIpAddress */ - secondaryEndpointIpAddress?: (string|null); - - /** RedisClusterInfo location */ - location?: (string|null); - } - - /** Represents a RedisClusterInfo. */ - class RedisClusterInfo implements IRedisClusterInfo { - - /** - * Constructs a new RedisClusterInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo); - - /** RedisClusterInfo displayName. */ - public displayName: string; - - /** RedisClusterInfo uri. */ - public uri: string; - - /** RedisClusterInfo networkUri. */ - public networkUri: string; - - /** RedisClusterInfo discoveryEndpointIpAddress. */ - public discoveryEndpointIpAddress: string; - - /** RedisClusterInfo secondaryEndpointIpAddress. */ - public secondaryEndpointIpAddress: string; - - /** RedisClusterInfo location. */ - public location: string; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RedisClusterInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @param message RedisClusterInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRedisClusterInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Verifies a RedisClusterInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedisClusterInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RedisClusterInfo; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @param message RedisClusterInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RedisClusterInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedisClusterInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedisClusterInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudFunctionInfo. */ - interface ICloudFunctionInfo { - - /** CloudFunctionInfo displayName */ - displayName?: (string|null); - - /** CloudFunctionInfo uri */ - uri?: (string|null); - - /** CloudFunctionInfo location */ - location?: (string|null); - - /** CloudFunctionInfo versionId */ - versionId?: (number|Long|string|null); - } - - /** Represents a CloudFunctionInfo. */ - class CloudFunctionInfo implements ICloudFunctionInfo { - - /** - * Constructs a new CloudFunctionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo); - - /** CloudFunctionInfo displayName. */ - public displayName: string; - - /** CloudFunctionInfo uri. */ - public uri: string; - - /** CloudFunctionInfo location. */ - public location: string; - - /** CloudFunctionInfo versionId. */ - public versionId: (number|Long|string); - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudFunctionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @param message CloudFunctionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Verifies a CloudFunctionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudFunctionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudFunctionInfo; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @param message CloudFunctionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudFunctionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudFunctionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudRunRevisionInfo. */ - interface ICloudRunRevisionInfo { - - /** CloudRunRevisionInfo displayName */ - displayName?: (string|null); - - /** CloudRunRevisionInfo uri */ - uri?: (string|null); - - /** CloudRunRevisionInfo location */ - location?: (string|null); - - /** CloudRunRevisionInfo serviceUri */ - serviceUri?: (string|null); - } - - /** Represents a CloudRunRevisionInfo. */ - class CloudRunRevisionInfo implements ICloudRunRevisionInfo { - - /** - * Constructs a new CloudRunRevisionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo); - - /** CloudRunRevisionInfo displayName. */ - public displayName: string; - - /** CloudRunRevisionInfo uri. */ - public uri: string; - - /** CloudRunRevisionInfo location. */ - public location: string; - - /** CloudRunRevisionInfo serviceUri. */ - public serviceUri: string; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudRunRevisionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @param message CloudRunRevisionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Verifies a CloudRunRevisionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudRunRevisionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @param message CloudRunRevisionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AppEngineVersionInfo. */ - interface IAppEngineVersionInfo { - - /** AppEngineVersionInfo displayName */ - displayName?: (string|null); - - /** AppEngineVersionInfo uri */ - uri?: (string|null); - - /** AppEngineVersionInfo runtime */ - runtime?: (string|null); - - /** AppEngineVersionInfo environment */ - environment?: (string|null); - } - - /** Represents an AppEngineVersionInfo. */ - class AppEngineVersionInfo implements IAppEngineVersionInfo { - - /** - * Constructs a new AppEngineVersionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo); - - /** AppEngineVersionInfo displayName. */ - public displayName: string; - - /** AppEngineVersionInfo uri. */ - public uri: string; - - /** AppEngineVersionInfo runtime. */ - public runtime: string; - - /** AppEngineVersionInfo environment. */ - public environment: string; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AppEngineVersionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @param message AppEngineVersionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Verifies an AppEngineVersionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AppEngineVersionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @param message AppEngineVersionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcConnectorInfo. */ - interface IVpcConnectorInfo { - - /** VpcConnectorInfo displayName */ - displayName?: (string|null); - - /** VpcConnectorInfo uri */ - uri?: (string|null); - - /** VpcConnectorInfo location */ - location?: (string|null); - } - - /** Represents a VpcConnectorInfo. */ - class VpcConnectorInfo implements IVpcConnectorInfo { - - /** - * Constructs a new VpcConnectorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo); - - /** VpcConnectorInfo displayName. */ - public displayName: string; - - /** VpcConnectorInfo uri. */ - public uri: string; - - /** VpcConnectorInfo location. */ - public location: string; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcConnectorInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @param message VpcConnectorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Verifies a VpcConnectorInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcConnectorInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcConnectorInfo; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @param message VpcConnectorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcConnectorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcConnectorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NatInfo. */ - interface INatInfo { - - /** NatInfo type */ - type?: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type|null); - - /** NatInfo protocol */ - protocol?: (string|null); - - /** NatInfo networkUri */ - networkUri?: (string|null); - - /** NatInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** NatInfo newSourceIp */ - newSourceIp?: (string|null); - - /** NatInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** NatInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** NatInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** NatInfo newSourcePort */ - newSourcePort?: (number|null); - - /** NatInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** NatInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** NatInfo routerUri */ - routerUri?: (string|null); - - /** NatInfo natGatewayName */ - natGatewayName?: (string|null); - } - - /** Represents a NatInfo. */ - class NatInfo implements INatInfo { - - /** - * Constructs a new NatInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.INatInfo); - - /** NatInfo type. */ - public type: (google.cloud.networkmanagement.v1beta1.NatInfo.Type|keyof typeof google.cloud.networkmanagement.v1beta1.NatInfo.Type); - - /** NatInfo protocol. */ - public protocol: string; - - /** NatInfo networkUri. */ - public networkUri: string; - - /** NatInfo oldSourceIp. */ - public oldSourceIp: string; - - /** NatInfo newSourceIp. */ - public newSourceIp: string; - - /** NatInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** NatInfo newDestinationIp. */ - public newDestinationIp: string; - - /** NatInfo oldSourcePort. */ - public oldSourcePort: number; - - /** NatInfo newSourcePort. */ - public newSourcePort: number; - - /** NatInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** NatInfo newDestinationPort. */ - public newDestinationPort: number; - - /** NatInfo routerUri. */ - public routerUri: string; - - /** NatInfo natGatewayName. */ - public natGatewayName: string; - - /** - * Creates a new NatInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns NatInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.INatInfo): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @param message NatInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.INatInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Verifies a NatInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NatInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.NatInfo; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @param message NatInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.NatInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NatInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NatInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NatInfo { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - INTERNAL_TO_EXTERNAL = 1, - EXTERNAL_TO_INTERNAL = 2, - CLOUD_NAT = 3, - PRIVATE_SERVICE_CONNECT = 4 - } - } - - /** Properties of a ProxyConnectionInfo. */ - interface IProxyConnectionInfo { - - /** ProxyConnectionInfo protocol */ - protocol?: (string|null); - - /** ProxyConnectionInfo oldSourceIp */ - oldSourceIp?: (string|null); - - /** ProxyConnectionInfo newSourceIp */ - newSourceIp?: (string|null); - - /** ProxyConnectionInfo oldDestinationIp */ - oldDestinationIp?: (string|null); - - /** ProxyConnectionInfo newDestinationIp */ - newDestinationIp?: (string|null); - - /** ProxyConnectionInfo oldSourcePort */ - oldSourcePort?: (number|null); - - /** ProxyConnectionInfo newSourcePort */ - newSourcePort?: (number|null); - - /** ProxyConnectionInfo oldDestinationPort */ - oldDestinationPort?: (number|null); - - /** ProxyConnectionInfo newDestinationPort */ - newDestinationPort?: (number|null); - - /** ProxyConnectionInfo subnetUri */ - subnetUri?: (string|null); - - /** ProxyConnectionInfo networkUri */ - networkUri?: (string|null); - } - - /** Represents a ProxyConnectionInfo. */ - class ProxyConnectionInfo implements IProxyConnectionInfo { - - /** - * Constructs a new ProxyConnectionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo); - - /** ProxyConnectionInfo protocol. */ - public protocol: string; - - /** ProxyConnectionInfo oldSourceIp. */ - public oldSourceIp: string; - - /** ProxyConnectionInfo newSourceIp. */ - public newSourceIp: string; - - /** ProxyConnectionInfo oldDestinationIp. */ - public oldDestinationIp: string; - - /** ProxyConnectionInfo newDestinationIp. */ - public newDestinationIp: string; - - /** ProxyConnectionInfo oldSourcePort. */ - public oldSourcePort: number; - - /** ProxyConnectionInfo newSourcePort. */ - public newSourcePort: number; - - /** ProxyConnectionInfo oldDestinationPort. */ - public oldDestinationPort: number; - - /** ProxyConnectionInfo newDestinationPort. */ - public newDestinationPort: number; - - /** ProxyConnectionInfo subnetUri. */ - public subnetUri: string; - - /** ProxyConnectionInfo networkUri. */ - public networkUri: string; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ProxyConnectionInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @param message ProxyConnectionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Verifies a ProxyConnectionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProxyConnectionInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @param message ProxyConnectionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadBalancerBackendInfo. */ - interface ILoadBalancerBackendInfo { - - /** LoadBalancerBackendInfo name */ - name?: (string|null); - - /** LoadBalancerBackendInfo instanceUri */ - instanceUri?: (string|null); - - /** LoadBalancerBackendInfo backendServiceUri */ - backendServiceUri?: (string|null); - - /** LoadBalancerBackendInfo instanceGroupUri */ - instanceGroupUri?: (string|null); - - /** LoadBalancerBackendInfo networkEndpointGroupUri */ - networkEndpointGroupUri?: (string|null); - - /** LoadBalancerBackendInfo backendBucketUri */ - backendBucketUri?: (string|null); - - /** LoadBalancerBackendInfo pscServiceAttachmentUri */ - pscServiceAttachmentUri?: (string|null); - - /** LoadBalancerBackendInfo pscGoogleApiTarget */ - pscGoogleApiTarget?: (string|null); - - /** LoadBalancerBackendInfo healthCheckUri */ - healthCheckUri?: (string|null); - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState */ - healthCheckFirewallsConfigState?: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null); - } - - /** Represents a LoadBalancerBackendInfo. */ - class LoadBalancerBackendInfo implements ILoadBalancerBackendInfo { - - /** - * Constructs a new LoadBalancerBackendInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo); - - /** LoadBalancerBackendInfo name. */ - public name: string; - - /** LoadBalancerBackendInfo instanceUri. */ - public instanceUri: string; - - /** LoadBalancerBackendInfo backendServiceUri. */ - public backendServiceUri: string; - - /** LoadBalancerBackendInfo instanceGroupUri. */ - public instanceGroupUri: string; - - /** LoadBalancerBackendInfo networkEndpointGroupUri. */ - public networkEndpointGroupUri: string; - - /** LoadBalancerBackendInfo backendBucketUri. */ - public backendBucketUri: string; - - /** LoadBalancerBackendInfo pscServiceAttachmentUri. */ - public pscServiceAttachmentUri: string; - - /** LoadBalancerBackendInfo pscGoogleApiTarget. */ - public pscGoogleApiTarget: string; - - /** LoadBalancerBackendInfo healthCheckUri. */ - public healthCheckUri: string; - - /** LoadBalancerBackendInfo healthCheckFirewallsConfigState. */ - public healthCheckFirewallsConfigState: (google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|keyof typeof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState); - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadBalancerBackendInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @param message LoadBalancerBackendInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadBalancerBackendInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @param message LoadBalancerBackendInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LoadBalancerBackendInfo { - - /** HealthCheckFirewallsConfigState enum. */ - enum HealthCheckFirewallsConfigState { - HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED = 0, - FIREWALLS_CONFIGURED = 1, - FIREWALLS_PARTIALLY_CONFIGURED = 2, - FIREWALLS_NOT_CONFIGURED = 3, - FIREWALLS_UNSUPPORTED = 4 - } - } - - /** LoadBalancerType enum. */ - enum LoadBalancerType { - LOAD_BALANCER_TYPE_UNSPECIFIED = 0, - HTTPS_ADVANCED_LOAD_BALANCER = 1, - HTTPS_LOAD_BALANCER = 2, - REGIONAL_HTTPS_LOAD_BALANCER = 3, - INTERNAL_HTTPS_LOAD_BALANCER = 4, - SSL_PROXY_LOAD_BALANCER = 5, - TCP_PROXY_LOAD_BALANCER = 6, - INTERNAL_TCP_PROXY_LOAD_BALANCER = 7, - NETWORK_LOAD_BALANCER = 8, - LEGACY_NETWORK_LOAD_BALANCER = 9, - TCP_UDP_INTERNAL_LOAD_BALANCER = 10 - } - - /** Properties of a StorageBucketInfo. */ - interface IStorageBucketInfo { - - /** StorageBucketInfo bucket */ - bucket?: (string|null); - } - - /** Represents a StorageBucketInfo. */ - class StorageBucketInfo implements IStorageBucketInfo { - - /** - * Constructs a new StorageBucketInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo); - - /** StorageBucketInfo bucket. */ - public bucket: string; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageBucketInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @param message StorageBucketInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IStorageBucketInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Verifies a StorageBucketInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageBucketInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.StorageBucketInfo; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @param message StorageBucketInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.StorageBucketInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageBucketInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageBucketInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServerlessNegInfo. */ - interface IServerlessNegInfo { - - /** ServerlessNegInfo negUri */ - negUri?: (string|null); - } - - /** Represents a ServerlessNegInfo. */ - class ServerlessNegInfo implements IServerlessNegInfo { - - /** - * Constructs a new ServerlessNegInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo); - - /** ServerlessNegInfo negUri. */ - public negUri: string; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ServerlessNegInfo instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @param message ServerlessNegInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IServerlessNegInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Verifies a ServerlessNegInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServerlessNegInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ServerlessNegInfo; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @param message ServerlessNegInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ServerlessNegInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServerlessNegInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a ReachabilityService */ - class ReachabilityService extends $protobuf.rpc.Service { - - /** - * Constructs a new ReachabilityService 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 ReachabilityService 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): ReachabilityService; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback): void; - - /** - * Calls ListConnectivityTests. - * @param request ListConnectivityTestsRequest message or plain object - * @returns Promise - */ - public listConnectivityTests(request: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): Promise; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ConnectivityTest - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback): void; - - /** - * Calls GetConnectivityTest. - * @param request GetConnectivityTestRequest message or plain object - * @returns Promise - */ - public getConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): Promise; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback): void; - - /** - * Calls CreateConnectivityTest. - * @param request CreateConnectivityTestRequest message or plain object - * @returns Promise - */ - public createConnectivityTest(request: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): Promise; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback): void; - - /** - * Calls UpdateConnectivityTest. - * @param request UpdateConnectivityTestRequest message or plain object - * @returns Promise - */ - public updateConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): Promise; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback): void; - - /** - * Calls RerunConnectivityTest. - * @param request RerunConnectivityTestRequest message or plain object - * @returns Promise - */ - public rerunConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): Promise; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, callback: google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback): void; - - /** - * Calls DeleteConnectivityTest. - * @param request DeleteConnectivityTestRequest message or plain object - * @returns Promise - */ - public deleteConnectivityTest(request: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): Promise; - } - - namespace ReachabilityService { - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. - * @param error Error, if any - * @param [response] ListConnectivityTestsResponse - */ - type ListConnectivityTestsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. - * @param error Error, if any - * @param [response] ConnectivityTest - */ - type GetConnectivityTestCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ConnectivityTest) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type RerunConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteConnectivityTestCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a ListConnectivityTestsRequest. */ - interface IListConnectivityTestsRequest { - - /** ListConnectivityTestsRequest parent */ - parent?: (string|null); - - /** ListConnectivityTestsRequest pageSize */ - pageSize?: (number|null); - - /** ListConnectivityTestsRequest pageToken */ - pageToken?: (string|null); - - /** ListConnectivityTestsRequest filter */ - filter?: (string|null); - - /** ListConnectivityTestsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListConnectivityTestsRequest. */ - class ListConnectivityTestsRequest implements IListConnectivityTestsRequest { - - /** - * Constructs a new ListConnectivityTestsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest); - - /** ListConnectivityTestsRequest parent. */ - public parent: string; - - /** ListConnectivityTestsRequest pageSize. */ - public pageSize: number; - - /** ListConnectivityTestsRequest pageToken. */ - public pageToken: string; - - /** ListConnectivityTestsRequest filter. */ - public filter: string; - - /** ListConnectivityTestsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @param message ListConnectivityTestsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest; - - /** - * Creates a plain object from a ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @param message ListConnectivityTestsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListConnectivityTestsResponse. */ - interface IListConnectivityTestsResponse { - - /** ListConnectivityTestsResponse resources */ - resources?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null); - - /** ListConnectivityTestsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListConnectivityTestsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListConnectivityTestsResponse. */ - class ListConnectivityTestsResponse implements IListConnectivityTestsResponse { - - /** - * Constructs a new ListConnectivityTestsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse); - - /** ListConnectivityTestsResponse resources. */ - public resources: google.cloud.networkmanagement.v1beta1.IConnectivityTest[]; - - /** ListConnectivityTestsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListConnectivityTestsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListConnectivityTestsResponse instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @param message ListConnectivityTestsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListConnectivityTestsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse; - - /** - * Creates a plain object from a ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @param message ListConnectivityTestsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListConnectivityTestsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetConnectivityTestRequest. */ - interface IGetConnectivityTestRequest { - - /** GetConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a GetConnectivityTestRequest. */ - class GetConnectivityTestRequest implements IGetConnectivityTestRequest { - - /** - * Constructs a new GetConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest); - - /** GetConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @param message GetConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Verifies a GetConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @param message GetConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateConnectivityTestRequest. */ - interface ICreateConnectivityTestRequest { - - /** CreateConnectivityTestRequest parent */ - parent?: (string|null); - - /** CreateConnectivityTestRequest testId */ - testId?: (string|null); - - /** CreateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - } - - /** Represents a CreateConnectivityTestRequest. */ - class CreateConnectivityTestRequest implements ICreateConnectivityTestRequest { - - /** - * Constructs a new CreateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest); - - /** CreateConnectivityTestRequest parent. */ - public parent: string; - - /** CreateConnectivityTestRequest testId. */ - public testId: string; - - /** CreateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @param message CreateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message CreateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateConnectivityTestRequest. */ - interface IUpdateConnectivityTestRequest { - - /** UpdateConnectivityTestRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource */ - resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - } - - /** Represents an UpdateConnectivityTestRequest. */ - class UpdateConnectivityTestRequest implements IUpdateConnectivityTestRequest { - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest); - - /** UpdateConnectivityTestRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateConnectivityTestRequest resource. */ - public resource?: (google.cloud.networkmanagement.v1beta1.IConnectivityTest|null); - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @param message UpdateConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @param message UpdateConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteConnectivityTestRequest. */ - interface IDeleteConnectivityTestRequest { - - /** DeleteConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a DeleteConnectivityTestRequest. */ - class DeleteConnectivityTestRequest implements IDeleteConnectivityTestRequest { - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest); - - /** DeleteConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @param message DeleteConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @param message DeleteConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RerunConnectivityTestRequest. */ - interface IRerunConnectivityTestRequest { - - /** RerunConnectivityTestRequest name */ - name?: (string|null); - } - - /** Represents a RerunConnectivityTestRequest. */ - class RerunConnectivityTestRequest implements IRerunConnectivityTestRequest { - - /** - * Constructs a new RerunConnectivityTestRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest); - - /** RerunConnectivityTestRequest name. */ - public name: string; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RerunConnectivityTestRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @param message RerunConnectivityTestRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RerunConnectivityTestRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @param message RerunConnectivityTestRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RerunConnectivityTestRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @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 statusDetail */ - statusDetail?: (string|null); - - /** OperationMetadata cancelRequested */ - cancelRequested?: (boolean|null); - - /** OperationMetadata apiVersion */ - apiVersion?: (string|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.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 statusDetail. */ - public statusDetail: string; - - /** OperationMetadata cancelRequested. */ - public cancelRequested: boolean; - - /** OperationMetadata apiVersion. */ - public apiVersion: string; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IOperationMetadata): google.cloud.networkmanagement.v1beta1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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; - } - - /** Represents a VpcFlowLogsService */ - class VpcFlowLogsService extends $protobuf.rpc.Service { - - /** - * Constructs a new VpcFlowLogsService 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 VpcFlowLogsService 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): VpcFlowLogsService; - - /** - * Calls ListVpcFlowLogsConfigs. - * @param request ListVpcFlowLogsConfigsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse - */ - public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback): void; - - /** - * Calls ListVpcFlowLogsConfigs. - * @param request ListVpcFlowLogsConfigsRequest message or plain object - * @returns Promise - */ - public listVpcFlowLogsConfigs(request: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): Promise; - - /** - * Calls GetVpcFlowLogsConfig. - * @param request GetVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and VpcFlowLogsConfig - */ - public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback): void; - - /** - * Calls GetVpcFlowLogsConfig. - * @param request GetVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public getVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): Promise; - - /** - * Calls CreateVpcFlowLogsConfig. - * @param request CreateVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback): void; - - /** - * Calls CreateVpcFlowLogsConfig. - * @param request CreateVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public createVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): Promise; - - /** - * Calls UpdateVpcFlowLogsConfig. - * @param request UpdateVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback): void; - - /** - * Calls UpdateVpcFlowLogsConfig. - * @param request UpdateVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public updateVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): Promise; - - /** - * Calls DeleteVpcFlowLogsConfig. - * @param request DeleteVpcFlowLogsConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, callback: google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback): void; - - /** - * Calls DeleteVpcFlowLogsConfig. - * @param request DeleteVpcFlowLogsConfigRequest message or plain object - * @returns Promise - */ - public deleteVpcFlowLogsConfig(request: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): Promise; - } - - namespace VpcFlowLogsService { - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. - * @param error Error, if any - * @param [response] ListVpcFlowLogsConfigsResponse - */ - type ListVpcFlowLogsConfigsCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] VpcFlowLogsConfig - */ - type GetVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteVpcFlowLogsConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } - - /** Properties of a ListVpcFlowLogsConfigsRequest. */ - interface IListVpcFlowLogsConfigsRequest { - - /** ListVpcFlowLogsConfigsRequest parent */ - parent?: (string|null); - - /** ListVpcFlowLogsConfigsRequest pageSize */ - pageSize?: (number|null); - - /** ListVpcFlowLogsConfigsRequest pageToken */ - pageToken?: (string|null); - - /** ListVpcFlowLogsConfigsRequest filter */ - filter?: (string|null); - - /** ListVpcFlowLogsConfigsRequest orderBy */ - orderBy?: (string|null); - } - - /** Represents a ListVpcFlowLogsConfigsRequest. */ - class ListVpcFlowLogsConfigsRequest implements IListVpcFlowLogsConfigsRequest { - - /** - * Constructs a new ListVpcFlowLogsConfigsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest); - - /** ListVpcFlowLogsConfigsRequest parent. */ - public parent: string; - - /** ListVpcFlowLogsConfigsRequest pageSize. */ - public pageSize: number; - - /** ListVpcFlowLogsConfigsRequest pageToken. */ - public pageToken: string; - - /** ListVpcFlowLogsConfigsRequest filter. */ - public filter: string; - - /** ListVpcFlowLogsConfigsRequest orderBy. */ - public orderBy: string; - - /** - * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVpcFlowLogsConfigsRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Verifies a ListVpcFlowLogsConfigsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVpcFlowLogsConfigsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest; - - /** - * Creates a plain object from a ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. - * @param message ListVpcFlowLogsConfigsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVpcFlowLogsConfigsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListVpcFlowLogsConfigsResponse. */ - interface IListVpcFlowLogsConfigsResponse { - - /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs */ - vpcFlowLogsConfigs?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null); - - /** ListVpcFlowLogsConfigsResponse nextPageToken */ - nextPageToken?: (string|null); - - /** ListVpcFlowLogsConfigsResponse unreachable */ - unreachable?: (string[]|null); - } - - /** Represents a ListVpcFlowLogsConfigsResponse. */ - class ListVpcFlowLogsConfigsResponse implements IListVpcFlowLogsConfigsResponse { - - /** - * Constructs a new ListVpcFlowLogsConfigsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse); - - /** ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. */ - public vpcFlowLogsConfigs: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]; - - /** ListVpcFlowLogsConfigsResponse nextPageToken. */ - public nextPageToken: string; - - /** ListVpcFlowLogsConfigsResponse unreachable. */ - public unreachable: string[]; - - /** - * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListVpcFlowLogsConfigsResponse instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @param message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Verifies a ListVpcFlowLogsConfigsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListVpcFlowLogsConfigsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse; - - /** - * Creates a plain object from a ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. - * @param message ListVpcFlowLogsConfigsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListVpcFlowLogsConfigsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetVpcFlowLogsConfigRequest. */ - interface IGetVpcFlowLogsConfigRequest { - - /** GetVpcFlowLogsConfigRequest name */ - name?: (string|null); - } - - /** Represents a GetVpcFlowLogsConfigRequest. */ - class GetVpcFlowLogsConfigRequest implements IGetVpcFlowLogsConfigRequest { - - /** - * Constructs a new GetVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest); - - /** GetVpcFlowLogsConfigRequest name. */ - public name: string; - - /** - * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Verifies a GetVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message GetVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateVpcFlowLogsConfigRequest. */ - interface ICreateVpcFlowLogsConfigRequest { - - /** CreateVpcFlowLogsConfigRequest parent */ - parent?: (string|null); - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId */ - vpcFlowLogsConfigId?: (string|null); - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ - vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - } - - /** Represents a CreateVpcFlowLogsConfigRequest. */ - class CreateVpcFlowLogsConfigRequest implements ICreateVpcFlowLogsConfigRequest { - - /** - * Constructs a new CreateVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest); - - /** CreateVpcFlowLogsConfigRequest parent. */ - public parent: string; - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. */ - public vpcFlowLogsConfigId: string; - - /** CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ - public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - - /** - * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Verifies a CreateVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message CreateVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateVpcFlowLogsConfigRequest. */ - interface IUpdateVpcFlowLogsConfigRequest { - - /** UpdateVpcFlowLogsConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig */ - vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - } - - /** Represents an UpdateVpcFlowLogsConfigRequest. */ - class UpdateVpcFlowLogsConfigRequest implements IUpdateVpcFlowLogsConfigRequest { - - /** - * Constructs a new UpdateVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest); - - /** UpdateVpcFlowLogsConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. */ - public vpcFlowLogsConfig?: (google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null); - - /** - * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Verifies an UpdateVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message UpdateVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteVpcFlowLogsConfigRequest. */ - interface IDeleteVpcFlowLogsConfigRequest { - - /** DeleteVpcFlowLogsConfigRequest name */ - name?: (string|null); - } - - /** Represents a DeleteVpcFlowLogsConfigRequest. */ - class DeleteVpcFlowLogsConfigRequest implements IDeleteVpcFlowLogsConfigRequest { - - /** - * Constructs a new DeleteVpcFlowLogsConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest); - - /** DeleteVpcFlowLogsConfigRequest name. */ - public name: string; - - /** - * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteVpcFlowLogsConfigRequest instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @param message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Verifies a DeleteVpcFlowLogsConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteVpcFlowLogsConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest; - - /** - * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @param message DeleteVpcFlowLogsConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteVpcFlowLogsConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteVpcFlowLogsConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VpcFlowLogsConfig. */ - interface IVpcFlowLogsConfig { - - /** VpcFlowLogsConfig name */ - name?: (string|null); - - /** VpcFlowLogsConfig description */ - description?: (string|null); - - /** VpcFlowLogsConfig state */ - state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); - - /** VpcFlowLogsConfig aggregationInterval */ - aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); - - /** VpcFlowLogsConfig flowSampling */ - flowSampling?: (number|null); - - /** VpcFlowLogsConfig metadata */ - metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); - - /** VpcFlowLogsConfig metadataFields */ - metadataFields?: (string[]|null); - - /** VpcFlowLogsConfig filterExpr */ - filterExpr?: (string|null); - - /** VpcFlowLogsConfig interconnectAttachment */ - interconnectAttachment?: (string|null); - - /** VpcFlowLogsConfig vpnTunnel */ - vpnTunnel?: (string|null); - - /** VpcFlowLogsConfig labels */ - labels?: ({ [k: string]: string }|null); - - /** VpcFlowLogsConfig createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** VpcFlowLogsConfig updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a VpcFlowLogsConfig. */ - class VpcFlowLogsConfig implements IVpcFlowLogsConfig { - - /** - * Constructs a new VpcFlowLogsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig); - - /** VpcFlowLogsConfig name. */ - public name: string; - - /** VpcFlowLogsConfig description. */ - public description?: (string|null); - - /** VpcFlowLogsConfig state. */ - public state?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null); - - /** VpcFlowLogsConfig aggregationInterval. */ - public aggregationInterval?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null); - - /** VpcFlowLogsConfig flowSampling. */ - public flowSampling?: (number|null); - - /** VpcFlowLogsConfig metadata. */ - public metadata?: (google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|keyof typeof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null); - - /** VpcFlowLogsConfig metadataFields. */ - public metadataFields: string[]; - - /** VpcFlowLogsConfig filterExpr. */ - public filterExpr?: (string|null); - - /** VpcFlowLogsConfig interconnectAttachment. */ - public interconnectAttachment?: (string|null); - - /** VpcFlowLogsConfig vpnTunnel. */ - public vpnTunnel?: (string|null); - - /** VpcFlowLogsConfig labels. */ - public labels: { [k: string]: string }; - - /** VpcFlowLogsConfig createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** VpcFlowLogsConfig updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** VpcFlowLogsConfig _description. */ - public _description?: "description"; - - /** VpcFlowLogsConfig _state. */ - public _state?: "state"; - - /** VpcFlowLogsConfig _aggregationInterval. */ - public _aggregationInterval?: "aggregationInterval"; - - /** VpcFlowLogsConfig _flowSampling. */ - public _flowSampling?: "flowSampling"; - - /** VpcFlowLogsConfig _metadata. */ - public _metadata?: "metadata"; - - /** VpcFlowLogsConfig _filterExpr. */ - public _filterExpr?: "filterExpr"; - - /** VpcFlowLogsConfig targetResource. */ - public targetResource?: ("interconnectAttachment"|"vpnTunnel"); - - /** - * Creates a new VpcFlowLogsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns VpcFlowLogsConfig instance - */ - public static create(properties?: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @param message VpcFlowLogsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @param message VpcFlowLogsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Verifies a VpcFlowLogsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VpcFlowLogsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig; - - /** - * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. - * @param message VpcFlowLogsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VpcFlowLogsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VpcFlowLogsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VpcFlowLogsConfig { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2 - } - - /** AggregationInterval enum. */ - enum AggregationInterval { - AGGREGATION_INTERVAL_UNSPECIFIED = 0, - INTERVAL_5_SEC = 1, - INTERVAL_30_SEC = 2, - INTERVAL_1_MIN = 3, - INTERVAL_5_MIN = 4, - INTERVAL_10_MIN = 5, - INTERVAL_15_MIN = 6 - } - - /** Metadata enum. */ - enum Metadata { - METADATA_UNSPECIFIED = 0, - INCLUDE_ALL_METADATA = 1, - EXCLUDE_ALL_METADATA = 2, - CUSTOM_METADATA = 3 - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a 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 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 - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - - /** FieldOptions .google.api.fieldInfo */ - ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 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 Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of 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-networkmanagement/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js deleted file mode 100644 index 2438db4bb8a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.js +++ /dev/null @@ -1,42968 +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_network_management_protos || ($protobuf.roots._google_cloud_network_management_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.networkmanagement = (function() { - - /** - * Namespace networkmanagement. - * @memberof google.cloud - * @namespace - */ - var networkmanagement = {}; - - networkmanagement.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.networkmanagement - * @namespace - */ - var v1beta1 = {}; - - v1beta1.ConnectivityTest = (function() { - - /** - * Properties of a ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IConnectivityTest - * @property {string|null} [name] ConnectivityTest name - * @property {string|null} [description] ConnectivityTest description - * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [source] ConnectivityTest source - * @property {google.cloud.networkmanagement.v1beta1.IEndpoint|null} [destination] ConnectivityTest destination - * @property {string|null} [protocol] ConnectivityTest protocol - * @property {Array.|null} [relatedProjects] ConnectivityTest relatedProjects - * @property {string|null} [displayName] ConnectivityTest displayName - * @property {Object.|null} [labels] ConnectivityTest labels - * @property {google.protobuf.ITimestamp|null} [createTime] ConnectivityTest createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ConnectivityTest updateTime - * @property {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null} [reachabilityDetails] ConnectivityTest reachabilityDetails - * @property {google.cloud.networkmanagement.v1beta1.IProbingDetails|null} [probingDetails] ConnectivityTest probingDetails - * @property {boolean|null} [bypassFirewallChecks] ConnectivityTest bypassFirewallChecks - */ - - /** - * Constructs a new ConnectivityTest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ConnectivityTest. - * @implements IConnectivityTest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set - */ - function ConnectivityTest(properties) { - this.relatedProjects = []; - 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]]; - } - - /** - * ConnectivityTest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.name = ""; - - /** - * ConnectivityTest description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.description = ""; - - /** - * ConnectivityTest source. - * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} source - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.source = null; - - /** - * ConnectivityTest destination. - * @member {google.cloud.networkmanagement.v1beta1.IEndpoint|null|undefined} destination - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.destination = null; - - /** - * ConnectivityTest protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.protocol = ""; - - /** - * ConnectivityTest relatedProjects. - * @member {Array.} relatedProjects - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.relatedProjects = $util.emptyArray; - - /** - * ConnectivityTest displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.displayName = ""; - - /** - * ConnectivityTest labels. - * @member {Object.} labels - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.labels = $util.emptyObject; - - /** - * ConnectivityTest createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.createTime = null; - - /** - * ConnectivityTest updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.updateTime = null; - - /** - * ConnectivityTest reachabilityDetails. - * @member {google.cloud.networkmanagement.v1beta1.IReachabilityDetails|null|undefined} reachabilityDetails - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.reachabilityDetails = null; - - /** - * ConnectivityTest probingDetails. - * @member {google.cloud.networkmanagement.v1beta1.IProbingDetails|null|undefined} probingDetails - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.probingDetails = null; - - /** - * ConnectivityTest bypassFirewallChecks. - * @member {boolean} bypassFirewallChecks - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - */ - ConnectivityTest.prototype.bypassFirewallChecks = false; - - /** - * Creates a new ConnectivityTest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest instance - */ - ConnectivityTest.create = function create(properties) { - return new ConnectivityTest(properties); - }; - - /** - * Encodes the specified ConnectivityTest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encode = function encode(message, writer) { - if (!writer) - 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.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.encode(message.destination, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.protocol); - if (message.relatedProjects != null && message.relatedProjects.length) - for (var i = 0; i < message.relatedProjects.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.relatedProjects[i]); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - 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 8, wireType 2 =*/66).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 10, wireType 2 =*/82).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.reachabilityDetails != null && Object.hasOwnProperty.call(message, "reachabilityDetails")) - $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.encode(message.reachabilityDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.probingDetails != null && Object.hasOwnProperty.call(message, "probingDetails")) - $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.encode(message.probingDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.bypassFirewallChecks != null && Object.hasOwnProperty.call(message, "bypassFirewallChecks")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.bypassFirewallChecks); - return writer; - }; - - /** - * Encodes the specified ConnectivityTest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IConnectivityTest} message ConnectivityTest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectivityTest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(), 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.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.decode(reader, reader.uint32()); - break; - } - case 5: { - message.protocol = reader.string(); - break; - } - case 6: { - if (!(message.relatedProjects && message.relatedProjects.length)) - message.relatedProjects = []; - message.relatedProjects.push(reader.string()); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 8: { - 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 10: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.decode(reader, reader.uint32()); - break; - } - case 14: { - message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.decode(reader, reader.uint32()); - break; - } - case 17: { - message.bypassFirewallChecks = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectivityTest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectivityTest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectivityTest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectivityTest.verify = function verify(message) { - if (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.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.source); - if (error) - return "source." + error; - } - if (message.destination != null && message.hasOwnProperty("destination")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.verify(message.destination); - if (error) - return "destination." + error; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.relatedProjects != null && message.hasOwnProperty("relatedProjects")) { - if (!Array.isArray(message.relatedProjects)) - return "relatedProjects: array expected"; - for (var i = 0; i < message.relatedProjects.length; ++i) - if (!$util.isString(message.relatedProjects[i])) - return "relatedProjects: string[] expected"; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify(message.reachabilityDetails); - if (error) - return "reachabilityDetails." + error; - } - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.verify(message.probingDetails); - if (error) - return "probingDetails." + error; - } - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - if (typeof message.bypassFirewallChecks !== "boolean") - return "bypassFirewallChecks: boolean expected"; - return null; - }; - - /** - * Creates a ConnectivityTest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ConnectivityTest} ConnectivityTest - */ - ConnectivityTest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.source: object expected"); - message.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.source); - } - if (object.destination != null) { - if (typeof object.destination !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.destination: object expected"); - message.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.fromObject(object.destination); - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.relatedProjects) { - if (!Array.isArray(object.relatedProjects)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.relatedProjects: array expected"); - message.relatedProjects = []; - for (var i = 0; i < object.relatedProjects.length; ++i) - message.relatedProjects[i] = String(object.relatedProjects[i]); - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.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.networkmanagement.v1beta1.ConnectivityTest.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.reachabilityDetails != null) { - if (typeof object.reachabilityDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.reachabilityDetails: object expected"); - message.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.fromObject(object.reachabilityDetails); - } - if (object.probingDetails != null) { - if (typeof object.probingDetails !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ConnectivityTest.probingDetails: object expected"); - message.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.fromObject(object.probingDetails); - } - if (object.bypassFirewallChecks != null) - message.bypassFirewallChecks = Boolean(object.bypassFirewallChecks); - return message; - }; - - /** - * Creates a plain object from a ConnectivityTest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} message ConnectivityTest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectivityTest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relatedProjects = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.source = null; - object.destination = null; - object.protocol = ""; - object.displayName = ""; - object.createTime = null; - object.updateTime = null; - object.reachabilityDetails = null; - object.probingDetails = null; - object.bypassFirewallChecks = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.source, options); - if (message.destination != null && message.hasOwnProperty("destination")) - object.destination = $root.google.cloud.networkmanagement.v1beta1.Endpoint.toObject(message.destination, options); - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.relatedProjects && message.relatedProjects.length) { - object.relatedProjects = []; - for (var j = 0; j < message.relatedProjects.length; ++j) - object.relatedProjects[j] = message.relatedProjects[j]; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - 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.reachabilityDetails != null && message.hasOwnProperty("reachabilityDetails")) - object.reachabilityDetails = $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.toObject(message.reachabilityDetails, options); - if (message.probingDetails != null && message.hasOwnProperty("probingDetails")) - object.probingDetails = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.toObject(message.probingDetails, options); - if (message.bypassFirewallChecks != null && message.hasOwnProperty("bypassFirewallChecks")) - object.bypassFirewallChecks = message.bypassFirewallChecks; - return object; - }; - - /** - * Converts this ConnectivityTest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @instance - * @returns {Object.} JSON object - */ - ConnectivityTest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConnectivityTest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ConnectivityTest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConnectivityTest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ConnectivityTest"; - }; - - return ConnectivityTest; - })(); - - v1beta1.Endpoint = (function() { - - /** - * Properties of an Endpoint. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IEndpoint - * @property {string|null} [ipAddress] Endpoint ipAddress - * @property {number|null} [port] Endpoint port - * @property {string|null} [instance] Endpoint instance - * @property {string|null} [forwardingRule] Endpoint forwardingRule - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null} [forwardingRuleTarget] Endpoint forwardingRuleTarget - * @property {string|null} [loadBalancerId] Endpoint loadBalancerId - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType - * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster - * @property {string|null} [fqdn] Endpoint fqdn - * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance - * @property {string|null} [redisInstance] Endpoint redisInstance - * @property {string|null} [redisCluster] Endpoint redisCluster - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null} [cloudFunction] Endpoint cloudFunction - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null} [appEngineVersion] Endpoint appEngineVersion - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null} [cloudRunRevision] Endpoint cloudRunRevision - * @property {string|null} [network] Endpoint network - * @property {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType|null} [networkType] Endpoint networkType - * @property {string|null} [projectId] Endpoint projectId - */ - - /** - * Constructs a new Endpoint. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an Endpoint. - * @implements IEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set - */ - function Endpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Endpoint ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.ipAddress = ""; - - /** - * Endpoint port. - * @member {number} port - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.port = 0; - - /** - * Endpoint instance. - * @member {string} instance - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.instance = ""; - - /** - * Endpoint forwardingRule. - * @member {string} forwardingRule - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRule = ""; - - /** - * Endpoint forwardingRuleTarget. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget|null|undefined} forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.forwardingRuleTarget = null; - - /** - * Endpoint loadBalancerId. - * @member {string|null|undefined} loadBalancerId - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerId = null; - - /** - * Endpoint loadBalancerType. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerType|null|undefined} loadBalancerType - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.loadBalancerType = null; - - /** - * Endpoint gkeMasterCluster. - * @member {string} gkeMasterCluster - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.gkeMasterCluster = ""; - - /** - * Endpoint fqdn. - * @member {string} fqdn - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.fqdn = ""; - - /** - * Endpoint cloudSqlInstance. - * @member {string} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.cloudSqlInstance = ""; - - /** - * Endpoint redisInstance. - * @member {string} redisInstance - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.redisInstance = ""; - - /** - * Endpoint redisCluster. - * @member {string} redisCluster - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.redisCluster = ""; - - /** - * Endpoint cloudFunction. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.cloudFunction = null; - - /** - * Endpoint appEngineVersion. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.appEngineVersion = null; - - /** - * Endpoint cloudRunRevision. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.cloudRunRevision = null; - - /** - * Endpoint network. - * @member {string} network - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.network = ""; - - /** - * Endpoint networkType. - * @member {google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType} networkType - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.networkType = 0; - - /** - * Endpoint projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Endpoint.prototype.projectId = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Endpoint _forwardingRuleTarget. - * @member {"forwardingRuleTarget"|undefined} _forwardingRuleTarget - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_forwardingRuleTarget", { - get: $util.oneOfGetter($oneOfFields = ["forwardingRuleTarget"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerId. - * @member {"loadBalancerId"|undefined} _loadBalancerId - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerId", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerId"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Endpoint _loadBalancerType. - * @member {"loadBalancerType"|undefined} _loadBalancerType - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - */ - Object.defineProperty(Endpoint.prototype, "_loadBalancerType", { - get: $util.oneOfGetter($oneOfFields = ["loadBalancerType"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Endpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint instance - */ - Endpoint.create = function create(properties) { - return new Endpoint(properties); - }; - - /** - * Encodes the specified Endpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ipAddress); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.port); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.instance); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.network); - if (message.networkType != null && Object.hasOwnProperty.call(message, "networkType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.networkType); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.projectId); - if (message.gkeMasterCluster != null && Object.hasOwnProperty.call(message, "gkeMasterCluster")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.gkeMasterCluster); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudSqlInstance); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.encode(message.cloudFunction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.encode(message.appEngineVersion, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.encode(message.cloudRunRevision, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.forwardingRule); - if (message.forwardingRuleTarget != null && Object.hasOwnProperty.call(message, "forwardingRuleTarget")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.forwardingRuleTarget); - if (message.loadBalancerId != null && Object.hasOwnProperty.call(message, "loadBalancerId")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.loadBalancerId); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.loadBalancerType); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); - if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); - return writer; - }; - - /** - * Encodes the specified Endpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpoint} message Endpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Endpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.ipAddress = reader.string(); - break; - } - case 2: { - message.port = reader.int32(); - break; - } - case 3: { - message.instance = reader.string(); - break; - } - case 13: { - message.forwardingRule = reader.string(); - break; - } - case 14: { - message.forwardingRuleTarget = reader.int32(); - break; - } - case 15: { - message.loadBalancerId = reader.string(); - break; - } - case 16: { - message.loadBalancerType = reader.int32(); - break; - } - case 7: { - message.gkeMasterCluster = reader.string(); - break; - } - case 19: { - message.fqdn = reader.string(); - break; - } - case 8: { - message.cloudSqlInstance = reader.string(); - break; - } - case 17: { - message.redisInstance = reader.string(); - break; - } - case 18: { - message.redisCluster = reader.string(); - break; - } - case 10: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.decode(reader, reader.uint32()); - break; - } - case 11: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.decode(reader, reader.uint32()); - break; - } - case 12: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.decode(reader, reader.uint32()); - break; - } - case 4: { - message.network = reader.string(); - break; - } - case 5: { - message.networkType = reader.int32(); - break; - } - case 6: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Endpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Endpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Endpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Endpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isInteger(message.port)) - return "port: integer expected"; - if (message.instance != null && message.hasOwnProperty("instance")) - if (!$util.isString(message.instance)) - return "instance: string expected"; - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - if (!$util.isString(message.forwardingRule)) - return "forwardingRule: string expected"; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - properties._forwardingRuleTarget = 1; - switch (message.forwardingRuleTarget) { - default: - return "forwardingRuleTarget: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - properties._loadBalancerId = 1; - if (!$util.isString(message.loadBalancerId)) - return "loadBalancerId: string expected"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - properties._loadBalancerType = 1; - switch (message.loadBalancerType) { - default: - return "loadBalancerType: 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: - break; - } - } - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - if (!$util.isString(message.gkeMasterCluster)) - return "gkeMasterCluster: string expected"; - if (message.fqdn != null && message.hasOwnProperty("fqdn")) - if (!$util.isString(message.fqdn)) - return "fqdn: string expected"; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - if (!$util.isString(message.cloudSqlInstance)) - return "cloudSqlInstance: string expected"; - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - if (!$util.isString(message.redisInstance)) - return "redisInstance: string expected"; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - if (!$util.isString(message.redisCluster)) - return "redisCluster: string expected"; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - var error = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.networkType != null && message.hasOwnProperty("networkType")) - switch (message.networkType) { - default: - return "networkType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates an Endpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint} Endpoint - */ - Endpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint(); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.port != null) - message.port = object.port | 0; - if (object.instance != null) - message.instance = String(object.instance); - if (object.forwardingRule != null) - message.forwardingRule = String(object.forwardingRule); - switch (object.forwardingRuleTarget) { - default: - if (typeof object.forwardingRuleTarget === "number") { - message.forwardingRuleTarget = object.forwardingRuleTarget; - break; - } - break; - case "FORWARDING_RULE_TARGET_UNSPECIFIED": - case 0: - message.forwardingRuleTarget = 0; - break; - case "INSTANCE": - case 1: - message.forwardingRuleTarget = 1; - break; - case "LOAD_BALANCER": - case 2: - message.forwardingRuleTarget = 2; - break; - case "VPN_GATEWAY": - case 3: - message.forwardingRuleTarget = 3; - break; - case "PSC": - case 4: - message.forwardingRuleTarget = 4; - break; - } - if (object.loadBalancerId != null) - message.loadBalancerId = String(object.loadBalancerId); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "HTTPS_ADVANCED_LOAD_BALANCER": - case 1: - message.loadBalancerType = 1; - break; - case "HTTPS_LOAD_BALANCER": - case 2: - message.loadBalancerType = 2; - break; - case "REGIONAL_HTTPS_LOAD_BALANCER": - case 3: - message.loadBalancerType = 3; - break; - case "INTERNAL_HTTPS_LOAD_BALANCER": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY_LOAD_BALANCER": - case 5: - message.loadBalancerType = 5; - break; - case "TCP_PROXY_LOAD_BALANCER": - case 6: - message.loadBalancerType = 6; - break; - case "INTERNAL_TCP_PROXY_LOAD_BALANCER": - case 7: - message.loadBalancerType = 7; - break; - case "NETWORK_LOAD_BALANCER": - case 8: - message.loadBalancerType = 8; - break; - case "LEGACY_NETWORK_LOAD_BALANCER": - case 9: - message.loadBalancerType = 9; - break; - case "TCP_UDP_INTERNAL_LOAD_BALANCER": - case 10: - message.loadBalancerType = 10; - break; - } - if (object.gkeMasterCluster != null) - message.gkeMasterCluster = String(object.gkeMasterCluster); - if (object.fqdn != null) - message.fqdn = String(object.fqdn); - if (object.cloudSqlInstance != null) - message.cloudSqlInstance = String(object.cloudSqlInstance); - if (object.redisInstance != null) - message.redisInstance = String(object.redisInstance); - if (object.redisCluster != null) - message.redisCluster = String(object.redisCluster); - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Endpoint.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.fromObject(object.cloudRunRevision); - } - if (object.network != null) - message.network = String(object.network); - switch (object.networkType) { - default: - if (typeof object.networkType === "number") { - message.networkType = object.networkType; - break; - } - break; - case "NETWORK_TYPE_UNSPECIFIED": - case 0: - message.networkType = 0; - break; - case "GCP_NETWORK": - case 1: - message.networkType = 1; - break; - case "NON_GCP_NETWORK": - case 2: - message.networkType = 2; - break; - } - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; - - /** - * Creates a plain object from an Endpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint} message Endpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Endpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.ipAddress = ""; - object.port = 0; - object.instance = ""; - object.network = ""; - object.networkType = options.enums === String ? "NETWORK_TYPE_UNSPECIFIED" : 0; - object.projectId = ""; - object.gkeMasterCluster = ""; - object.cloudSqlInstance = ""; - object.cloudFunction = null; - object.appEngineVersion = null; - object.cloudRunRevision = null; - object.forwardingRule = ""; - object.redisInstance = ""; - object.redisCluster = ""; - object.fqdn = ""; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = message.instance; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.networkType != null && message.hasOwnProperty("networkType")) - object.networkType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] === undefined ? message.networkType : $root.google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType[message.networkType] : message.networkType; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) - object.gkeMasterCluster = message.gkeMasterCluster; - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) - object.cloudSqlInstance = message.cloudSqlInstance; - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) - object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.toObject(message.cloudFunction, options); - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) - object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.toObject(message.appEngineVersion, options); - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.toObject(message.cloudRunRevision, options); - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) - object.forwardingRule = message.forwardingRule; - if (message.forwardingRuleTarget != null && message.hasOwnProperty("forwardingRuleTarget")) { - object.forwardingRuleTarget = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] === undefined ? message.forwardingRuleTarget : $root.google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget[message.forwardingRuleTarget] : message.forwardingRuleTarget; - if (options.oneofs) - object._forwardingRuleTarget = "forwardingRuleTarget"; - } - if (message.loadBalancerId != null && message.hasOwnProperty("loadBalancerId")) { - object.loadBalancerId = message.loadBalancerId; - if (options.oneofs) - object._loadBalancerId = "loadBalancerId"; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) { - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (options.oneofs) - object._loadBalancerType = "loadBalancerType"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) - object.redisInstance = message.redisInstance; - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) - object.redisCluster = message.redisCluster; - if (message.fqdn != null && message.hasOwnProperty("fqdn")) - object.fqdn = message.fqdn; - return object; - }; - - /** - * Converts this Endpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @instance - * @returns {Object.} JSON object - */ - Endpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Endpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Endpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint"; - }; - - /** - * NetworkType enum. - * @name google.cloud.networkmanagement.v1beta1.Endpoint.NetworkType - * @enum {number} - * @property {number} NETWORK_TYPE_UNSPECIFIED=0 NETWORK_TYPE_UNSPECIFIED value - * @property {number} GCP_NETWORK=1 GCP_NETWORK value - * @property {number} NON_GCP_NETWORK=2 NON_GCP_NETWORK value - */ - Endpoint.NetworkType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NETWORK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "GCP_NETWORK"] = 1; - values[valuesById[2] = "NON_GCP_NETWORK"] = 2; - return values; - })(); - - /** - * ForwardingRuleTarget enum. - * @name google.cloud.networkmanagement.v1beta1.Endpoint.ForwardingRuleTarget - * @enum {number} - * @property {number} FORWARDING_RULE_TARGET_UNSPECIFIED=0 FORWARDING_RULE_TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} LOAD_BALANCER=2 LOAD_BALANCER value - * @property {number} VPN_GATEWAY=3 VPN_GATEWAY value - * @property {number} PSC=4 PSC value - */ - Endpoint.ForwardingRuleTarget = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FORWARDING_RULE_TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "LOAD_BALANCER"] = 2; - values[valuesById[3] = "VPN_GATEWAY"] = 3; - values[valuesById[4] = "PSC"] = 4; - return values; - })(); - - Endpoint.CloudFunctionEndpoint = (function() { - - /** - * Properties of a CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @interface ICloudFunctionEndpoint - * @property {string|null} [uri] CloudFunctionEndpoint uri - */ - - /** - * Constructs a new CloudFunctionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @classdesc Represents a CloudFunctionEndpoint. - * @implements ICloudFunctionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - */ - function CloudFunctionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @instance - */ - CloudFunctionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudFunctionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint instance - */ - CloudFunctionEndpoint.create = function create(properties) { - return new CloudFunctionEndpoint(properties); - }; - - /** - * Encodes the specified CloudFunctionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudFunctionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudFunctionEndpoint} message CloudFunctionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudFunctionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} CloudFunctionEndpoint - */ - CloudFunctionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint} message CloudFunctionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudFunctionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudFunctionEndpoint"; - }; - - return CloudFunctionEndpoint; - })(); - - Endpoint.AppEngineVersionEndpoint = (function() { - - /** - * Properties of an AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @interface IAppEngineVersionEndpoint - * @property {string|null} [uri] AppEngineVersionEndpoint uri - */ - - /** - * Constructs a new AppEngineVersionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @classdesc Represents an AppEngineVersionEndpoint. - * @implements IAppEngineVersionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - */ - function AppEngineVersionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @instance - */ - AppEngineVersionEndpoint.prototype.uri = ""; - - /** - * Creates a new AppEngineVersionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint instance - */ - AppEngineVersionEndpoint.create = function create(properties) { - return new AppEngineVersionEndpoint(properties); - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.IAppEngineVersionEndpoint} message AppEngineVersionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} AppEngineVersionEndpoint - */ - AppEngineVersionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint} message AppEngineVersionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this AppEngineVersionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.AppEngineVersionEndpoint"; - }; - - return AppEngineVersionEndpoint; - })(); - - Endpoint.CloudRunRevisionEndpoint = (function() { - - /** - * Properties of a CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @interface ICloudRunRevisionEndpoint - * @property {string|null} [uri] CloudRunRevisionEndpoint uri - */ - - /** - * Constructs a new CloudRunRevisionEndpoint. - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint - * @classdesc Represents a CloudRunRevisionEndpoint. - * @implements ICloudRunRevisionEndpoint - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - */ - function CloudRunRevisionEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionEndpoint uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @instance - */ - CloudRunRevisionEndpoint.prototype.uri = ""; - - /** - * Creates a new CloudRunRevisionEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint instance - */ - CloudRunRevisionEndpoint.create = function create(properties) { - return new CloudRunRevisionEndpoint(properties); - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionEndpoint message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.ICloudRunRevisionEndpoint} message CloudRunRevisionEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.uri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionEndpoint message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} CloudRunRevisionEndpoint - */ - CloudRunRevisionEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint(); - if (object.uri != null) - message.uri = String(object.uri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint} message CloudRunRevisionEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.uri = ""; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - return object; - }; - - /** - * Converts this CloudRunRevisionEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionEndpoint - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Endpoint.CloudRunRevisionEndpoint"; - }; - - return CloudRunRevisionEndpoint; - })(); - - return Endpoint; - })(); - - v1beta1.ReachabilityDetails = (function() { - - /** - * Properties of a ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IReachabilityDetails - * @property {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result|null} [result] ReachabilityDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ReachabilityDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ReachabilityDetails error - * @property {Array.|null} [traces] ReachabilityDetails traces - */ - - /** - * Constructs a new ReachabilityDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ReachabilityDetails. - * @implements IReachabilityDetails - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set - */ - function ReachabilityDetails(properties) { - this.traces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReachabilityDetails result. - * @member {google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result} result - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.result = 0; - - /** - * ReachabilityDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.verifyTime = null; - - /** - * ReachabilityDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.error = null; - - /** - * ReachabilityDetails traces. - * @member {Array.} traces - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - */ - ReachabilityDetails.prototype.traces = $util.emptyArray; - - /** - * Creates a new ReachabilityDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails instance - */ - ReachabilityDetails.create = function create(properties) { - return new ReachabilityDetails(properties); - }; - - /** - * Encodes the specified ReachabilityDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.traces != null && message.traces.length) - for (var i = 0; i < message.traces.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.Trace.encode(message.traces[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ReachabilityDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IReachabilityDetails} message ReachabilityDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReachabilityDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 5: { - if (!(message.traces && message.traces.length)) - message.traces = []; - message.traces.push($root.google.cloud.networkmanagement.v1beta1.Trace.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReachabilityDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReachabilityDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReachabilityDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReachabilityDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 4: - case 5: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.traces != null && message.hasOwnProperty("traces")) { - if (!Array.isArray(message.traces)) - return "traces: array expected"; - for (var i = 0; i < message.traces.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.Trace.verify(message.traces[i]); - if (error) - return "traces." + error; - } - } - return null; - }; - - /** - * Creates a ReachabilityDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} ReachabilityDetails - */ - ReachabilityDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "AMBIGUOUS": - case 4: - message.result = 4; - break; - case "UNDETERMINED": - case 5: - message.result = 5; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - if (object.traces) { - if (!Array.isArray(object.traces)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: array expected"); - message.traces = []; - for (var i = 0; i < object.traces.length; ++i) { - if (typeof object.traces[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ReachabilityDetails.traces: object expected"); - message.traces[i] = $root.google.cloud.networkmanagement.v1beta1.Trace.fromObject(object.traces[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ReachabilityDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityDetails} message ReachabilityDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReachabilityDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.traces = []; - if (options.defaults) { - object.result = options.enums === String ? "RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.traces && message.traces.length) { - object.traces = []; - for (var j = 0; j < message.traces.length; ++j) - object.traces[j] = $root.google.cloud.networkmanagement.v1beta1.Trace.toObject(message.traces[j], options); - } - return object; - }; - - /** - * Converts this ReachabilityDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @instance - * @returns {Object.} JSON object - */ - ReachabilityDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReachabilityDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReachabilityDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ReachabilityDetails"; - }; - - /** - * Result enum. - * @name google.cloud.networkmanagement.v1beta1.ReachabilityDetails.Result - * @enum {number} - * @property {number} RESULT_UNSPECIFIED=0 RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} AMBIGUOUS=4 AMBIGUOUS value - * @property {number} UNDETERMINED=5 UNDETERMINED value - */ - ReachabilityDetails.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[4] = "AMBIGUOUS"] = 4; - values[valuesById[5] = "UNDETERMINED"] = 5; - return values; - })(); - - return ReachabilityDetails; - })(); - - v1beta1.LatencyPercentile = (function() { - - /** - * Properties of a LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILatencyPercentile - * @property {number|null} [percent] LatencyPercentile percent - * @property {number|Long|null} [latencyMicros] LatencyPercentile latencyMicros - */ - - /** - * Constructs a new LatencyPercentile. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LatencyPercentile. - * @implements ILatencyPercentile - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set - */ - function LatencyPercentile(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyPercentile percent. - * @member {number} percent - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.percent = 0; - - /** - * LatencyPercentile latencyMicros. - * @member {number|Long} latencyMicros - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @instance - */ - LatencyPercentile.prototype.latencyMicros = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new LatencyPercentile instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile instance - */ - LatencyPercentile.create = function create(properties) { - return new LatencyPercentile(properties); - }; - - /** - * Encodes the specified LatencyPercentile message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.percent != null && Object.hasOwnProperty.call(message, "percent")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.percent); - if (message.latencyMicros != null && Object.hasOwnProperty.call(message, "latencyMicros")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.latencyMicros); - return writer; - }; - - /** - * Encodes the specified LatencyPercentile message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyPercentile} message LatencyPercentile message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyPercentile.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.percent = reader.int32(); - break; - } - case 2: { - message.latencyMicros = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyPercentile message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyPercentile.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyPercentile message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyPercentile.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.percent != null && message.hasOwnProperty("percent")) - if (!$util.isInteger(message.percent)) - return "percent: integer expected"; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (!$util.isInteger(message.latencyMicros) && !(message.latencyMicros && $util.isInteger(message.latencyMicros.low) && $util.isInteger(message.latencyMicros.high))) - return "latencyMicros: integer|Long expected"; - return null; - }; - - /** - * Creates a LatencyPercentile message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LatencyPercentile} LatencyPercentile - */ - LatencyPercentile.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile(); - if (object.percent != null) - message.percent = object.percent | 0; - if (object.latencyMicros != null) - if ($util.Long) - (message.latencyMicros = $util.Long.fromValue(object.latencyMicros)).unsigned = false; - else if (typeof object.latencyMicros === "string") - message.latencyMicros = parseInt(object.latencyMicros, 10); - else if (typeof object.latencyMicros === "number") - message.latencyMicros = object.latencyMicros; - else if (typeof object.latencyMicros === "object") - message.latencyMicros = new $util.LongBits(object.latencyMicros.low >>> 0, object.latencyMicros.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a LatencyPercentile message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {google.cloud.networkmanagement.v1beta1.LatencyPercentile} message LatencyPercentile - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyPercentile.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.percent = 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.latencyMicros = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.latencyMicros = options.longs === String ? "0" : 0; - } - if (message.percent != null && message.hasOwnProperty("percent")) - object.percent = message.percent; - if (message.latencyMicros != null && message.hasOwnProperty("latencyMicros")) - if (typeof message.latencyMicros === "number") - object.latencyMicros = options.longs === String ? String(message.latencyMicros) : message.latencyMicros; - else - object.latencyMicros = options.longs === String ? $util.Long.prototype.toString.call(message.latencyMicros) : options.longs === Number ? new $util.LongBits(message.latencyMicros.low >>> 0, message.latencyMicros.high >>> 0).toNumber() : message.latencyMicros; - return object; - }; - - /** - * Converts this LatencyPercentile to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @instance - * @returns {Object.} JSON object - */ - LatencyPercentile.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyPercentile - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LatencyPercentile - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyPercentile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyPercentile"; - }; - - return LatencyPercentile; - })(); - - v1beta1.LatencyDistribution = (function() { - - /** - * Properties of a LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILatencyDistribution - * @property {Array.|null} [latencyPercentiles] LatencyDistribution latencyPercentiles - */ - - /** - * Constructs a new LatencyDistribution. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LatencyDistribution. - * @implements ILatencyDistribution - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set - */ - function LatencyDistribution(properties) { - this.latencyPercentiles = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LatencyDistribution latencyPercentiles. - * @member {Array.} latencyPercentiles - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @instance - */ - LatencyDistribution.prototype.latencyPercentiles = $util.emptyArray; - - /** - * Creates a new LatencyDistribution instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution instance - */ - LatencyDistribution.create = function create(properties) { - return new LatencyDistribution(properties); - }; - - /** - * Encodes the specified LatencyDistribution message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latencyPercentiles != null && message.latencyPercentiles.length) - for (var i = 0; i < message.latencyPercentiles.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.encode(message.latencyPercentiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LatencyDistribution message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILatencyDistribution} message LatencyDistribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LatencyDistribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.latencyPercentiles && message.latencyPercentiles.length)) - message.latencyPercentiles = []; - message.latencyPercentiles.push($root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LatencyDistribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LatencyDistribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LatencyDistribution message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LatencyDistribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latencyPercentiles != null && message.hasOwnProperty("latencyPercentiles")) { - if (!Array.isArray(message.latencyPercentiles)) - return "latencyPercentiles: array expected"; - for (var i = 0; i < message.latencyPercentiles.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.verify(message.latencyPercentiles[i]); - if (error) - return "latencyPercentiles." + error; - } - } - return null; - }; - - /** - * Creates a LatencyDistribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LatencyDistribution} LatencyDistribution - */ - LatencyDistribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution(); - if (object.latencyPercentiles) { - if (!Array.isArray(object.latencyPercentiles)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: array expected"); - message.latencyPercentiles = []; - for (var i = 0; i < object.latencyPercentiles.length; ++i) { - if (typeof object.latencyPercentiles[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.LatencyDistribution.latencyPercentiles: object expected"); - message.latencyPercentiles[i] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.fromObject(object.latencyPercentiles[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a LatencyDistribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {google.cloud.networkmanagement.v1beta1.LatencyDistribution} message LatencyDistribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LatencyDistribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.latencyPercentiles = []; - if (message.latencyPercentiles && message.latencyPercentiles.length) { - object.latencyPercentiles = []; - for (var j = 0; j < message.latencyPercentiles.length; ++j) - object.latencyPercentiles[j] = $root.google.cloud.networkmanagement.v1beta1.LatencyPercentile.toObject(message.latencyPercentiles[j], options); - } - return object; - }; - - /** - * Converts this LatencyDistribution to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @instance - * @returns {Object.} JSON object - */ - LatencyDistribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LatencyDistribution - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LatencyDistribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LatencyDistribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LatencyDistribution"; - }; - - return LatencyDistribution; - })(); - - v1beta1.ProbingDetails = (function() { - - /** - * Properties of a ProbingDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IProbingDetails - * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult|null} [result] ProbingDetails result - * @property {google.protobuf.ITimestamp|null} [verifyTime] ProbingDetails verifyTime - * @property {google.rpc.IStatus|null} [error] ProbingDetails error - * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause|null} [abortCause] ProbingDetails abortCause - * @property {number|null} [sentProbeCount] ProbingDetails sentProbeCount - * @property {number|null} [successfulProbeCount] ProbingDetails successfulProbeCount - * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] ProbingDetails endpointInfo - * @property {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null} [probingLatency] ProbingDetails probingLatency - * @property {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null} [destinationEgressLocation] ProbingDetails destinationEgressLocation - */ - - /** - * Constructs a new ProbingDetails. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ProbingDetails. - * @implements IProbingDetails - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set - */ - function ProbingDetails(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProbingDetails result. - * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult} result - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.result = 0; - - /** - * ProbingDetails verifyTime. - * @member {google.protobuf.ITimestamp|null|undefined} verifyTime - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.verifyTime = null; - - /** - * ProbingDetails error. - * @member {google.rpc.IStatus|null|undefined} error - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.error = null; - - /** - * ProbingDetails abortCause. - * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause} abortCause - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.abortCause = 0; - - /** - * ProbingDetails sentProbeCount. - * @member {number} sentProbeCount - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.sentProbeCount = 0; - - /** - * ProbingDetails successfulProbeCount. - * @member {number} successfulProbeCount - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.successfulProbeCount = 0; - - /** - * ProbingDetails endpointInfo. - * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.endpointInfo = null; - - /** - * ProbingDetails probingLatency. - * @member {google.cloud.networkmanagement.v1beta1.ILatencyDistribution|null|undefined} probingLatency - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.probingLatency = null; - - /** - * ProbingDetails destinationEgressLocation. - * @member {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation|null|undefined} destinationEgressLocation - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - */ - ProbingDetails.prototype.destinationEgressLocation = null; - - /** - * Creates a new ProbingDetails instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails instance - */ - ProbingDetails.create = function create(properties) { - return new ProbingDetails(properties); - }; - - /** - * Encodes the specified ProbingDetails message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.verifyTime != null && Object.hasOwnProperty.call(message, "verifyTime")) - $root.google.protobuf.Timestamp.encode(message.verifyTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.abortCause != null && Object.hasOwnProperty.call(message, "abortCause")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.abortCause); - if (message.sentProbeCount != null && Object.hasOwnProperty.call(message, "sentProbeCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.sentProbeCount); - if (message.successfulProbeCount != null && Object.hasOwnProperty.call(message, "successfulProbeCount")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.successfulProbeCount); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.probingLatency != null && Object.hasOwnProperty.call(message, "probingLatency")) - $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.encode(message.probingLatency, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.destinationEgressLocation != null && Object.hasOwnProperty.call(message, "destinationEgressLocation")) - $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.encode(message.destinationEgressLocation, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProbingDetails message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProbingDetails} message ProbingDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProbingDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.result = reader.int32(); - break; - } - case 2: { - message.verifyTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - } - case 4: { - message.abortCause = reader.int32(); - break; - } - case 5: { - message.sentProbeCount = reader.int32(); - break; - } - case 6: { - message.successfulProbeCount = reader.int32(); - break; - } - case 7: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.decode(reader, reader.uint32()); - break; - } - case 9: { - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProbingDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProbingDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProbingDetails message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProbingDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.verifyTime); - if (error) - return "verifyTime." + error; - } - if (message.error != null && message.hasOwnProperty("error")) { - var error = $root.google.rpc.Status.verify(message.error); - if (error) - return "error." + error; - } - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - switch (message.abortCause) { - default: - return "abortCause: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - if (!$util.isInteger(message.sentProbeCount)) - return "sentProbeCount: integer expected"; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - if (!$util.isInteger(message.successfulProbeCount)) - return "successfulProbeCount: integer expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) { - var error = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.verify(message.probingLatency); - if (error) - return "probingLatency." + error; - } - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify(message.destinationEgressLocation); - if (error) - return "destinationEgressLocation." + error; - } - return null; - }; - - /** - * Creates a ProbingDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails} ProbingDetails - */ - ProbingDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails(); - switch (object.result) { - default: - if (typeof object.result === "number") { - message.result = object.result; - break; - } - break; - case "PROBING_RESULT_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "REACHABLE": - case 1: - message.result = 1; - break; - case "UNREACHABLE": - case 2: - message.result = 2; - break; - case "REACHABILITY_INCONSISTENT": - case 3: - message.result = 3; - break; - case "UNDETERMINED": - case 4: - message.result = 4; - break; - } - if (object.verifyTime != null) { - if (typeof object.verifyTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.verifyTime: object expected"); - message.verifyTime = $root.google.protobuf.Timestamp.fromObject(object.verifyTime); - } - if (object.error != null) { - if (typeof object.error !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.error: object expected"); - message.error = $root.google.rpc.Status.fromObject(object.error); - } - switch (object.abortCause) { - default: - if (typeof object.abortCause === "number") { - message.abortCause = object.abortCause; - break; - } - break; - case "PROBING_ABORT_CAUSE_UNSPECIFIED": - case 0: - message.abortCause = 0; - break; - case "PERMISSION_DENIED": - case 1: - message.abortCause = 1; - break; - case "NO_SOURCE_LOCATION": - case 2: - message.abortCause = 2; - break; - } - if (object.sentProbeCount != null) - message.sentProbeCount = object.sentProbeCount | 0; - if (object.successfulProbeCount != null) - message.successfulProbeCount = object.successfulProbeCount | 0; - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.probingLatency != null) { - if (typeof object.probingLatency !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.probingLatency: object expected"); - message.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.fromObject(object.probingLatency); - } - if (object.destinationEgressLocation != null) { - if (typeof object.destinationEgressLocation !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ProbingDetails.destinationEgressLocation: object expected"); - message.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.fromObject(object.destinationEgressLocation); - } - return message; - }; - - /** - * Creates a plain object from a ProbingDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails} message ProbingDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProbingDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.result = options.enums === String ? "PROBING_RESULT_UNSPECIFIED" : 0; - object.verifyTime = null; - object.error = null; - object.abortCause = options.enums === String ? "PROBING_ABORT_CAUSE_UNSPECIFIED" : 0; - object.sentProbeCount = 0; - object.successfulProbeCount = 0; - object.endpointInfo = null; - object.probingLatency = null; - object.destinationEgressLocation = null; - } - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] === undefined ? message.result : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult[message.result] : message.result; - if (message.verifyTime != null && message.hasOwnProperty("verifyTime")) - object.verifyTime = $root.google.protobuf.Timestamp.toObject(message.verifyTime, options); - if (message.error != null && message.hasOwnProperty("error")) - object.error = $root.google.rpc.Status.toObject(message.error, options); - if (message.abortCause != null && message.hasOwnProperty("abortCause")) - object.abortCause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] === undefined ? message.abortCause : $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause[message.abortCause] : message.abortCause; - if (message.sentProbeCount != null && message.hasOwnProperty("sentProbeCount")) - object.sentProbeCount = message.sentProbeCount; - if (message.successfulProbeCount != null && message.hasOwnProperty("successfulProbeCount")) - object.successfulProbeCount = message.successfulProbeCount; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.probingLatency != null && message.hasOwnProperty("probingLatency")) - object.probingLatency = $root.google.cloud.networkmanagement.v1beta1.LatencyDistribution.toObject(message.probingLatency, options); - if (message.destinationEgressLocation != null && message.hasOwnProperty("destinationEgressLocation")) - object.destinationEgressLocation = $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.toObject(message.destinationEgressLocation, options); - return object; - }; - - /** - * Converts this ProbingDetails to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @instance - * @returns {Object.} JSON object - */ - ProbingDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProbingDetails - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProbingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails"; - }; - - /** - * ProbingResult enum. - * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingResult - * @enum {number} - * @property {number} PROBING_RESULT_UNSPECIFIED=0 PROBING_RESULT_UNSPECIFIED value - * @property {number} REACHABLE=1 REACHABLE value - * @property {number} UNREACHABLE=2 UNREACHABLE value - * @property {number} REACHABILITY_INCONSISTENT=3 REACHABILITY_INCONSISTENT value - * @property {number} UNDETERMINED=4 UNDETERMINED value - */ - ProbingDetails.ProbingResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "REACHABLE"] = 1; - values[valuesById[2] = "UNREACHABLE"] = 2; - values[valuesById[3] = "REACHABILITY_INCONSISTENT"] = 3; - values[valuesById[4] = "UNDETERMINED"] = 4; - return values; - })(); - - /** - * ProbingAbortCause enum. - * @name google.cloud.networkmanagement.v1beta1.ProbingDetails.ProbingAbortCause - * @enum {number} - * @property {number} PROBING_ABORT_CAUSE_UNSPECIFIED=0 PROBING_ABORT_CAUSE_UNSPECIFIED value - * @property {number} PERMISSION_DENIED=1 PERMISSION_DENIED value - * @property {number} NO_SOURCE_LOCATION=2 NO_SOURCE_LOCATION value - */ - ProbingDetails.ProbingAbortCause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROBING_ABORT_CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PERMISSION_DENIED"] = 1; - values[valuesById[2] = "NO_SOURCE_LOCATION"] = 2; - return values; - })(); - - ProbingDetails.EdgeLocation = (function() { - - /** - * Properties of an EdgeLocation. - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @interface IEdgeLocation - * @property {string|null} [metropolitanArea] EdgeLocation metropolitanArea - */ - - /** - * Constructs a new EdgeLocation. - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails - * @classdesc Represents an EdgeLocation. - * @implements IEdgeLocation - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - */ - function EdgeLocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EdgeLocation metropolitanArea. - * @member {string} metropolitanArea - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @instance - */ - EdgeLocation.prototype.metropolitanArea = ""; - - /** - * Creates a new EdgeLocation instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation instance - */ - EdgeLocation.create = function create(properties) { - return new EdgeLocation(properties); - }; - - /** - * Encodes the specified EdgeLocation message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.metropolitanArea != null && Object.hasOwnProperty.call(message, "metropolitanArea")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.metropolitanArea); - return writer; - }; - - /** - * Encodes the specified EdgeLocation message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.IEdgeLocation} message EdgeLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EdgeLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.metropolitanArea = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EdgeLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EdgeLocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EdgeLocation message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EdgeLocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - if (!$util.isString(message.metropolitanArea)) - return "metropolitanArea: string expected"; - return null; - }; - - /** - * Creates an EdgeLocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} EdgeLocation - */ - EdgeLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation(); - if (object.metropolitanArea != null) - message.metropolitanArea = String(object.metropolitanArea); - return message; - }; - - /** - * Creates a plain object from an EdgeLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation} message EdgeLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EdgeLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.metropolitanArea = ""; - if (message.metropolitanArea != null && message.hasOwnProperty("metropolitanArea")) - object.metropolitanArea = message.metropolitanArea; - return object; - }; - - /** - * Converts this EdgeLocation to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @instance - * @returns {Object.} JSON object - */ - EdgeLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EdgeLocation - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EdgeLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProbingDetails.EdgeLocation"; - }; - - return EdgeLocation; - })(); - - return ProbingDetails; - })(); - - v1beta1.Trace = (function() { - - /** - * Properties of a Trace. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ITrace - * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpointInfo] Trace endpointInfo - * @property {Array.|null} [steps] Trace steps - * @property {number|null} [forwardTraceId] Trace forwardTraceId - */ - - /** - * Constructs a new Trace. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a Trace. - * @implements ITrace - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set - */ - function Trace(properties) { - this.steps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Trace endpointInfo. - * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpointInfo - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - */ - Trace.prototype.endpointInfo = null; - - /** - * Trace steps. - * @member {Array.} steps - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - */ - Trace.prototype.steps = $util.emptyArray; - - /** - * Trace forwardTraceId. - * @member {number} forwardTraceId - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - */ - Trace.prototype.forwardTraceId = 0; - - /** - * Creates a new Trace instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.ITrace=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace instance - */ - Trace.create = function create(properties) { - return new Trace(properties); - }; - - /** - * Encodes the specified Trace message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.endpointInfo != null && Object.hasOwnProperty.call(message, "endpointInfo")) - $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpointInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.Step.encode(message.steps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.forwardTraceId != null && Object.hasOwnProperty.call(message, "forwardTraceId")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.forwardTraceId); - return writer; - }; - - /** - * Encodes the specified Trace message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Trace.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.ITrace} message Trace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Trace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Trace message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.cloud.networkmanagement.v1beta1.Step.decode(reader, reader.uint32())); - break; - } - case 4: { - message.forwardTraceId = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Trace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Trace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Trace message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Trace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) { - var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpointInfo); - if (error) - return "endpointInfo." + error; - } - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.Step.verify(message.steps[i]); - if (error) - return "steps." + error; - } - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - if (!$util.isInteger(message.forwardTraceId)) - return "forwardTraceId: integer expected"; - return null; - }; - - /** - * Creates a Trace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Trace} Trace - */ - Trace.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Trace) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Trace(); - if (object.endpointInfo != null) { - if (typeof object.endpointInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.endpointInfo: object expected"); - message.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpointInfo); - } - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Trace.steps: object expected"); - message.steps[i] = $root.google.cloud.networkmanagement.v1beta1.Step.fromObject(object.steps[i]); - } - } - if (object.forwardTraceId != null) - message.forwardTraceId = object.forwardTraceId | 0; - return message; - }; - - /** - * Creates a plain object from a Trace message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {google.cloud.networkmanagement.v1beta1.Trace} message Trace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Trace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.steps = []; - if (options.defaults) { - object.endpointInfo = null; - object.forwardTraceId = 0; - } - if (message.endpointInfo != null && message.hasOwnProperty("endpointInfo")) - object.endpointInfo = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpointInfo, options); - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.cloud.networkmanagement.v1beta1.Step.toObject(message.steps[j], options); - } - if (message.forwardTraceId != null && message.hasOwnProperty("forwardTraceId")) - object.forwardTraceId = message.forwardTraceId; - return object; - }; - - /** - * Converts this Trace to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @instance - * @returns {Object.} JSON object - */ - Trace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Trace - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Trace - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Trace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Trace"; - }; - - return Trace; - })(); - - v1beta1.Step = (function() { - - /** - * Properties of a Step. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IStep - * @property {string|null} [description] Step description - * @property {google.cloud.networkmanagement.v1beta1.Step.State|null} [state] Step state - * @property {boolean|null} [causesDrop] Step causesDrop - * @property {string|null} [projectId] Step projectId - * @property {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null} [instance] Step instance - * @property {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null} [firewall] Step firewall - * @property {google.cloud.networkmanagement.v1beta1.IRouteInfo|null} [route] Step route - * @property {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null} [endpoint] Step endpoint - * @property {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null} [googleService] Step googleService - * @property {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null} [forwardingRule] Step forwardingRule - * @property {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null} [vpnGateway] Step vpnGateway - * @property {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null} [vpnTunnel] Step vpnTunnel - * @property {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null} [vpcConnector] Step vpcConnector - * @property {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null} [deliver] Step deliver - * @property {google.cloud.networkmanagement.v1beta1.IForwardInfo|null} [forward] Step forward - * @property {google.cloud.networkmanagement.v1beta1.IAbortInfo|null} [abort] Step abort - * @property {google.cloud.networkmanagement.v1beta1.IDropInfo|null} [drop] Step drop - * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null} [loadBalancer] Step loadBalancer - * @property {google.cloud.networkmanagement.v1beta1.INetworkInfo|null} [network] Step network - * @property {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null} [gkeMaster] Step gkeMaster - * @property {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null} [cloudSqlInstance] Step cloudSqlInstance - * @property {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null} [redisInstance] Step redisInstance - * @property {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null} [redisCluster] Step redisCluster - * @property {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null} [cloudFunction] Step cloudFunction - * @property {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null} [appEngineVersion] Step appEngineVersion - * @property {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null} [cloudRunRevision] Step cloudRunRevision - * @property {google.cloud.networkmanagement.v1beta1.INatInfo|null} [nat] Step nat - * @property {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null} [proxyConnection] Step proxyConnection - * @property {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null} [loadBalancerBackendInfo] Step loadBalancerBackendInfo - * @property {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null} [storageBucket] Step storageBucket - * @property {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null} [serverlessNeg] Step serverlessNeg - */ - - /** - * Constructs a new Step. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a Step. - * @implements IStep - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set - */ - function Step(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Step description. - * @member {string} description - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.description = ""; - - /** - * Step state. - * @member {google.cloud.networkmanagement.v1beta1.Step.State} state - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.state = 0; - - /** - * Step causesDrop. - * @member {boolean} causesDrop - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.causesDrop = false; - - /** - * Step projectId. - * @member {string} projectId - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.projectId = ""; - - /** - * Step instance. - * @member {google.cloud.networkmanagement.v1beta1.IInstanceInfo|null|undefined} instance - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.instance = null; - - /** - * Step firewall. - * @member {google.cloud.networkmanagement.v1beta1.IFirewallInfo|null|undefined} firewall - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.firewall = null; - - /** - * Step route. - * @member {google.cloud.networkmanagement.v1beta1.IRouteInfo|null|undefined} route - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.route = null; - - /** - * Step endpoint. - * @member {google.cloud.networkmanagement.v1beta1.IEndpointInfo|null|undefined} endpoint - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.endpoint = null; - - /** - * Step googleService. - * @member {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo|null|undefined} googleService - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.googleService = null; - - /** - * Step forwardingRule. - * @member {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo|null|undefined} forwardingRule - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.forwardingRule = null; - - /** - * Step vpnGateway. - * @member {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo|null|undefined} vpnGateway - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.vpnGateway = null; - - /** - * Step vpnTunnel. - * @member {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo|null|undefined} vpnTunnel - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.vpnTunnel = null; - - /** - * Step vpcConnector. - * @member {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo|null|undefined} vpcConnector - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.vpcConnector = null; - - /** - * Step deliver. - * @member {google.cloud.networkmanagement.v1beta1.IDeliverInfo|null|undefined} deliver - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.deliver = null; - - /** - * Step forward. - * @member {google.cloud.networkmanagement.v1beta1.IForwardInfo|null|undefined} forward - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.forward = null; - - /** - * Step abort. - * @member {google.cloud.networkmanagement.v1beta1.IAbortInfo|null|undefined} abort - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.abort = null; - - /** - * Step drop. - * @member {google.cloud.networkmanagement.v1beta1.IDropInfo|null|undefined} drop - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.drop = null; - - /** - * Step loadBalancer. - * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo|null|undefined} loadBalancer - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.loadBalancer = null; - - /** - * Step network. - * @member {google.cloud.networkmanagement.v1beta1.INetworkInfo|null|undefined} network - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.network = null; - - /** - * Step gkeMaster. - * @member {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo|null|undefined} gkeMaster - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.gkeMaster = null; - - /** - * Step cloudSqlInstance. - * @member {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo|null|undefined} cloudSqlInstance - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.cloudSqlInstance = null; - - /** - * Step redisInstance. - * @member {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo|null|undefined} redisInstance - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.redisInstance = null; - - /** - * Step redisCluster. - * @member {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo|null|undefined} redisCluster - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.redisCluster = null; - - /** - * Step cloudFunction. - * @member {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo|null|undefined} cloudFunction - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.cloudFunction = null; - - /** - * Step appEngineVersion. - * @member {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo|null|undefined} appEngineVersion - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.appEngineVersion = null; - - /** - * Step cloudRunRevision. - * @member {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo|null|undefined} cloudRunRevision - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.cloudRunRevision = null; - - /** - * Step nat. - * @member {google.cloud.networkmanagement.v1beta1.INatInfo|null|undefined} nat - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.nat = null; - - /** - * Step proxyConnection. - * @member {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo|null|undefined} proxyConnection - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.proxyConnection = null; - - /** - * Step loadBalancerBackendInfo. - * @member {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo|null|undefined} loadBalancerBackendInfo - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.loadBalancerBackendInfo = null; - - /** - * Step storageBucket. - * @member {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo|null|undefined} storageBucket - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.storageBucket = null; - - /** - * Step serverlessNeg. - * @member {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo|null|undefined} serverlessNeg - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Step.prototype.serverlessNeg = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Step stepInfo. - * @member {"instance"|"firewall"|"route"|"endpoint"|"googleService"|"forwardingRule"|"vpnGateway"|"vpnTunnel"|"vpcConnector"|"deliver"|"forward"|"abort"|"drop"|"loadBalancer"|"network"|"gkeMaster"|"cloudSqlInstance"|"redisInstance"|"redisCluster"|"cloudFunction"|"appEngineVersion"|"cloudRunRevision"|"nat"|"proxyConnection"|"loadBalancerBackendInfo"|"storageBucket"|"serverlessNeg"|undefined} stepInfo - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - */ - Object.defineProperty(Step.prototype, "stepInfo", { - get: $util.oneOfGetter($oneOfFields = ["instance", "firewall", "route", "endpoint", "googleService", "forwardingRule", "vpnGateway", "vpnTunnel", "vpcConnector", "deliver", "forward", "abort", "drop", "loadBalancer", "network", "gkeMaster", "cloudSqlInstance", "redisInstance", "redisCluster", "cloudFunction", "appEngineVersion", "cloudRunRevision", "nat", "proxyConnection", "loadBalancerBackendInfo", "storageBucket", "serverlessNeg"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Step instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStep=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step instance - */ - Step.create = function create(properties) { - return new Step(properties); - }; - - /** - * Encodes the specified Step message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); - if (message.causesDrop != null && Object.hasOwnProperty.call(message, "causesDrop")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.causesDrop); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.encode(message.instance, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.firewall != null && Object.hasOwnProperty.call(message, "firewall")) - $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.encode(message.firewall, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.route != null && Object.hasOwnProperty.call(message, "route")) - $root.google.cloud.networkmanagement.v1beta1.RouteInfo.encode(message.route, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.encode(message.endpoint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.forwardingRule != null && Object.hasOwnProperty.call(message, "forwardingRule")) - $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.encode(message.forwardingRule, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.vpnGateway != null && Object.hasOwnProperty.call(message, "vpnGateway")) - $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.encode(message.vpnGateway, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) - $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.encode(message.vpnTunnel, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deliver != null && Object.hasOwnProperty.call(message, "deliver")) - $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.encode(message.deliver, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.forward != null && Object.hasOwnProperty.call(message, "forward")) - $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.encode(message.forward, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.abort != null && Object.hasOwnProperty.call(message, "abort")) - $root.google.cloud.networkmanagement.v1beta1.AbortInfo.encode(message.abort, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.drop != null && Object.hasOwnProperty.call(message, "drop")) - $root.google.cloud.networkmanagement.v1beta1.DropInfo.encode(message.drop, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.loadBalancer != null && Object.hasOwnProperty.call(message, "loadBalancer")) - $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.encode(message.loadBalancer, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.encode(message.network, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.gkeMaster != null && Object.hasOwnProperty.call(message, "gkeMaster")) - $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.encode(message.gkeMaster, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.cloudSqlInstance != null && Object.hasOwnProperty.call(message, "cloudSqlInstance")) - $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.encode(message.cloudSqlInstance, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.cloudFunction != null && Object.hasOwnProperty.call(message, "cloudFunction")) - $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.encode(message.cloudFunction, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.vpcConnector != null && Object.hasOwnProperty.call(message, "vpcConnector")) - $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.encode(message.vpcConnector, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.appEngineVersion != null && Object.hasOwnProperty.call(message, "appEngineVersion")) - $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.encode(message.appEngineVersion, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.cloudRunRevision != null && Object.hasOwnProperty.call(message, "cloudRunRevision")) - $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.encode(message.cloudRunRevision, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.googleService != null && Object.hasOwnProperty.call(message, "googleService")) - $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.encode(message.googleService, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nat != null && Object.hasOwnProperty.call(message, "nat")) - $root.google.cloud.networkmanagement.v1beta1.NatInfo.encode(message.nat, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.proxyConnection != null && Object.hasOwnProperty.call(message, "proxyConnection")) - $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.encode(message.proxyConnection, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.loadBalancerBackendInfo != null && Object.hasOwnProperty.call(message, "loadBalancerBackendInfo")) - $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.encode(message.loadBalancerBackendInfo, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.encode(message.storageBucket, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - if (message.serverlessNeg != null && Object.hasOwnProperty.call(message, "serverlessNeg")) - $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.encode(message.serverlessNeg, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); - if (message.redisInstance != null && Object.hasOwnProperty.call(message, "redisInstance")) - $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.encode(message.redisInstance, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); - if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) - $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.encode(message.redisCluster, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Step message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.Step.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStep} message Step message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Step.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Step message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.Step(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.state = reader.int32(); - break; - } - case 3: { - message.causesDrop = reader.bool(); - break; - } - case 4: { - message.projectId = reader.string(); - break; - } - case 5: { - message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.decode(reader, reader.uint32()); - break; - } - case 7: { - message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.decode(reader, reader.uint32()); - break; - } - case 8: { - message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.decode(reader, reader.uint32()); - break; - } - case 24: { - message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.decode(reader, reader.uint32()); - break; - } - case 9: { - message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.decode(reader, reader.uint32()); - break; - } - case 10: { - message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.decode(reader, reader.uint32()); - break; - } - case 11: { - message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.decode(reader, reader.uint32()); - break; - } - case 21: { - message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.decode(reader, reader.uint32()); - break; - } - case 13: { - message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.decode(reader, reader.uint32()); - break; - } - case 14: { - message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.decode(reader, reader.uint32()); - break; - } - case 15: { - message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.decode(reader, reader.uint32()); - break; - } - case 16: { - message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.decode(reader, reader.uint32()); - break; - } - case 17: { - message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.decode(reader, reader.uint32()); - break; - } - case 18: { - message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.decode(reader, reader.uint32()); - break; - } - case 19: { - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 30: { - message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.decode(reader, reader.uint32()); - break; - } - case 31: { - message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.decode(reader, reader.uint32()); - break; - } - case 20: { - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.decode(reader, reader.uint32()); - break; - } - case 22: { - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.decode(reader, reader.uint32()); - break; - } - case 23: { - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.decode(reader, reader.uint32()); - break; - } - case 26: { - message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.decode(reader, reader.uint32()); - break; - } - case 27: { - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.decode(reader, reader.uint32()); - break; - } - case 28: { - message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.decode(reader, reader.uint32()); - break; - } - case 29: { - message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Step message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Step.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Step message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Step.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 27: - case 3: - case 21: - case 22: - case 32: - case 33: - case 23: - case 25: - case 26: - case 29: - case 30: - case 31: - case 4: - case 5: - case 6: - case 7: - case 28: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 24: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - break; - } - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - if (typeof message.causesDrop !== "boolean") - return "causesDrop: boolean expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) { - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.verify(message.instance); - if (error) - return "instance." + error; - } - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.verify(message.firewall); - if (error) - return "firewall." + error; - } - } - if (message.route != null && message.hasOwnProperty("route")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.verify(message.route); - if (error) - return "route." + error; - } - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.verify(message.endpoint); - if (error) - return "endpoint." + error; - } - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify(message.googleService); - if (error) - return "googleService." + error; - } - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify(message.forwardingRule); - if (error) - return "forwardingRule." + error; - } - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify(message.vpnGateway); - if (error) - return "vpnGateway." + error; - } - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify(message.vpnTunnel); - if (error) - return "vpnTunnel." + error; - } - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify(message.vpcConnector); - if (error) - return "vpcConnector." + error; - } - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.verify(message.deliver); - if (error) - return "deliver." + error; - } - } - if (message.forward != null && message.hasOwnProperty("forward")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.verify(message.forward); - if (error) - return "forward." + error; - } - } - if (message.abort != null && message.hasOwnProperty("abort")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.verify(message.abort); - if (error) - return "abort." + error; - } - } - if (message.drop != null && message.hasOwnProperty("drop")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.DropInfo.verify(message.drop); - if (error) - return "drop." + error; - } - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify(message.loadBalancer); - if (error) - return "loadBalancer." + error; - } - } - if (message.network != null && message.hasOwnProperty("network")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.verify(message.network); - if (error) - return "network." + error; - } - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify(message.gkeMaster); - if (error) - return "gkeMaster." + error; - } - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify(message.cloudSqlInstance); - if (error) - return "cloudSqlInstance." + error; - } - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify(message.redisInstance); - if (error) - return "redisInstance." + error; - } - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify(message.redisCluster); - if (error) - return "redisCluster." + error; - } - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify(message.cloudFunction); - if (error) - return "cloudFunction." + error; - } - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify(message.appEngineVersion); - if (error) - return "appEngineVersion." + error; - } - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify(message.cloudRunRevision); - if (error) - return "cloudRunRevision." + error; - } - } - if (message.nat != null && message.hasOwnProperty("nat")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.NatInfo.verify(message.nat); - if (error) - return "nat." + error; - } - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify(message.proxyConnection); - if (error) - return "proxyConnection." + error; - } - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify(message.loadBalancerBackendInfo); - if (error) - return "loadBalancerBackendInfo." + error; - } - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify(message.storageBucket); - if (error) - return "storageBucket." + error; - } - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - if (properties.stepInfo === 1) - return "stepInfo: multiple values"; - properties.stepInfo = 1; - { - var error = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify(message.serverlessNeg); - if (error) - return "serverlessNeg." + error; - } - } - return null; - }; - - /** - * Creates a Step message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.Step} Step - */ - Step.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.Step) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.Step(); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "START_FROM_INSTANCE": - case 1: - message.state = 1; - break; - case "START_FROM_INTERNET": - case 2: - message.state = 2; - break; - case "START_FROM_GOOGLE_SERVICE": - case 27: - message.state = 27; - break; - case "START_FROM_PRIVATE_NETWORK": - case 3: - message.state = 3; - break; - case "START_FROM_GKE_MASTER": - case 21: - message.state = 21; - break; - case "START_FROM_CLOUD_SQL_INSTANCE": - case 22: - message.state = 22; - break; - case "START_FROM_REDIS_INSTANCE": - case 32: - message.state = 32; - break; - case "START_FROM_REDIS_CLUSTER": - case 33: - message.state = 33; - break; - case "START_FROM_CLOUD_FUNCTION": - case 23: - message.state = 23; - break; - case "START_FROM_APP_ENGINE_VERSION": - case 25: - message.state = 25; - break; - case "START_FROM_CLOUD_RUN_REVISION": - case 26: - message.state = 26; - break; - case "START_FROM_STORAGE_BUCKET": - case 29: - message.state = 29; - break; - case "START_FROM_PSC_PUBLISHED_SERVICE": - case 30: - message.state = 30; - break; - case "START_FROM_SERVERLESS_NEG": - case 31: - message.state = 31; - break; - case "APPLY_INGRESS_FIREWALL_RULE": - case 4: - message.state = 4; - break; - case "APPLY_EGRESS_FIREWALL_RULE": - case 5: - message.state = 5; - break; - case "APPLY_ROUTE": - case 6: - message.state = 6; - break; - case "APPLY_FORWARDING_RULE": - case 7: - message.state = 7; - break; - case "ANALYZE_LOAD_BALANCER_BACKEND": - case 28: - message.state = 28; - break; - case "SPOOFING_APPROVED": - case 8: - message.state = 8; - break; - case "ARRIVE_AT_INSTANCE": - case 9: - message.state = 9; - break; - case "ARRIVE_AT_INTERNAL_LOAD_BALANCER": - case 10: - message.state = 10; - break; - case "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": - case 11: - message.state = 11; - break; - case "ARRIVE_AT_VPN_GATEWAY": - case 12: - message.state = 12; - break; - case "ARRIVE_AT_VPN_TUNNEL": - case 13: - message.state = 13; - break; - case "ARRIVE_AT_VPC_CONNECTOR": - case 24: - message.state = 24; - break; - case "NAT": - case 14: - message.state = 14; - break; - case "PROXY_CONNECTION": - case 15: - message.state = 15; - break; - case "DELIVER": - case 16: - message.state = 16; - break; - case "DROP": - case 17: - message.state = 17; - break; - case "FORWARD": - case 18: - message.state = 18; - break; - case "ABORT": - case 19: - message.state = 19; - break; - case "VIEWER_PERMISSION_MISSING": - case 20: - message.state = 20; - break; - } - if (object.causesDrop != null) - message.causesDrop = Boolean(object.causesDrop); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instance != null) { - if (typeof object.instance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.instance: object expected"); - message.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.fromObject(object.instance); - } - if (object.firewall != null) { - if (typeof object.firewall !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.firewall: object expected"); - message.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.fromObject(object.firewall); - } - if (object.route != null) { - if (typeof object.route !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.route: object expected"); - message.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.fromObject(object.route); - } - if (object.endpoint != null) { - if (typeof object.endpoint !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.endpoint: object expected"); - message.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.fromObject(object.endpoint); - } - if (object.googleService != null) { - if (typeof object.googleService !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.googleService: object expected"); - message.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.fromObject(object.googleService); - } - if (object.forwardingRule != null) { - if (typeof object.forwardingRule !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forwardingRule: object expected"); - message.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.fromObject(object.forwardingRule); - } - if (object.vpnGateway != null) { - if (typeof object.vpnGateway !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnGateway: object expected"); - message.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.fromObject(object.vpnGateway); - } - if (object.vpnTunnel != null) { - if (typeof object.vpnTunnel !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpnTunnel: object expected"); - message.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.fromObject(object.vpnTunnel); - } - if (object.vpcConnector != null) { - if (typeof object.vpcConnector !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.vpcConnector: object expected"); - message.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.fromObject(object.vpcConnector); - } - if (object.deliver != null) { - if (typeof object.deliver !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.deliver: object expected"); - message.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.fromObject(object.deliver); - } - if (object.forward != null) { - if (typeof object.forward !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.forward: object expected"); - message.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.fromObject(object.forward); - } - if (object.abort != null) { - if (typeof object.abort !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.abort: object expected"); - message.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.fromObject(object.abort); - } - if (object.drop != null) { - if (typeof object.drop !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.drop: object expected"); - message.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.fromObject(object.drop); - } - if (object.loadBalancer != null) { - if (typeof object.loadBalancer !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancer: object expected"); - message.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.fromObject(object.loadBalancer); - } - if (object.network != null) { - if (typeof object.network !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.network: object expected"); - message.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.fromObject(object.network); - } - if (object.gkeMaster != null) { - if (typeof object.gkeMaster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.gkeMaster: object expected"); - message.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.fromObject(object.gkeMaster); - } - if (object.cloudSqlInstance != null) { - if (typeof object.cloudSqlInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudSqlInstance: object expected"); - message.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.fromObject(object.cloudSqlInstance); - } - if (object.redisInstance != null) { - if (typeof object.redisInstance !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisInstance: object expected"); - message.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.fromObject(object.redisInstance); - } - if (object.redisCluster != null) { - if (typeof object.redisCluster !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.redisCluster: object expected"); - message.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.fromObject(object.redisCluster); - } - if (object.cloudFunction != null) { - if (typeof object.cloudFunction !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudFunction: object expected"); - message.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.fromObject(object.cloudFunction); - } - if (object.appEngineVersion != null) { - if (typeof object.appEngineVersion !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.appEngineVersion: object expected"); - message.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.fromObject(object.appEngineVersion); - } - if (object.cloudRunRevision != null) { - if (typeof object.cloudRunRevision !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.cloudRunRevision: object expected"); - message.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.fromObject(object.cloudRunRevision); - } - if (object.nat != null) { - if (typeof object.nat !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.nat: object expected"); - message.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.fromObject(object.nat); - } - if (object.proxyConnection != null) { - if (typeof object.proxyConnection !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.proxyConnection: object expected"); - message.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.fromObject(object.proxyConnection); - } - if (object.loadBalancerBackendInfo != null) { - if (typeof object.loadBalancerBackendInfo !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.loadBalancerBackendInfo: object expected"); - message.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.fromObject(object.loadBalancerBackendInfo); - } - if (object.storageBucket != null) { - if (typeof object.storageBucket !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.storageBucket: object expected"); - message.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.fromObject(object.storageBucket); - } - if (object.serverlessNeg != null) { - if (typeof object.serverlessNeg !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.Step.serverlessNeg: object expected"); - message.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.fromObject(object.serverlessNeg); - } - return message; - }; - - /** - * Creates a plain object from a Step message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {google.cloud.networkmanagement.v1beta1.Step} message Step - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Step.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.causesDrop = false; - object.projectId = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.Step.State[message.state] : message.state; - if (message.causesDrop != null && message.hasOwnProperty("causesDrop")) - object.causesDrop = message.causesDrop; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instance != null && message.hasOwnProperty("instance")) { - object.instance = $root.google.cloud.networkmanagement.v1beta1.InstanceInfo.toObject(message.instance, options); - if (options.oneofs) - object.stepInfo = "instance"; - } - if (message.firewall != null && message.hasOwnProperty("firewall")) { - object.firewall = $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.toObject(message.firewall, options); - if (options.oneofs) - object.stepInfo = "firewall"; - } - if (message.route != null && message.hasOwnProperty("route")) { - object.route = $root.google.cloud.networkmanagement.v1beta1.RouteInfo.toObject(message.route, options); - if (options.oneofs) - object.stepInfo = "route"; - } - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - object.endpoint = $root.google.cloud.networkmanagement.v1beta1.EndpointInfo.toObject(message.endpoint, options); - if (options.oneofs) - object.stepInfo = "endpoint"; - } - if (message.forwardingRule != null && message.hasOwnProperty("forwardingRule")) { - object.forwardingRule = $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.toObject(message.forwardingRule, options); - if (options.oneofs) - object.stepInfo = "forwardingRule"; - } - if (message.vpnGateway != null && message.hasOwnProperty("vpnGateway")) { - object.vpnGateway = $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.toObject(message.vpnGateway, options); - if (options.oneofs) - object.stepInfo = "vpnGateway"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - object.vpnTunnel = $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.toObject(message.vpnTunnel, options); - if (options.oneofs) - object.stepInfo = "vpnTunnel"; - } - if (message.deliver != null && message.hasOwnProperty("deliver")) { - object.deliver = $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.toObject(message.deliver, options); - if (options.oneofs) - object.stepInfo = "deliver"; - } - if (message.forward != null && message.hasOwnProperty("forward")) { - object.forward = $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.toObject(message.forward, options); - if (options.oneofs) - object.stepInfo = "forward"; - } - if (message.abort != null && message.hasOwnProperty("abort")) { - object.abort = $root.google.cloud.networkmanagement.v1beta1.AbortInfo.toObject(message.abort, options); - if (options.oneofs) - object.stepInfo = "abort"; - } - if (message.drop != null && message.hasOwnProperty("drop")) { - object.drop = $root.google.cloud.networkmanagement.v1beta1.DropInfo.toObject(message.drop, options); - if (options.oneofs) - object.stepInfo = "drop"; - } - if (message.loadBalancer != null && message.hasOwnProperty("loadBalancer")) { - object.loadBalancer = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.toObject(message.loadBalancer, options); - if (options.oneofs) - object.stepInfo = "loadBalancer"; - } - if (message.network != null && message.hasOwnProperty("network")) { - object.network = $root.google.cloud.networkmanagement.v1beta1.NetworkInfo.toObject(message.network, options); - if (options.oneofs) - object.stepInfo = "network"; - } - if (message.gkeMaster != null && message.hasOwnProperty("gkeMaster")) { - object.gkeMaster = $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo.toObject(message.gkeMaster, options); - if (options.oneofs) - object.stepInfo = "gkeMaster"; - } - if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) { - object.cloudSqlInstance = $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.toObject(message.cloudSqlInstance, options); - if (options.oneofs) - object.stepInfo = "cloudSqlInstance"; - } - if (message.cloudFunction != null && message.hasOwnProperty("cloudFunction")) { - object.cloudFunction = $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.toObject(message.cloudFunction, options); - if (options.oneofs) - object.stepInfo = "cloudFunction"; - } - if (message.vpcConnector != null && message.hasOwnProperty("vpcConnector")) { - object.vpcConnector = $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.toObject(message.vpcConnector, options); - if (options.oneofs) - object.stepInfo = "vpcConnector"; - } - if (message.appEngineVersion != null && message.hasOwnProperty("appEngineVersion")) { - object.appEngineVersion = $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.toObject(message.appEngineVersion, options); - if (options.oneofs) - object.stepInfo = "appEngineVersion"; - } - if (message.cloudRunRevision != null && message.hasOwnProperty("cloudRunRevision")) { - object.cloudRunRevision = $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.toObject(message.cloudRunRevision, options); - if (options.oneofs) - object.stepInfo = "cloudRunRevision"; - } - if (message.googleService != null && message.hasOwnProperty("googleService")) { - object.googleService = $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.toObject(message.googleService, options); - if (options.oneofs) - object.stepInfo = "googleService"; - } - if (message.nat != null && message.hasOwnProperty("nat")) { - object.nat = $root.google.cloud.networkmanagement.v1beta1.NatInfo.toObject(message.nat, options); - if (options.oneofs) - object.stepInfo = "nat"; - } - if (message.proxyConnection != null && message.hasOwnProperty("proxyConnection")) { - object.proxyConnection = $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.toObject(message.proxyConnection, options); - if (options.oneofs) - object.stepInfo = "proxyConnection"; - } - if (message.loadBalancerBackendInfo != null && message.hasOwnProperty("loadBalancerBackendInfo")) { - object.loadBalancerBackendInfo = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.toObject(message.loadBalancerBackendInfo, options); - if (options.oneofs) - object.stepInfo = "loadBalancerBackendInfo"; - } - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) { - object.storageBucket = $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo.toObject(message.storageBucket, options); - if (options.oneofs) - object.stepInfo = "storageBucket"; - } - if (message.serverlessNeg != null && message.hasOwnProperty("serverlessNeg")) { - object.serverlessNeg = $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.toObject(message.serverlessNeg, options); - if (options.oneofs) - object.stepInfo = "serverlessNeg"; - } - if (message.redisInstance != null && message.hasOwnProperty("redisInstance")) { - object.redisInstance = $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.toObject(message.redisInstance, options); - if (options.oneofs) - object.stepInfo = "redisInstance"; - } - if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) { - object.redisCluster = $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo.toObject(message.redisCluster, options); - if (options.oneofs) - object.stepInfo = "redisCluster"; - } - return object; - }; - - /** - * Converts this Step to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @instance - * @returns {Object.} JSON object - */ - Step.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Step - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.Step - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Step.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.Step"; - }; - - /** - * State enum. - * @name google.cloud.networkmanagement.v1beta1.Step.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} START_FROM_INSTANCE=1 START_FROM_INSTANCE value - * @property {number} START_FROM_INTERNET=2 START_FROM_INTERNET value - * @property {number} START_FROM_GOOGLE_SERVICE=27 START_FROM_GOOGLE_SERVICE value - * @property {number} START_FROM_PRIVATE_NETWORK=3 START_FROM_PRIVATE_NETWORK value - * @property {number} START_FROM_GKE_MASTER=21 START_FROM_GKE_MASTER value - * @property {number} START_FROM_CLOUD_SQL_INSTANCE=22 START_FROM_CLOUD_SQL_INSTANCE value - * @property {number} START_FROM_REDIS_INSTANCE=32 START_FROM_REDIS_INSTANCE value - * @property {number} START_FROM_REDIS_CLUSTER=33 START_FROM_REDIS_CLUSTER value - * @property {number} START_FROM_CLOUD_FUNCTION=23 START_FROM_CLOUD_FUNCTION value - * @property {number} START_FROM_APP_ENGINE_VERSION=25 START_FROM_APP_ENGINE_VERSION value - * @property {number} START_FROM_CLOUD_RUN_REVISION=26 START_FROM_CLOUD_RUN_REVISION value - * @property {number} START_FROM_STORAGE_BUCKET=29 START_FROM_STORAGE_BUCKET value - * @property {number} START_FROM_PSC_PUBLISHED_SERVICE=30 START_FROM_PSC_PUBLISHED_SERVICE value - * @property {number} START_FROM_SERVERLESS_NEG=31 START_FROM_SERVERLESS_NEG value - * @property {number} APPLY_INGRESS_FIREWALL_RULE=4 APPLY_INGRESS_FIREWALL_RULE value - * @property {number} APPLY_EGRESS_FIREWALL_RULE=5 APPLY_EGRESS_FIREWALL_RULE value - * @property {number} APPLY_ROUTE=6 APPLY_ROUTE value - * @property {number} APPLY_FORWARDING_RULE=7 APPLY_FORWARDING_RULE value - * @property {number} ANALYZE_LOAD_BALANCER_BACKEND=28 ANALYZE_LOAD_BALANCER_BACKEND value - * @property {number} SPOOFING_APPROVED=8 SPOOFING_APPROVED value - * @property {number} ARRIVE_AT_INSTANCE=9 ARRIVE_AT_INSTANCE value - * @property {number} ARRIVE_AT_INTERNAL_LOAD_BALANCER=10 ARRIVE_AT_INTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_EXTERNAL_LOAD_BALANCER=11 ARRIVE_AT_EXTERNAL_LOAD_BALANCER value - * @property {number} ARRIVE_AT_VPN_GATEWAY=12 ARRIVE_AT_VPN_GATEWAY value - * @property {number} ARRIVE_AT_VPN_TUNNEL=13 ARRIVE_AT_VPN_TUNNEL value - * @property {number} ARRIVE_AT_VPC_CONNECTOR=24 ARRIVE_AT_VPC_CONNECTOR value - * @property {number} NAT=14 NAT value - * @property {number} PROXY_CONNECTION=15 PROXY_CONNECTION value - * @property {number} DELIVER=16 DELIVER value - * @property {number} DROP=17 DROP value - * @property {number} FORWARD=18 FORWARD value - * @property {number} ABORT=19 ABORT value - * @property {number} VIEWER_PERMISSION_MISSING=20 VIEWER_PERMISSION_MISSING value - */ - Step.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "START_FROM_INSTANCE"] = 1; - values[valuesById[2] = "START_FROM_INTERNET"] = 2; - values[valuesById[27] = "START_FROM_GOOGLE_SERVICE"] = 27; - values[valuesById[3] = "START_FROM_PRIVATE_NETWORK"] = 3; - values[valuesById[21] = "START_FROM_GKE_MASTER"] = 21; - values[valuesById[22] = "START_FROM_CLOUD_SQL_INSTANCE"] = 22; - values[valuesById[32] = "START_FROM_REDIS_INSTANCE"] = 32; - values[valuesById[33] = "START_FROM_REDIS_CLUSTER"] = 33; - values[valuesById[23] = "START_FROM_CLOUD_FUNCTION"] = 23; - values[valuesById[25] = "START_FROM_APP_ENGINE_VERSION"] = 25; - values[valuesById[26] = "START_FROM_CLOUD_RUN_REVISION"] = 26; - values[valuesById[29] = "START_FROM_STORAGE_BUCKET"] = 29; - values[valuesById[30] = "START_FROM_PSC_PUBLISHED_SERVICE"] = 30; - values[valuesById[31] = "START_FROM_SERVERLESS_NEG"] = 31; - values[valuesById[4] = "APPLY_INGRESS_FIREWALL_RULE"] = 4; - values[valuesById[5] = "APPLY_EGRESS_FIREWALL_RULE"] = 5; - values[valuesById[6] = "APPLY_ROUTE"] = 6; - values[valuesById[7] = "APPLY_FORWARDING_RULE"] = 7; - values[valuesById[28] = "ANALYZE_LOAD_BALANCER_BACKEND"] = 28; - values[valuesById[8] = "SPOOFING_APPROVED"] = 8; - values[valuesById[9] = "ARRIVE_AT_INSTANCE"] = 9; - values[valuesById[10] = "ARRIVE_AT_INTERNAL_LOAD_BALANCER"] = 10; - values[valuesById[11] = "ARRIVE_AT_EXTERNAL_LOAD_BALANCER"] = 11; - values[valuesById[12] = "ARRIVE_AT_VPN_GATEWAY"] = 12; - values[valuesById[13] = "ARRIVE_AT_VPN_TUNNEL"] = 13; - values[valuesById[24] = "ARRIVE_AT_VPC_CONNECTOR"] = 24; - values[valuesById[14] = "NAT"] = 14; - values[valuesById[15] = "PROXY_CONNECTION"] = 15; - values[valuesById[16] = "DELIVER"] = 16; - values[valuesById[17] = "DROP"] = 17; - values[valuesById[18] = "FORWARD"] = 18; - values[valuesById[19] = "ABORT"] = 19; - values[valuesById[20] = "VIEWER_PERMISSION_MISSING"] = 20; - return values; - })(); - - return Step; - })(); - - v1beta1.InstanceInfo = (function() { - - /** - * Properties of an InstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IInstanceInfo - * @property {string|null} [displayName] InstanceInfo displayName - * @property {string|null} [uri] InstanceInfo uri - * @property {string|null} ["interface"] InstanceInfo interface - * @property {string|null} [networkUri] InstanceInfo networkUri - * @property {string|null} [internalIp] InstanceInfo internalIp - * @property {string|null} [externalIp] InstanceInfo externalIp - * @property {Array.|null} [networkTags] InstanceInfo networkTags - * @property {string|null} [serviceAccount] InstanceInfo serviceAccount - * @property {string|null} [pscNetworkAttachmentUri] InstanceInfo pscNetworkAttachmentUri - */ - - /** - * Constructs a new InstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an InstanceInfo. - * @implements IInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set - */ - function InstanceInfo(properties) { - this.networkTags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.displayName = ""; - - /** - * InstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.uri = ""; - - /** - * InstanceInfo interface. - * @member {string} interface - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype["interface"] = ""; - - /** - * InstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkUri = ""; - - /** - * InstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.internalIp = ""; - - /** - * InstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.externalIp = ""; - - /** - * InstanceInfo networkTags. - * @member {Array.} networkTags - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.networkTags = $util.emptyArray; - - /** - * InstanceInfo serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.serviceAccount = ""; - - /** - * InstanceInfo pscNetworkAttachmentUri. - * @member {string} pscNetworkAttachmentUri - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - */ - InstanceInfo.prototype.pscNetworkAttachmentUri = ""; - - /** - * Creates a new InstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo instance - */ - InstanceInfo.create = function create(properties) { - return new InstanceInfo(properties); - }; - - /** - * Encodes the specified InstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message["interface"] != null && Object.hasOwnProperty.call(message, "interface")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message["interface"]); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.networkTags != null && message.networkTags.length) - for (var i = 0; i < message.networkTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkTags[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.serviceAccount); - if (message.pscNetworkAttachmentUri != null && Object.hasOwnProperty.call(message, "pscNetworkAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscNetworkAttachmentUri); - return writer; - }; - - /** - * Encodes the specified InstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.InstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IInstanceInfo} message InstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message["interface"] = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - if (!(message.networkTags && message.networkTags.length)) - message.networkTags = []; - message.networkTags.push(reader.string()); - break; - } - case 8: { - message.serviceAccount = reader.string(); - break; - } - case 9: { - message.pscNetworkAttachmentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message["interface"] != null && message.hasOwnProperty("interface")) - if (!$util.isString(message["interface"])) - return "interface: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - if (!Array.isArray(message.networkTags)) - return "networkTags: array expected"; - for (var i = 0; i < message.networkTags.length; ++i) - if (!$util.isString(message.networkTags[i])) - return "networkTags: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - if (!$util.isString(message.pscNetworkAttachmentUri)) - return "pscNetworkAttachmentUri: string expected"; - return null; - }; - - /** - * Creates an InstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.InstanceInfo} InstanceInfo - */ - InstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.InstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.InstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object["interface"] != null) - message["interface"] = String(object["interface"]); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.networkTags) { - if (!Array.isArray(object.networkTags)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.InstanceInfo.networkTags: array expected"); - message.networkTags = []; - for (var i = 0; i < object.networkTags.length; ++i) - message.networkTags[i] = String(object.networkTags[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.pscNetworkAttachmentUri != null) - message.pscNetworkAttachmentUri = String(object.pscNetworkAttachmentUri); - return message; - }; - - /** - * Creates a plain object from an InstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.InstanceInfo} message InstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.networkTags = []; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object["interface"] = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.serviceAccount = ""; - object.pscNetworkAttachmentUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message["interface"] != null && message.hasOwnProperty("interface")) - object["interface"] = message["interface"]; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.networkTags && message.networkTags.length) { - object.networkTags = []; - for (var j = 0; j < message.networkTags.length; ++j) - object.networkTags[j] = message.networkTags[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.pscNetworkAttachmentUri != null && message.hasOwnProperty("pscNetworkAttachmentUri")) - object.pscNetworkAttachmentUri = message.pscNetworkAttachmentUri; - return object; - }; - - /** - * Converts this InstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @instance - * @returns {Object.} JSON object - */ - InstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for InstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.InstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - InstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.InstanceInfo"; - }; - - return InstanceInfo; - })(); - - v1beta1.NetworkInfo = (function() { - - /** - * Properties of a NetworkInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface INetworkInfo - * @property {string|null} [displayName] NetworkInfo displayName - * @property {string|null} [uri] NetworkInfo uri - * @property {string|null} [matchedSubnetUri] NetworkInfo matchedSubnetUri - * @property {string|null} [matchedIpRange] NetworkInfo matchedIpRange - * @property {string|null} [region] NetworkInfo region - */ - - /** - * Constructs a new NetworkInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a NetworkInfo. - * @implements INetworkInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set - */ - function NetworkInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.displayName = ""; - - /** - * NetworkInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.uri = ""; - - /** - * NetworkInfo matchedSubnetUri. - * @member {string} matchedSubnetUri - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedSubnetUri = ""; - - /** - * NetworkInfo matchedIpRange. - * @member {string} matchedIpRange - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.matchedIpRange = ""; - - /** - * NetworkInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - */ - NetworkInfo.prototype.region = ""; - - /** - * Creates a new NetworkInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo instance - */ - NetworkInfo.create = function create(properties) { - return new NetworkInfo(properties); - }; - - /** - * Encodes the specified NetworkInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedIpRange != null && Object.hasOwnProperty.call(message, "matchedIpRange")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.matchedIpRange); - if (message.matchedSubnetUri != null && Object.hasOwnProperty.call(message, "matchedSubnetUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.matchedSubnetUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified NetworkInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NetworkInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INetworkInfo} message NetworkInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 5: { - message.matchedSubnetUri = reader.string(); - break; - } - case 4: { - message.matchedIpRange = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - if (!$util.isString(message.matchedSubnetUri)) - return "matchedSubnetUri: string expected"; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - if (!$util.isString(message.matchedIpRange)) - return "matchedIpRange: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a NetworkInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.NetworkInfo} NetworkInfo - */ - NetworkInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NetworkInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.NetworkInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedSubnetUri != null) - message.matchedSubnetUri = String(object.matchedSubnetUri); - if (object.matchedIpRange != null) - message.matchedIpRange = String(object.matchedIpRange); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a NetworkInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.NetworkInfo} message NetworkInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedIpRange = ""; - object.matchedSubnetUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedIpRange != null && message.hasOwnProperty("matchedIpRange")) - object.matchedIpRange = message.matchedIpRange; - if (message.matchedSubnetUri != null && message.hasOwnProperty("matchedSubnetUri")) - object.matchedSubnetUri = message.matchedSubnetUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this NetworkInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @instance - * @returns {Object.} JSON object - */ - NetworkInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.NetworkInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NetworkInfo"; - }; - - return NetworkInfo; - })(); - - v1beta1.FirewallInfo = (function() { - - /** - * Properties of a FirewallInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IFirewallInfo - * @property {string|null} [displayName] FirewallInfo displayName - * @property {string|null} [uri] FirewallInfo uri - * @property {string|null} [direction] FirewallInfo direction - * @property {string|null} [action] FirewallInfo action - * @property {number|null} [priority] FirewallInfo priority - * @property {string|null} [networkUri] FirewallInfo networkUri - * @property {Array.|null} [targetTags] FirewallInfo targetTags - * @property {Array.|null} [targetServiceAccounts] FirewallInfo targetServiceAccounts - * @property {string|null} [policy] FirewallInfo policy - * @property {string|null} [policyUri] FirewallInfo policyUri - * @property {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType|null} [firewallRuleType] FirewallInfo firewallRuleType - */ - - /** - * Constructs a new FirewallInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a FirewallInfo. - * @implements IFirewallInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set - */ - function FirewallInfo(properties) { - this.targetTags = []; - this.targetServiceAccounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FirewallInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.displayName = ""; - - /** - * FirewallInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.uri = ""; - - /** - * FirewallInfo direction. - * @member {string} direction - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.direction = ""; - - /** - * FirewallInfo action. - * @member {string} action - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.action = ""; - - /** - * FirewallInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.priority = 0; - - /** - * FirewallInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.networkUri = ""; - - /** - * FirewallInfo targetTags. - * @member {Array.} targetTags - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetTags = $util.emptyArray; - - /** - * FirewallInfo targetServiceAccounts. - * @member {Array.} targetServiceAccounts - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.targetServiceAccounts = $util.emptyArray; - - /** - * FirewallInfo policy. - * @member {string} policy - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policy = ""; - - /** - * FirewallInfo policyUri. - * @member {string} policyUri - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.policyUri = ""; - - /** - * FirewallInfo firewallRuleType. - * @member {google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType} firewallRuleType - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - */ - FirewallInfo.prototype.firewallRuleType = 0; - - /** - * Creates a new FirewallInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo instance - */ - FirewallInfo.create = function create(properties) { - return new FirewallInfo(properties); - }; - - /** - * Encodes the specified FirewallInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.direction != null && Object.hasOwnProperty.call(message, "direction")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.direction); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.action); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priority); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.networkUri); - if (message.targetTags != null && message.targetTags.length) - for (var i = 0; i < message.targetTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.targetTags[i]); - if (message.targetServiceAccounts != null && message.targetServiceAccounts.length) - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.targetServiceAccounts[i]); - if (message.policy != null && Object.hasOwnProperty.call(message, "policy")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.policy); - if (message.firewallRuleType != null && Object.hasOwnProperty.call(message, "firewallRuleType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.firewallRuleType); - if (message.policyUri != null && Object.hasOwnProperty.call(message, "policyUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.policyUri); - return writer; - }; - - /** - * Encodes the specified FirewallInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.FirewallInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IFirewallInfo} message FirewallInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FirewallInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.direction = reader.string(); - break; - } - case 4: { - message.action = reader.string(); - break; - } - case 5: { - message.priority = reader.int32(); - break; - } - case 6: { - message.networkUri = reader.string(); - break; - } - case 7: { - if (!(message.targetTags && message.targetTags.length)) - message.targetTags = []; - message.targetTags.push(reader.string()); - break; - } - case 8: { - if (!(message.targetServiceAccounts && message.targetServiceAccounts.length)) - message.targetServiceAccounts = []; - message.targetServiceAccounts.push(reader.string()); - break; - } - case 9: { - message.policy = reader.string(); - break; - } - case 11: { - message.policyUri = reader.string(); - break; - } - case 10: { - message.firewallRuleType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FirewallInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FirewallInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FirewallInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FirewallInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.direction != null && message.hasOwnProperty("direction")) - if (!$util.isString(message.direction)) - return "direction: string expected"; - if (message.action != null && message.hasOwnProperty("action")) - if (!$util.isString(message.action)) - return "action: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.targetTags != null && message.hasOwnProperty("targetTags")) { - if (!Array.isArray(message.targetTags)) - return "targetTags: array expected"; - for (var i = 0; i < message.targetTags.length; ++i) - if (!$util.isString(message.targetTags[i])) - return "targetTags: string[] expected"; - } - if (message.targetServiceAccounts != null && message.hasOwnProperty("targetServiceAccounts")) { - if (!Array.isArray(message.targetServiceAccounts)) - return "targetServiceAccounts: array expected"; - for (var i = 0; i < message.targetServiceAccounts.length; ++i) - if (!$util.isString(message.targetServiceAccounts[i])) - return "targetServiceAccounts: string[] expected"; - } - if (message.policy != null && message.hasOwnProperty("policy")) - if (!$util.isString(message.policy)) - return "policy: string expected"; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - if (!$util.isString(message.policyUri)) - return "policyUri: string expected"; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - switch (message.firewallRuleType) { - default: - return "firewallRuleType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 100: - case 101: - break; - } - return null; - }; - - /** - * Creates a FirewallInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.FirewallInfo} FirewallInfo - */ - FirewallInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.FirewallInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.FirewallInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.direction != null) - message.direction = String(object.direction); - if (object.action != null) - message.action = String(object.action); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.targetTags) { - if (!Array.isArray(object.targetTags)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetTags: array expected"); - message.targetTags = []; - for (var i = 0; i < object.targetTags.length; ++i) - message.targetTags[i] = String(object.targetTags[i]); - } - if (object.targetServiceAccounts) { - if (!Array.isArray(object.targetServiceAccounts)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.FirewallInfo.targetServiceAccounts: array expected"); - message.targetServiceAccounts = []; - for (var i = 0; i < object.targetServiceAccounts.length; ++i) - message.targetServiceAccounts[i] = String(object.targetServiceAccounts[i]); - } - if (object.policy != null) - message.policy = String(object.policy); - if (object.policyUri != null) - message.policyUri = String(object.policyUri); - switch (object.firewallRuleType) { - default: - if (typeof object.firewallRuleType === "number") { - message.firewallRuleType = object.firewallRuleType; - break; - } - break; - case "FIREWALL_RULE_TYPE_UNSPECIFIED": - case 0: - message.firewallRuleType = 0; - break; - case "HIERARCHICAL_FIREWALL_POLICY_RULE": - case 1: - message.firewallRuleType = 1; - break; - case "VPC_FIREWALL_RULE": - case 2: - message.firewallRuleType = 2; - break; - case "IMPLIED_VPC_FIREWALL_RULE": - case 3: - message.firewallRuleType = 3; - break; - case "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": - case 4: - message.firewallRuleType = 4; - break; - case "NETWORK_FIREWALL_POLICY_RULE": - case 5: - message.firewallRuleType = 5; - break; - case "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": - case 6: - message.firewallRuleType = 6; - break; - case "UNSUPPORTED_FIREWALL_POLICY_RULE": - case 100: - message.firewallRuleType = 100; - break; - case "TRACKING_STATE": - case 101: - message.firewallRuleType = 101; - break; - } - return message; - }; - - /** - * Creates a plain object from a FirewallInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.FirewallInfo} message FirewallInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FirewallInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targetTags = []; - object.targetServiceAccounts = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.direction = ""; - object.action = ""; - object.priority = 0; - object.networkUri = ""; - object.policy = ""; - object.firewallRuleType = options.enums === String ? "FIREWALL_RULE_TYPE_UNSPECIFIED" : 0; - object.policyUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = message.direction; - if (message.action != null && message.hasOwnProperty("action")) - object.action = message.action; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.targetTags && message.targetTags.length) { - object.targetTags = []; - for (var j = 0; j < message.targetTags.length; ++j) - object.targetTags[j] = message.targetTags[j]; - } - if (message.targetServiceAccounts && message.targetServiceAccounts.length) { - object.targetServiceAccounts = []; - for (var j = 0; j < message.targetServiceAccounts.length; ++j) - object.targetServiceAccounts[j] = message.targetServiceAccounts[j]; - } - if (message.policy != null && message.hasOwnProperty("policy")) - object.policy = message.policy; - if (message.firewallRuleType != null && message.hasOwnProperty("firewallRuleType")) - object.firewallRuleType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] === undefined ? message.firewallRuleType : $root.google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType[message.firewallRuleType] : message.firewallRuleType; - if (message.policyUri != null && message.hasOwnProperty("policyUri")) - object.policyUri = message.policyUri; - return object; - }; - - /** - * Converts this FirewallInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @instance - * @returns {Object.} JSON object - */ - FirewallInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FirewallInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.FirewallInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FirewallInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.FirewallInfo"; - }; - - /** - * FirewallRuleType enum. - * @name google.cloud.networkmanagement.v1beta1.FirewallInfo.FirewallRuleType - * @enum {number} - * @property {number} FIREWALL_RULE_TYPE_UNSPECIFIED=0 FIREWALL_RULE_TYPE_UNSPECIFIED value - * @property {number} HIERARCHICAL_FIREWALL_POLICY_RULE=1 HIERARCHICAL_FIREWALL_POLICY_RULE value - * @property {number} VPC_FIREWALL_RULE=2 VPC_FIREWALL_RULE value - * @property {number} IMPLIED_VPC_FIREWALL_RULE=3 IMPLIED_VPC_FIREWALL_RULE value - * @property {number} SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE=4 SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE value - * @property {number} NETWORK_FIREWALL_POLICY_RULE=5 NETWORK_FIREWALL_POLICY_RULE value - * @property {number} NETWORK_REGIONAL_FIREWALL_POLICY_RULE=6 NETWORK_REGIONAL_FIREWALL_POLICY_RULE value - * @property {number} UNSUPPORTED_FIREWALL_POLICY_RULE=100 UNSUPPORTED_FIREWALL_POLICY_RULE value - * @property {number} TRACKING_STATE=101 TRACKING_STATE value - */ - FirewallInfo.FirewallRuleType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIREWALL_RULE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIERARCHICAL_FIREWALL_POLICY_RULE"] = 1; - values[valuesById[2] = "VPC_FIREWALL_RULE"] = 2; - values[valuesById[3] = "IMPLIED_VPC_FIREWALL_RULE"] = 3; - values[valuesById[4] = "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE"] = 4; - values[valuesById[5] = "NETWORK_FIREWALL_POLICY_RULE"] = 5; - values[valuesById[6] = "NETWORK_REGIONAL_FIREWALL_POLICY_RULE"] = 6; - values[valuesById[100] = "UNSUPPORTED_FIREWALL_POLICY_RULE"] = 100; - values[valuesById[101] = "TRACKING_STATE"] = 101; - return values; - })(); - - return FirewallInfo; - })(); - - v1beta1.RouteInfo = (function() { - - /** - * Properties of a RouteInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRouteInfo - * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType|null} [routeType] RouteInfo routeType - * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType|null} [nextHopType] RouteInfo nextHopType - * @property {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope|null} [routeScope] RouteInfo routeScope - * @property {string|null} [displayName] RouteInfo displayName - * @property {string|null} [uri] RouteInfo uri - * @property {string|null} [region] RouteInfo region - * @property {string|null} [destIpRange] RouteInfo destIpRange - * @property {string|null} [nextHop] RouteInfo nextHop - * @property {string|null} [networkUri] RouteInfo networkUri - * @property {number|null} [priority] RouteInfo priority - * @property {Array.|null} [instanceTags] RouteInfo instanceTags - * @property {string|null} [srcIpRange] RouteInfo srcIpRange - * @property {Array.|null} [destPortRanges] RouteInfo destPortRanges - * @property {Array.|null} [srcPortRanges] RouteInfo srcPortRanges - * @property {Array.|null} [protocols] RouteInfo protocols - * @property {string|null} [nccHubUri] RouteInfo nccHubUri - * @property {string|null} [nccSpokeUri] RouteInfo nccSpokeUri - * @property {string|null} [advertisedRouteSourceRouterUri] RouteInfo advertisedRouteSourceRouterUri - * @property {string|null} [advertisedRouteNextHopUri] RouteInfo advertisedRouteNextHopUri - */ - - /** - * Constructs a new RouteInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RouteInfo. - * @implements IRouteInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set - */ - function RouteInfo(properties) { - this.instanceTags = []; - this.destPortRanges = []; - this.srcPortRanges = []; - this.protocols = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RouteInfo routeType. - * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType} routeType - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeType = 0; - - /** - * RouteInfo nextHopType. - * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType} nextHopType - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHopType = 0; - - /** - * RouteInfo routeScope. - * @member {google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope} routeScope - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.routeScope = 0; - - /** - * RouteInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.displayName = ""; - - /** - * RouteInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.uri = ""; - - /** - * RouteInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.region = ""; - - /** - * RouteInfo destIpRange. - * @member {string} destIpRange - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.destIpRange = ""; - - /** - * RouteInfo nextHop. - * @member {string} nextHop - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nextHop = ""; - - /** - * RouteInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.networkUri = ""; - - /** - * RouteInfo priority. - * @member {number} priority - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.priority = 0; - - /** - * RouteInfo instanceTags. - * @member {Array.} instanceTags - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.instanceTags = $util.emptyArray; - - /** - * RouteInfo srcIpRange. - * @member {string} srcIpRange - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcIpRange = ""; - - /** - * RouteInfo destPortRanges. - * @member {Array.} destPortRanges - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.destPortRanges = $util.emptyArray; - - /** - * RouteInfo srcPortRanges. - * @member {Array.} srcPortRanges - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.srcPortRanges = $util.emptyArray; - - /** - * RouteInfo protocols. - * @member {Array.} protocols - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.protocols = $util.emptyArray; - - /** - * RouteInfo nccHubUri. - * @member {string|null|undefined} nccHubUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccHubUri = null; - - /** - * RouteInfo nccSpokeUri. - * @member {string|null|undefined} nccSpokeUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.nccSpokeUri = null; - - /** - * RouteInfo advertisedRouteSourceRouterUri. - * @member {string|null|undefined} advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteSourceRouterUri = null; - - /** - * RouteInfo advertisedRouteNextHopUri. - * @member {string|null|undefined} advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - RouteInfo.prototype.advertisedRouteNextHopUri = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RouteInfo _nccHubUri. - * @member {"nccHubUri"|undefined} _nccHubUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccHubUri", { - get: $util.oneOfGetter($oneOfFields = ["nccHubUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _nccSpokeUri. - * @member {"nccSpokeUri"|undefined} _nccSpokeUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_nccSpokeUri", { - get: $util.oneOfGetter($oneOfFields = ["nccSpokeUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteSourceRouterUri. - * @member {"advertisedRouteSourceRouterUri"|undefined} _advertisedRouteSourceRouterUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteSourceRouterUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteSourceRouterUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * RouteInfo _advertisedRouteNextHopUri. - * @member {"advertisedRouteNextHopUri"|undefined} _advertisedRouteNextHopUri - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - */ - Object.defineProperty(RouteInfo.prototype, "_advertisedRouteNextHopUri", { - get: $util.oneOfGetter($oneOfFields = ["advertisedRouteNextHopUri"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new RouteInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo instance - */ - RouteInfo.create = function create(properties) { - return new RouteInfo(properties); - }; - - /** - * Encodes the specified RouteInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.destIpRange != null && Object.hasOwnProperty.call(message, "destIpRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.destIpRange); - if (message.nextHop != null && Object.hasOwnProperty.call(message, "nextHop")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.nextHop); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkUri); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priority); - if (message.instanceTags != null && message.instanceTags.length) - for (var i = 0; i < message.instanceTags.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.instanceTags[i]); - if (message.routeType != null && Object.hasOwnProperty.call(message, "routeType")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.routeType); - if (message.nextHopType != null && Object.hasOwnProperty.call(message, "nextHopType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.nextHopType); - if (message.srcIpRange != null && Object.hasOwnProperty.call(message, "srcIpRange")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.srcIpRange); - if (message.destPortRanges != null && message.destPortRanges.length) - for (var i = 0; i < message.destPortRanges.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.destPortRanges[i]); - if (message.srcPortRanges != null && message.srcPortRanges.length) - for (var i = 0; i < message.srcPortRanges.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.srcPortRanges[i]); - if (message.protocols != null && message.protocols.length) - for (var i = 0; i < message.protocols.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.protocols[i]); - if (message.routeScope != null && Object.hasOwnProperty.call(message, "routeScope")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.routeScope); - if (message.nccHubUri != null && Object.hasOwnProperty.call(message, "nccHubUri")) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.nccHubUri); - if (message.nccSpokeUri != null && Object.hasOwnProperty.call(message, "nccSpokeUri")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.nccSpokeUri); - if (message.advertisedRouteSourceRouterUri != null && Object.hasOwnProperty.call(message, "advertisedRouteSourceRouterUri")) - writer.uint32(/* id 17, wireType 2 =*/138).string(message.advertisedRouteSourceRouterUri); - if (message.advertisedRouteNextHopUri != null && Object.hasOwnProperty.call(message, "advertisedRouteNextHopUri")) - writer.uint32(/* id 18, wireType 2 =*/146).string(message.advertisedRouteNextHopUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.region); - return writer; - }; - - /** - * Encodes the specified RouteInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RouteInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRouteInfo} message RouteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RouteInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 8: { - message.routeType = reader.int32(); - break; - } - case 9: { - message.nextHopType = reader.int32(); - break; - } - case 14: { - message.routeScope = reader.int32(); - break; - } - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 19: { - message.region = reader.string(); - break; - } - case 3: { - message.destIpRange = reader.string(); - break; - } - case 4: { - message.nextHop = reader.string(); - break; - } - case 5: { - message.networkUri = reader.string(); - break; - } - case 6: { - message.priority = reader.int32(); - break; - } - case 7: { - if (!(message.instanceTags && message.instanceTags.length)) - message.instanceTags = []; - message.instanceTags.push(reader.string()); - break; - } - case 10: { - message.srcIpRange = reader.string(); - break; - } - case 11: { - if (!(message.destPortRanges && message.destPortRanges.length)) - message.destPortRanges = []; - message.destPortRanges.push(reader.string()); - break; - } - case 12: { - if (!(message.srcPortRanges && message.srcPortRanges.length)) - message.srcPortRanges = []; - message.srcPortRanges.push(reader.string()); - break; - } - case 13: { - if (!(message.protocols && message.protocols.length)) - message.protocols = []; - message.protocols.push(reader.string()); - break; - } - case 15: { - message.nccHubUri = reader.string(); - break; - } - case 16: { - message.nccSpokeUri = reader.string(); - break; - } - case 17: { - message.advertisedRouteSourceRouterUri = reader.string(); - break; - } - case 18: { - message.advertisedRouteNextHopUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RouteInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RouteInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RouteInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RouteInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.routeType != null && message.hasOwnProperty("routeType")) - switch (message.routeType) { - default: - return "routeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 101: - break; - } - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - switch (message.nextHopType) { - default: - return "nextHopType: 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.routeScope != null && message.hasOwnProperty("routeScope")) - switch (message.routeScope) { - default: - return "routeScope: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - if (!$util.isString(message.destIpRange)) - return "destIpRange: string expected"; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - if (!$util.isString(message.nextHop)) - return "nextHop: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - if (!$util.isInteger(message.priority)) - return "priority: integer expected"; - if (message.instanceTags != null && message.hasOwnProperty("instanceTags")) { - if (!Array.isArray(message.instanceTags)) - return "instanceTags: array expected"; - for (var i = 0; i < message.instanceTags.length; ++i) - if (!$util.isString(message.instanceTags[i])) - return "instanceTags: string[] expected"; - } - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - if (!$util.isString(message.srcIpRange)) - return "srcIpRange: string expected"; - if (message.destPortRanges != null && message.hasOwnProperty("destPortRanges")) { - if (!Array.isArray(message.destPortRanges)) - return "destPortRanges: array expected"; - for (var i = 0; i < message.destPortRanges.length; ++i) - if (!$util.isString(message.destPortRanges[i])) - return "destPortRanges: string[] expected"; - } - if (message.srcPortRanges != null && message.hasOwnProperty("srcPortRanges")) { - if (!Array.isArray(message.srcPortRanges)) - return "srcPortRanges: array expected"; - for (var i = 0; i < message.srcPortRanges.length; ++i) - if (!$util.isString(message.srcPortRanges[i])) - return "srcPortRanges: string[] expected"; - } - if (message.protocols != null && message.hasOwnProperty("protocols")) { - if (!Array.isArray(message.protocols)) - return "protocols: array expected"; - for (var i = 0; i < message.protocols.length; ++i) - if (!$util.isString(message.protocols[i])) - return "protocols: string[] expected"; - } - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - properties._nccHubUri = 1; - if (!$util.isString(message.nccHubUri)) - return "nccHubUri: string expected"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - properties._nccSpokeUri = 1; - if (!$util.isString(message.nccSpokeUri)) - return "nccSpokeUri: string expected"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - properties._advertisedRouteSourceRouterUri = 1; - if (!$util.isString(message.advertisedRouteSourceRouterUri)) - return "advertisedRouteSourceRouterUri: string expected"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - properties._advertisedRouteNextHopUri = 1; - if (!$util.isString(message.advertisedRouteNextHopUri)) - return "advertisedRouteNextHopUri: string expected"; - } - return null; - }; - - /** - * Creates a RouteInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RouteInfo} RouteInfo - */ - RouteInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RouteInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RouteInfo(); - switch (object.routeType) { - default: - if (typeof object.routeType === "number") { - message.routeType = object.routeType; - break; - } - break; - case "ROUTE_TYPE_UNSPECIFIED": - case 0: - message.routeType = 0; - break; - case "SUBNET": - case 1: - message.routeType = 1; - break; - case "STATIC": - case 2: - message.routeType = 2; - break; - case "DYNAMIC": - case 3: - message.routeType = 3; - break; - case "PEERING_SUBNET": - case 4: - message.routeType = 4; - break; - case "PEERING_STATIC": - case 5: - message.routeType = 5; - break; - case "PEERING_DYNAMIC": - case 6: - message.routeType = 6; - break; - case "POLICY_BASED": - case 7: - message.routeType = 7; - break; - case "ADVERTISED": - case 101: - message.routeType = 101; - break; - } - switch (object.nextHopType) { - default: - if (typeof object.nextHopType === "number") { - message.nextHopType = object.nextHopType; - break; - } - break; - case "NEXT_HOP_TYPE_UNSPECIFIED": - case 0: - message.nextHopType = 0; - break; - case "NEXT_HOP_IP": - case 1: - message.nextHopType = 1; - break; - case "NEXT_HOP_INSTANCE": - case 2: - message.nextHopType = 2; - break; - case "NEXT_HOP_NETWORK": - case 3: - message.nextHopType = 3; - break; - case "NEXT_HOP_PEERING": - case 4: - message.nextHopType = 4; - break; - case "NEXT_HOP_INTERCONNECT": - case 5: - message.nextHopType = 5; - break; - case "NEXT_HOP_VPN_TUNNEL": - case 6: - message.nextHopType = 6; - break; - case "NEXT_HOP_VPN_GATEWAY": - case 7: - message.nextHopType = 7; - break; - case "NEXT_HOP_INTERNET_GATEWAY": - case 8: - message.nextHopType = 8; - break; - case "NEXT_HOP_BLACKHOLE": - case 9: - message.nextHopType = 9; - break; - case "NEXT_HOP_ILB": - case 10: - message.nextHopType = 10; - break; - case "NEXT_HOP_ROUTER_APPLIANCE": - case 11: - message.nextHopType = 11; - break; - case "NEXT_HOP_NCC_HUB": - case 12: - message.nextHopType = 12; - break; - } - switch (object.routeScope) { - default: - if (typeof object.routeScope === "number") { - message.routeScope = object.routeScope; - break; - } - break; - case "ROUTE_SCOPE_UNSPECIFIED": - case 0: - message.routeScope = 0; - break; - case "NETWORK": - case 1: - message.routeScope = 1; - break; - case "NCC_HUB": - case 2: - message.routeScope = 2; - break; - } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.region != null) - message.region = String(object.region); - if (object.destIpRange != null) - message.destIpRange = String(object.destIpRange); - if (object.nextHop != null) - message.nextHop = String(object.nextHop); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.priority != null) - message.priority = object.priority | 0; - if (object.instanceTags) { - if (!Array.isArray(object.instanceTags)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.instanceTags: array expected"); - message.instanceTags = []; - for (var i = 0; i < object.instanceTags.length; ++i) - message.instanceTags[i] = String(object.instanceTags[i]); - } - if (object.srcIpRange != null) - message.srcIpRange = String(object.srcIpRange); - if (object.destPortRanges) { - if (!Array.isArray(object.destPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.destPortRanges: array expected"); - message.destPortRanges = []; - for (var i = 0; i < object.destPortRanges.length; ++i) - message.destPortRanges[i] = String(object.destPortRanges[i]); - } - if (object.srcPortRanges) { - if (!Array.isArray(object.srcPortRanges)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.srcPortRanges: array expected"); - message.srcPortRanges = []; - for (var i = 0; i < object.srcPortRanges.length; ++i) - message.srcPortRanges[i] = String(object.srcPortRanges[i]); - } - if (object.protocols) { - if (!Array.isArray(object.protocols)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.RouteInfo.protocols: array expected"); - message.protocols = []; - for (var i = 0; i < object.protocols.length; ++i) - message.protocols[i] = String(object.protocols[i]); - } - if (object.nccHubUri != null) - message.nccHubUri = String(object.nccHubUri); - if (object.nccSpokeUri != null) - message.nccSpokeUri = String(object.nccSpokeUri); - if (object.advertisedRouteSourceRouterUri != null) - message.advertisedRouteSourceRouterUri = String(object.advertisedRouteSourceRouterUri); - if (object.advertisedRouteNextHopUri != null) - message.advertisedRouteNextHopUri = String(object.advertisedRouteNextHopUri); - return message; - }; - - /** - * Creates a plain object from a RouteInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.RouteInfo} message RouteInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RouteInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.instanceTags = []; - object.destPortRanges = []; - object.srcPortRanges = []; - object.protocols = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.destIpRange = ""; - object.nextHop = ""; - object.networkUri = ""; - object.priority = 0; - object.routeType = options.enums === String ? "ROUTE_TYPE_UNSPECIFIED" : 0; - object.nextHopType = options.enums === String ? "NEXT_HOP_TYPE_UNSPECIFIED" : 0; - object.srcIpRange = ""; - object.routeScope = options.enums === String ? "ROUTE_SCOPE_UNSPECIFIED" : 0; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.destIpRange != null && message.hasOwnProperty("destIpRange")) - object.destIpRange = message.destIpRange; - if (message.nextHop != null && message.hasOwnProperty("nextHop")) - object.nextHop = message.nextHop; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = message.priority; - if (message.instanceTags && message.instanceTags.length) { - object.instanceTags = []; - for (var j = 0; j < message.instanceTags.length; ++j) - object.instanceTags[j] = message.instanceTags[j]; - } - if (message.routeType != null && message.hasOwnProperty("routeType")) - object.routeType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] === undefined ? message.routeType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType[message.routeType] : message.routeType; - if (message.nextHopType != null && message.hasOwnProperty("nextHopType")) - object.nextHopType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] === undefined ? message.nextHopType : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType[message.nextHopType] : message.nextHopType; - if (message.srcIpRange != null && message.hasOwnProperty("srcIpRange")) - object.srcIpRange = message.srcIpRange; - if (message.destPortRanges && message.destPortRanges.length) { - object.destPortRanges = []; - for (var j = 0; j < message.destPortRanges.length; ++j) - object.destPortRanges[j] = message.destPortRanges[j]; - } - if (message.srcPortRanges && message.srcPortRanges.length) { - object.srcPortRanges = []; - for (var j = 0; j < message.srcPortRanges.length; ++j) - object.srcPortRanges[j] = message.srcPortRanges[j]; - } - if (message.protocols && message.protocols.length) { - object.protocols = []; - for (var j = 0; j < message.protocols.length; ++j) - object.protocols[j] = message.protocols[j]; - } - if (message.routeScope != null && message.hasOwnProperty("routeScope")) - object.routeScope = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] === undefined ? message.routeScope : $root.google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope[message.routeScope] : message.routeScope; - if (message.nccHubUri != null && message.hasOwnProperty("nccHubUri")) { - object.nccHubUri = message.nccHubUri; - if (options.oneofs) - object._nccHubUri = "nccHubUri"; - } - if (message.nccSpokeUri != null && message.hasOwnProperty("nccSpokeUri")) { - object.nccSpokeUri = message.nccSpokeUri; - if (options.oneofs) - object._nccSpokeUri = "nccSpokeUri"; - } - if (message.advertisedRouteSourceRouterUri != null && message.hasOwnProperty("advertisedRouteSourceRouterUri")) { - object.advertisedRouteSourceRouterUri = message.advertisedRouteSourceRouterUri; - if (options.oneofs) - object._advertisedRouteSourceRouterUri = "advertisedRouteSourceRouterUri"; - } - if (message.advertisedRouteNextHopUri != null && message.hasOwnProperty("advertisedRouteNextHopUri")) { - object.advertisedRouteNextHopUri = message.advertisedRouteNextHopUri; - if (options.oneofs) - object._advertisedRouteNextHopUri = "advertisedRouteNextHopUri"; - } - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RouteInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @instance - * @returns {Object.} JSON object - */ - RouteInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RouteInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RouteInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RouteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RouteInfo"; - }; - - /** - * RouteType enum. - * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteType - * @enum {number} - * @property {number} ROUTE_TYPE_UNSPECIFIED=0 ROUTE_TYPE_UNSPECIFIED value - * @property {number} SUBNET=1 SUBNET value - * @property {number} STATIC=2 STATIC value - * @property {number} DYNAMIC=3 DYNAMIC value - * @property {number} PEERING_SUBNET=4 PEERING_SUBNET value - * @property {number} PEERING_STATIC=5 PEERING_STATIC value - * @property {number} PEERING_DYNAMIC=6 PEERING_DYNAMIC value - * @property {number} POLICY_BASED=7 POLICY_BASED value - * @property {number} ADVERTISED=101 ADVERTISED value - */ - RouteInfo.RouteType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SUBNET"] = 1; - values[valuesById[2] = "STATIC"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - values[valuesById[4] = "PEERING_SUBNET"] = 4; - values[valuesById[5] = "PEERING_STATIC"] = 5; - values[valuesById[6] = "PEERING_DYNAMIC"] = 6; - values[valuesById[7] = "POLICY_BASED"] = 7; - values[valuesById[101] = "ADVERTISED"] = 101; - return values; - })(); - - /** - * NextHopType enum. - * @name google.cloud.networkmanagement.v1beta1.RouteInfo.NextHopType - * @enum {number} - * @property {number} NEXT_HOP_TYPE_UNSPECIFIED=0 NEXT_HOP_TYPE_UNSPECIFIED value - * @property {number} NEXT_HOP_IP=1 NEXT_HOP_IP value - * @property {number} NEXT_HOP_INSTANCE=2 NEXT_HOP_INSTANCE value - * @property {number} NEXT_HOP_NETWORK=3 NEXT_HOP_NETWORK value - * @property {number} NEXT_HOP_PEERING=4 NEXT_HOP_PEERING value - * @property {number} NEXT_HOP_INTERCONNECT=5 NEXT_HOP_INTERCONNECT value - * @property {number} NEXT_HOP_VPN_TUNNEL=6 NEXT_HOP_VPN_TUNNEL value - * @property {number} NEXT_HOP_VPN_GATEWAY=7 NEXT_HOP_VPN_GATEWAY value - * @property {number} NEXT_HOP_INTERNET_GATEWAY=8 NEXT_HOP_INTERNET_GATEWAY value - * @property {number} NEXT_HOP_BLACKHOLE=9 NEXT_HOP_BLACKHOLE value - * @property {number} NEXT_HOP_ILB=10 NEXT_HOP_ILB value - * @property {number} NEXT_HOP_ROUTER_APPLIANCE=11 NEXT_HOP_ROUTER_APPLIANCE value - * @property {number} NEXT_HOP_NCC_HUB=12 NEXT_HOP_NCC_HUB value - */ - RouteInfo.NextHopType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NEXT_HOP_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEXT_HOP_IP"] = 1; - values[valuesById[2] = "NEXT_HOP_INSTANCE"] = 2; - values[valuesById[3] = "NEXT_HOP_NETWORK"] = 3; - values[valuesById[4] = "NEXT_HOP_PEERING"] = 4; - values[valuesById[5] = "NEXT_HOP_INTERCONNECT"] = 5; - values[valuesById[6] = "NEXT_HOP_VPN_TUNNEL"] = 6; - values[valuesById[7] = "NEXT_HOP_VPN_GATEWAY"] = 7; - values[valuesById[8] = "NEXT_HOP_INTERNET_GATEWAY"] = 8; - values[valuesById[9] = "NEXT_HOP_BLACKHOLE"] = 9; - values[valuesById[10] = "NEXT_HOP_ILB"] = 10; - values[valuesById[11] = "NEXT_HOP_ROUTER_APPLIANCE"] = 11; - values[valuesById[12] = "NEXT_HOP_NCC_HUB"] = 12; - return values; - })(); - - /** - * RouteScope enum. - * @name google.cloud.networkmanagement.v1beta1.RouteInfo.RouteScope - * @enum {number} - * @property {number} ROUTE_SCOPE_UNSPECIFIED=0 ROUTE_SCOPE_UNSPECIFIED value - * @property {number} NETWORK=1 NETWORK value - * @property {number} NCC_HUB=2 NCC_HUB value - */ - RouteInfo.RouteScope = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTE_SCOPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NETWORK"] = 1; - values[valuesById[2] = "NCC_HUB"] = 2; - return values; - })(); - - return RouteInfo; - })(); - - v1beta1.GoogleServiceInfo = (function() { - - /** - * Properties of a GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGoogleServiceInfo - * @property {string|null} [sourceIp] GoogleServiceInfo sourceIp - * @property {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType|null} [googleServiceType] GoogleServiceInfo googleServiceType - */ - - /** - * Constructs a new GoogleServiceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GoogleServiceInfo. - * @implements IGoogleServiceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set - */ - function GoogleServiceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoogleServiceInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.sourceIp = ""; - - /** - * GoogleServiceInfo googleServiceType. - * @member {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType} googleServiceType - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @instance - */ - GoogleServiceInfo.prototype.googleServiceType = 0; - - /** - * Creates a new GoogleServiceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo instance - */ - GoogleServiceInfo.create = function create(properties) { - return new GoogleServiceInfo(properties); - }; - - /** - * Encodes the specified GoogleServiceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.googleServiceType != null && Object.hasOwnProperty.call(message, "googleServiceType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.googleServiceType); - return writer; - }; - - /** - * Encodes the specified GoogleServiceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGoogleServiceInfo} message GoogleServiceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoogleServiceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.googleServiceType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoogleServiceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoogleServiceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoogleServiceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoogleServiceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - switch (message.googleServiceType) { - default: - return "googleServiceType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - return null; - }; - - /** - * Creates a GoogleServiceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} GoogleServiceInfo - */ - GoogleServiceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - switch (object.googleServiceType) { - default: - if (typeof object.googleServiceType === "number") { - message.googleServiceType = object.googleServiceType; - break; - } - break; - case "GOOGLE_SERVICE_TYPE_UNSPECIFIED": - case 0: - message.googleServiceType = 0; - break; - case "IAP": - case 1: - message.googleServiceType = 1; - break; - case "GFE_PROXY_OR_HEALTH_CHECK_PROBER": - case 2: - message.googleServiceType = 2; - break; - case "CLOUD_DNS": - case 3: - message.googleServiceType = 3; - break; - case "GOOGLE_API": - case 4: - message.googleServiceType = 4; - break; - case "GOOGLE_API_PSC": - case 5: - message.googleServiceType = 5; - break; - case "GOOGLE_API_VPC_SC": - case 6: - message.googleServiceType = 6; - break; - } - return message; - }; - - /** - * Creates a plain object from a GoogleServiceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.GoogleServiceInfo} message GoogleServiceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoogleServiceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.googleServiceType = options.enums === String ? "GOOGLE_SERVICE_TYPE_UNSPECIFIED" : 0; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.googleServiceType != null && message.hasOwnProperty("googleServiceType")) - object.googleServiceType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] === undefined ? message.googleServiceType : $root.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType[message.googleServiceType] : message.googleServiceType; - return object; - }; - - /** - * Converts this GoogleServiceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @instance - * @returns {Object.} JSON object - */ - GoogleServiceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoogleServiceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GoogleServiceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoogleServiceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GoogleServiceInfo"; - }; - - /** - * GoogleServiceType enum. - * @name google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.GoogleServiceType - * @enum {number} - * @property {number} GOOGLE_SERVICE_TYPE_UNSPECIFIED=0 GOOGLE_SERVICE_TYPE_UNSPECIFIED value - * @property {number} IAP=1 IAP value - * @property {number} GFE_PROXY_OR_HEALTH_CHECK_PROBER=2 GFE_PROXY_OR_HEALTH_CHECK_PROBER value - * @property {number} CLOUD_DNS=3 CLOUD_DNS value - * @property {number} GOOGLE_API=4 GOOGLE_API value - * @property {number} GOOGLE_API_PSC=5 GOOGLE_API_PSC value - * @property {number} GOOGLE_API_VPC_SC=6 GOOGLE_API_VPC_SC value - */ - GoogleServiceInfo.GoogleServiceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "GOOGLE_SERVICE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IAP"] = 1; - values[valuesById[2] = "GFE_PROXY_OR_HEALTH_CHECK_PROBER"] = 2; - values[valuesById[3] = "CLOUD_DNS"] = 3; - values[valuesById[4] = "GOOGLE_API"] = 4; - values[valuesById[5] = "GOOGLE_API_PSC"] = 5; - values[valuesById[6] = "GOOGLE_API_VPC_SC"] = 6; - return values; - })(); - - return GoogleServiceInfo; - })(); - - v1beta1.ForwardingRuleInfo = (function() { - - /** - * Properties of a ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IForwardingRuleInfo - * @property {string|null} [displayName] ForwardingRuleInfo displayName - * @property {string|null} [uri] ForwardingRuleInfo uri - * @property {string|null} [matchedProtocol] ForwardingRuleInfo matchedProtocol - * @property {string|null} [matchedPortRange] ForwardingRuleInfo matchedPortRange - * @property {string|null} [vip] ForwardingRuleInfo vip - * @property {string|null} [target] ForwardingRuleInfo target - * @property {string|null} [networkUri] ForwardingRuleInfo networkUri - * @property {string|null} [region] ForwardingRuleInfo region - * @property {string|null} [loadBalancerName] ForwardingRuleInfo loadBalancerName - * @property {string|null} [pscServiceAttachmentUri] ForwardingRuleInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] ForwardingRuleInfo pscGoogleApiTarget - */ - - /** - * Constructs a new ForwardingRuleInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ForwardingRuleInfo. - * @implements IForwardingRuleInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set - */ - function ForwardingRuleInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardingRuleInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.displayName = ""; - - /** - * ForwardingRuleInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.uri = ""; - - /** - * ForwardingRuleInfo matchedProtocol. - * @member {string} matchedProtocol - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedProtocol = ""; - - /** - * ForwardingRuleInfo matchedPortRange. - * @member {string} matchedPortRange - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.matchedPortRange = ""; - - /** - * ForwardingRuleInfo vip. - * @member {string} vip - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.vip = ""; - - /** - * ForwardingRuleInfo target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.target = ""; - - /** - * ForwardingRuleInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.networkUri = ""; - - /** - * ForwardingRuleInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.region = ""; - - /** - * ForwardingRuleInfo loadBalancerName. - * @member {string} loadBalancerName - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.loadBalancerName = ""; - - /** - * ForwardingRuleInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * ForwardingRuleInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - */ - ForwardingRuleInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new ForwardingRuleInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo instance - */ - ForwardingRuleInfo.create = function create(properties) { - return new ForwardingRuleInfo(properties); - }; - - /** - * Encodes the specified ForwardingRuleInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.matchedProtocol != null && Object.hasOwnProperty.call(message, "matchedProtocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.matchedProtocol); - if (message.vip != null && Object.hasOwnProperty.call(message, "vip")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.vip); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.target); - if (message.matchedPortRange != null && Object.hasOwnProperty.call(message, "matchedPortRange")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.matchedPortRange); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.loadBalancerName != null && Object.hasOwnProperty.call(message, "loadBalancerName")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.loadBalancerName); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified ForwardingRuleInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardingRuleInfo} message ForwardingRuleInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardingRuleInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.matchedProtocol = reader.string(); - break; - } - case 6: { - message.matchedPortRange = reader.string(); - break; - } - case 4: { - message.vip = reader.string(); - break; - } - case 5: { - message.target = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.loadBalancerName = reader.string(); - break; - } - case 10: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 11: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardingRuleInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardingRuleInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardingRuleInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardingRuleInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - if (!$util.isString(message.matchedProtocol)) - return "matchedProtocol: string expected"; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - if (!$util.isString(message.matchedPortRange)) - return "matchedPortRange: string expected"; - if (message.vip != null && message.hasOwnProperty("vip")) - if (!$util.isString(message.vip)) - return "vip: string expected"; - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - if (!$util.isString(message.loadBalancerName)) - return "loadBalancerName: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a ForwardingRuleInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} ForwardingRuleInfo - */ - ForwardingRuleInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.matchedProtocol != null) - message.matchedProtocol = String(object.matchedProtocol); - if (object.matchedPortRange != null) - message.matchedPortRange = String(object.matchedPortRange); - if (object.vip != null) - message.vip = String(object.vip); - if (object.target != null) - message.target = String(object.target); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - if (object.loadBalancerName != null) - message.loadBalancerName = String(object.loadBalancerName); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a ForwardingRuleInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo} message ForwardingRuleInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardingRuleInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.matchedProtocol = ""; - object.vip = ""; - object.target = ""; - object.matchedPortRange = ""; - object.networkUri = ""; - object.region = ""; - object.loadBalancerName = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.matchedProtocol != null && message.hasOwnProperty("matchedProtocol")) - object.matchedProtocol = message.matchedProtocol; - if (message.vip != null && message.hasOwnProperty("vip")) - object.vip = message.vip; - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.matchedPortRange != null && message.hasOwnProperty("matchedPortRange")) - object.matchedPortRange = message.matchedPortRange; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.loadBalancerName != null && message.hasOwnProperty("loadBalancerName")) - object.loadBalancerName = message.loadBalancerName; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this ForwardingRuleInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardingRuleInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardingRuleInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardingRuleInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardingRuleInfo"; - }; - - return ForwardingRuleInfo; - })(); - - v1beta1.LoadBalancerInfo = (function() { - - /** - * Properties of a LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILoadBalancerInfo - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType|null} [loadBalancerType] LoadBalancerInfo loadBalancerType - * @property {string|null} [healthCheckUri] LoadBalancerInfo healthCheckUri - * @property {Array.|null} [backends] LoadBalancerInfo backends - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType|null} [backendType] LoadBalancerInfo backendType - * @property {string|null} [backendUri] LoadBalancerInfo backendUri - */ - - /** - * Constructs a new LoadBalancerInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LoadBalancerInfo. - * @implements ILoadBalancerInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set - */ - function LoadBalancerInfo(properties) { - this.backends = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerInfo loadBalancerType. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType} loadBalancerType - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.loadBalancerType = 0; - - /** - * LoadBalancerInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerInfo backends. - * @member {Array.} backends - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backends = $util.emptyArray; - - /** - * LoadBalancerInfo backendType. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType} backendType - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendType = 0; - - /** - * LoadBalancerInfo backendUri. - * @member {string} backendUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - */ - LoadBalancerInfo.prototype.backendUri = ""; - - /** - * Creates a new LoadBalancerInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo instance - */ - LoadBalancerInfo.create = function create(properties) { - return new LoadBalancerInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.loadBalancerType != null && Object.hasOwnProperty.call(message, "loadBalancerType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.loadBalancerType); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.healthCheckUri); - if (message.backends != null && message.backends.length) - for (var i = 0; i < message.backends.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.encode(message.backends[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.backendType != null && Object.hasOwnProperty.call(message, "backendType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.backendType); - if (message.backendUri != null && Object.hasOwnProperty.call(message, "backendUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.backendUri); - return writer; - }; - - /** - * Encodes the specified LoadBalancerInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerInfo} message LoadBalancerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.loadBalancerType = reader.int32(); - break; - } - case 2: { - message.healthCheckUri = reader.string(); - break; - } - case 3: { - if (!(message.backends && message.backends.length)) - message.backends = []; - message.backends.push($root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.decode(reader, reader.uint32())); - break; - } - case 4: { - message.backendType = reader.int32(); - break; - } - case 5: { - message.backendUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - switch (message.loadBalancerType) { - default: - return "loadBalancerType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.backends != null && message.hasOwnProperty("backends")) { - if (!Array.isArray(message.backends)) - return "backends: array expected"; - for (var i = 0; i < message.backends.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify(message.backends[i]); - if (error) - return "backends." + error; - } - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - switch (message.backendType) { - default: - return "backendType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - if (!$util.isString(message.backendUri)) - return "backendUri: string expected"; - return null; - }; - - /** - * Creates a LoadBalancerInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} LoadBalancerInfo - */ - LoadBalancerInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo(); - switch (object.loadBalancerType) { - default: - if (typeof object.loadBalancerType === "number") { - message.loadBalancerType = object.loadBalancerType; - break; - } - break; - case "LOAD_BALANCER_TYPE_UNSPECIFIED": - case 0: - message.loadBalancerType = 0; - break; - case "INTERNAL_TCP_UDP": - case 1: - message.loadBalancerType = 1; - break; - case "NETWORK_TCP_UDP": - case 2: - message.loadBalancerType = 2; - break; - case "HTTP_PROXY": - case 3: - message.loadBalancerType = 3; - break; - case "TCP_PROXY": - case 4: - message.loadBalancerType = 4; - break; - case "SSL_PROXY": - case 5: - message.loadBalancerType = 5; - break; - } - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - if (object.backends) { - if (!Array.isArray(object.backends)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: array expected"); - message.backends = []; - for (var i = 0; i < object.backends.length; ++i) { - if (typeof object.backends[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.backends: object expected"); - message.backends[i] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.fromObject(object.backends[i]); - } - } - switch (object.backendType) { - default: - if (typeof object.backendType === "number") { - message.backendType = object.backendType; - break; - } - break; - case "BACKEND_TYPE_UNSPECIFIED": - case 0: - message.backendType = 0; - break; - case "BACKEND_SERVICE": - case 1: - message.backendType = 1; - break; - case "TARGET_POOL": - case 2: - message.backendType = 2; - break; - case "TARGET_INSTANCE": - case 3: - message.backendType = 3; - break; - } - if (object.backendUri != null) - message.backendUri = String(object.backendUri); - return message; - }; - - /** - * Creates a plain object from a LoadBalancerInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerInfo} message LoadBalancerInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.backends = []; - if (options.defaults) { - object.loadBalancerType = options.enums === String ? "LOAD_BALANCER_TYPE_UNSPECIFIED" : 0; - object.healthCheckUri = ""; - object.backendType = options.enums === String ? "BACKEND_TYPE_UNSPECIFIED" : 0; - object.backendUri = ""; - } - if (message.loadBalancerType != null && message.hasOwnProperty("loadBalancerType")) - object.loadBalancerType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] === undefined ? message.loadBalancerType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType[message.loadBalancerType] : message.loadBalancerType; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.backends && message.backends.length) { - object.backends = []; - for (var j = 0; j < message.backends.length; ++j) - object.backends[j] = $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.toObject(message.backends[j], options); - } - if (message.backendType != null && message.hasOwnProperty("backendType")) - object.backendType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] === undefined ? message.backendType : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType[message.backendType] : message.backendType; - if (message.backendUri != null && message.hasOwnProperty("backendUri")) - object.backendUri = message.backendUri; - return object; - }; - - /** - * Converts this LoadBalancerInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerInfo"; - }; - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TCP_UDP=1 INTERNAL_TCP_UDP value - * @property {number} NETWORK_TCP_UDP=2 NETWORK_TCP_UDP value - * @property {number} HTTP_PROXY=3 HTTP_PROXY value - * @property {number} TCP_PROXY=4 TCP_PROXY value - * @property {number} SSL_PROXY=5 SSL_PROXY value - */ - LoadBalancerInfo.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TCP_UDP"] = 1; - values[valuesById[2] = "NETWORK_TCP_UDP"] = 2; - values[valuesById[3] = "HTTP_PROXY"] = 3; - values[valuesById[4] = "TCP_PROXY"] = 4; - values[valuesById[5] = "SSL_PROXY"] = 5; - return values; - })(); - - /** - * BackendType enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerInfo.BackendType - * @enum {number} - * @property {number} BACKEND_TYPE_UNSPECIFIED=0 BACKEND_TYPE_UNSPECIFIED value - * @property {number} BACKEND_SERVICE=1 BACKEND_SERVICE value - * @property {number} TARGET_POOL=2 TARGET_POOL value - * @property {number} TARGET_INSTANCE=3 TARGET_INSTANCE value - */ - LoadBalancerInfo.BackendType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BACKEND_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BACKEND_SERVICE"] = 1; - values[valuesById[2] = "TARGET_POOL"] = 2; - values[valuesById[3] = "TARGET_INSTANCE"] = 3; - return values; - })(); - - return LoadBalancerInfo; - })(); - - v1beta1.LoadBalancerBackend = (function() { - - /** - * Properties of a LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILoadBalancerBackend - * @property {string|null} [displayName] LoadBalancerBackend displayName - * @property {string|null} [uri] LoadBalancerBackend uri - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState|null} [healthCheckFirewallState] LoadBalancerBackend healthCheckFirewallState - * @property {Array.|null} [healthCheckAllowingFirewallRules] LoadBalancerBackend healthCheckAllowingFirewallRules - * @property {Array.|null} [healthCheckBlockingFirewallRules] LoadBalancerBackend healthCheckBlockingFirewallRules - */ - - /** - * Constructs a new LoadBalancerBackend. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LoadBalancerBackend. - * @implements ILoadBalancerBackend - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set - */ - function LoadBalancerBackend(properties) { - this.healthCheckAllowingFirewallRules = []; - this.healthCheckBlockingFirewallRules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackend displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.displayName = ""; - - /** - * LoadBalancerBackend uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.uri = ""; - - /** - * LoadBalancerBackend healthCheckFirewallState. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState} healthCheckFirewallState - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckFirewallState = 0; - - /** - * LoadBalancerBackend healthCheckAllowingFirewallRules. - * @member {Array.} healthCheckAllowingFirewallRules - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckAllowingFirewallRules = $util.emptyArray; - - /** - * LoadBalancerBackend healthCheckBlockingFirewallRules. - * @member {Array.} healthCheckBlockingFirewallRules - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - */ - LoadBalancerBackend.prototype.healthCheckBlockingFirewallRules = $util.emptyArray; - - /** - * Creates a new LoadBalancerBackend instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend instance - */ - LoadBalancerBackend.create = function create(properties) { - return new LoadBalancerBackend(properties); - }; - - /** - * Encodes the specified LoadBalancerBackend message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.healthCheckFirewallState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallState")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.healthCheckFirewallState); - if (message.healthCheckAllowingFirewallRules != null && message.healthCheckAllowingFirewallRules.length) - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.healthCheckAllowingFirewallRules[i]); - if (message.healthCheckBlockingFirewallRules != null && message.healthCheckBlockingFirewallRules.length) - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.healthCheckBlockingFirewallRules[i]); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackend message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackend} message LoadBalancerBackend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.healthCheckFirewallState = reader.int32(); - break; - } - case 4: { - if (!(message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length)) - message.healthCheckAllowingFirewallRules = []; - message.healthCheckAllowingFirewallRules.push(reader.string()); - break; - } - case 5: { - if (!(message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length)) - message.healthCheckBlockingFirewallRules = []; - message.healthCheckBlockingFirewallRules.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackend message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - switch (message.healthCheckFirewallState) { - default: - return "healthCheckFirewallState: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.healthCheckAllowingFirewallRules != null && message.hasOwnProperty("healthCheckAllowingFirewallRules")) { - if (!Array.isArray(message.healthCheckAllowingFirewallRules)) - return "healthCheckAllowingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckAllowingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckAllowingFirewallRules[i])) - return "healthCheckAllowingFirewallRules: string[] expected"; - } - if (message.healthCheckBlockingFirewallRules != null && message.hasOwnProperty("healthCheckBlockingFirewallRules")) { - if (!Array.isArray(message.healthCheckBlockingFirewallRules)) - return "healthCheckBlockingFirewallRules: array expected"; - for (var i = 0; i < message.healthCheckBlockingFirewallRules.length; ++i) - if (!$util.isString(message.healthCheckBlockingFirewallRules[i])) - return "healthCheckBlockingFirewallRules: string[] expected"; - } - return null; - }; - - /** - * Creates a LoadBalancerBackend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} LoadBalancerBackend - */ - LoadBalancerBackend.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - switch (object.healthCheckFirewallState) { - default: - if (typeof object.healthCheckFirewallState === "number") { - message.healthCheckFirewallState = object.healthCheckFirewallState; - break; - } - break; - case "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallState = 0; - break; - case "CONFIGURED": - case 1: - message.healthCheckFirewallState = 1; - break; - case "MISCONFIGURED": - case 2: - message.healthCheckFirewallState = 2; - break; - } - if (object.healthCheckAllowingFirewallRules) { - if (!Array.isArray(object.healthCheckAllowingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckAllowingFirewallRules: array expected"); - message.healthCheckAllowingFirewallRules = []; - for (var i = 0; i < object.healthCheckAllowingFirewallRules.length; ++i) - message.healthCheckAllowingFirewallRules[i] = String(object.healthCheckAllowingFirewallRules[i]); - } - if (object.healthCheckBlockingFirewallRules) { - if (!Array.isArray(object.healthCheckBlockingFirewallRules)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.healthCheckBlockingFirewallRules: array expected"); - message.healthCheckBlockingFirewallRules = []; - for (var i = 0; i < object.healthCheckBlockingFirewallRules.length; ++i) - message.healthCheckBlockingFirewallRules[i] = String(object.healthCheckBlockingFirewallRules[i]); - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackend message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackend} message LoadBalancerBackend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.healthCheckAllowingFirewallRules = []; - object.healthCheckBlockingFirewallRules = []; - } - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.healthCheckFirewallState = options.enums === String ? "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.healthCheckFirewallState != null && message.hasOwnProperty("healthCheckFirewallState")) - object.healthCheckFirewallState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] === undefined ? message.healthCheckFirewallState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState[message.healthCheckFirewallState] : message.healthCheckFirewallState; - if (message.healthCheckAllowingFirewallRules && message.healthCheckAllowingFirewallRules.length) { - object.healthCheckAllowingFirewallRules = []; - for (var j = 0; j < message.healthCheckAllowingFirewallRules.length; ++j) - object.healthCheckAllowingFirewallRules[j] = message.healthCheckAllowingFirewallRules[j]; - } - if (message.healthCheckBlockingFirewallRules && message.healthCheckBlockingFirewallRules.length) { - object.healthCheckBlockingFirewallRules = []; - for (var j = 0; j < message.healthCheckBlockingFirewallRules.length; ++j) - object.healthCheckBlockingFirewallRules[j] = message.healthCheckBlockingFirewallRules[j]; - } - return object; - }; - - /** - * Converts this LoadBalancerBackend to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackend - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackend - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackend.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackend"; - }; - - /** - * HealthCheckFirewallState enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackend.HealthCheckFirewallState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED value - * @property {number} CONFIGURED=1 CONFIGURED value - * @property {number} MISCONFIGURED=2 MISCONFIGURED value - */ - LoadBalancerBackend.HealthCheckFirewallState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFIGURED"] = 1; - values[valuesById[2] = "MISCONFIGURED"] = 2; - return values; - })(); - - return LoadBalancerBackend; - })(); - - v1beta1.VpnGatewayInfo = (function() { - - /** - * Properties of a VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpnGatewayInfo - * @property {string|null} [displayName] VpnGatewayInfo displayName - * @property {string|null} [uri] VpnGatewayInfo uri - * @property {string|null} [networkUri] VpnGatewayInfo networkUri - * @property {string|null} [ipAddress] VpnGatewayInfo ipAddress - * @property {string|null} [vpnTunnelUri] VpnGatewayInfo vpnTunnelUri - * @property {string|null} [region] VpnGatewayInfo region - */ - - /** - * Constructs a new VpnGatewayInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpnGatewayInfo. - * @implements IVpnGatewayInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set - */ - function VpnGatewayInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnGatewayInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.displayName = ""; - - /** - * VpnGatewayInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.uri = ""; - - /** - * VpnGatewayInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.networkUri = ""; - - /** - * VpnGatewayInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.ipAddress = ""; - - /** - * VpnGatewayInfo vpnTunnelUri. - * @member {string} vpnTunnelUri - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.vpnTunnelUri = ""; - - /** - * VpnGatewayInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - */ - VpnGatewayInfo.prototype.region = ""; - - /** - * Creates a new VpnGatewayInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo instance - */ - VpnGatewayInfo.create = function create(properties) { - return new VpnGatewayInfo(properties); - }; - - /** - * Encodes the specified VpnGatewayInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - if (message.vpnTunnelUri != null && Object.hasOwnProperty.call(message, "vpnTunnelUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.vpnTunnelUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified VpnGatewayInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnGatewayInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnGatewayInfo} message VpnGatewayInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnGatewayInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 5: { - message.vpnTunnelUri = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnGatewayInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnGatewayInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnGatewayInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnGatewayInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - if (!$util.isString(message.vpnTunnelUri)) - return "vpnTunnelUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a VpnGatewayInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} VpnGatewayInfo - */ - VpnGatewayInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpnGatewayInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.vpnTunnelUri != null) - message.vpnTunnelUri = String(object.vpnTunnelUri); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a VpnGatewayInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpnGatewayInfo} message VpnGatewayInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnGatewayInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.ipAddress = ""; - object.vpnTunnelUri = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.vpnTunnelUri != null && message.hasOwnProperty("vpnTunnelUri")) - object.vpnTunnelUri = message.vpnTunnelUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this VpnGatewayInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @instance - * @returns {Object.} JSON object - */ - VpnGatewayInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnGatewayInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpnGatewayInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnGatewayInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnGatewayInfo"; - }; - - return VpnGatewayInfo; - })(); - - v1beta1.VpnTunnelInfo = (function() { - - /** - * Properties of a VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpnTunnelInfo - * @property {string|null} [displayName] VpnTunnelInfo displayName - * @property {string|null} [uri] VpnTunnelInfo uri - * @property {string|null} [sourceGateway] VpnTunnelInfo sourceGateway - * @property {string|null} [remoteGateway] VpnTunnelInfo remoteGateway - * @property {string|null} [remoteGatewayIp] VpnTunnelInfo remoteGatewayIp - * @property {string|null} [sourceGatewayIp] VpnTunnelInfo sourceGatewayIp - * @property {string|null} [networkUri] VpnTunnelInfo networkUri - * @property {string|null} [region] VpnTunnelInfo region - * @property {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType|null} [routingType] VpnTunnelInfo routingType - */ - - /** - * Constructs a new VpnTunnelInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpnTunnelInfo. - * @implements IVpnTunnelInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set - */ - function VpnTunnelInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpnTunnelInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.displayName = ""; - - /** - * VpnTunnelInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.uri = ""; - - /** - * VpnTunnelInfo sourceGateway. - * @member {string} sourceGateway - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGateway = ""; - - /** - * VpnTunnelInfo remoteGateway. - * @member {string} remoteGateway - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGateway = ""; - - /** - * VpnTunnelInfo remoteGatewayIp. - * @member {string} remoteGatewayIp - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.remoteGatewayIp = ""; - - /** - * VpnTunnelInfo sourceGatewayIp. - * @member {string} sourceGatewayIp - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.sourceGatewayIp = ""; - - /** - * VpnTunnelInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.networkUri = ""; - - /** - * VpnTunnelInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.region = ""; - - /** - * VpnTunnelInfo routingType. - * @member {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType} routingType - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - */ - VpnTunnelInfo.prototype.routingType = 0; - - /** - * Creates a new VpnTunnelInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo instance - */ - VpnTunnelInfo.create = function create(properties) { - return new VpnTunnelInfo(properties); - }; - - /** - * Encodes the specified VpnTunnelInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.sourceGateway != null && Object.hasOwnProperty.call(message, "sourceGateway")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceGateway); - if (message.remoteGateway != null && Object.hasOwnProperty.call(message, "remoteGateway")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.remoteGateway); - if (message.remoteGatewayIp != null && Object.hasOwnProperty.call(message, "remoteGatewayIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.remoteGatewayIp); - if (message.sourceGatewayIp != null && Object.hasOwnProperty.call(message, "sourceGatewayIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceGatewayIp); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.networkUri); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.region); - if (message.routingType != null && Object.hasOwnProperty.call(message, "routingType")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.routingType); - return writer; - }; - - /** - * Encodes the specified VpnTunnelInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpnTunnelInfo} message VpnTunnelInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpnTunnelInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.sourceGateway = reader.string(); - break; - } - case 4: { - message.remoteGateway = reader.string(); - break; - } - case 5: { - message.remoteGatewayIp = reader.string(); - break; - } - case 6: { - message.sourceGatewayIp = reader.string(); - break; - } - case 7: { - message.networkUri = reader.string(); - break; - } - case 8: { - message.region = reader.string(); - break; - } - case 9: { - message.routingType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpnTunnelInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpnTunnelInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpnTunnelInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpnTunnelInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - if (!$util.isString(message.sourceGateway)) - return "sourceGateway: string expected"; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - if (!$util.isString(message.remoteGateway)) - return "remoteGateway: string expected"; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - if (!$util.isString(message.remoteGatewayIp)) - return "remoteGatewayIp: string expected"; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - if (!$util.isString(message.sourceGatewayIp)) - return "sourceGatewayIp: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - if (message.routingType != null && message.hasOwnProperty("routingType")) - switch (message.routingType) { - default: - return "routingType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; - }; - - /** - * Creates a VpnTunnelInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} VpnTunnelInfo - */ - VpnTunnelInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.sourceGateway != null) - message.sourceGateway = String(object.sourceGateway); - if (object.remoteGateway != null) - message.remoteGateway = String(object.remoteGateway); - if (object.remoteGatewayIp != null) - message.remoteGatewayIp = String(object.remoteGatewayIp); - if (object.sourceGatewayIp != null) - message.sourceGatewayIp = String(object.sourceGatewayIp); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.region != null) - message.region = String(object.region); - switch (object.routingType) { - default: - if (typeof object.routingType === "number") { - message.routingType = object.routingType; - break; - } - break; - case "ROUTING_TYPE_UNSPECIFIED": - case 0: - message.routingType = 0; - break; - case "ROUTE_BASED": - case 1: - message.routingType = 1; - break; - case "POLICY_BASED": - case 2: - message.routingType = 2; - break; - case "DYNAMIC": - case 3: - message.routingType = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a VpnTunnelInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpnTunnelInfo} message VpnTunnelInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpnTunnelInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.sourceGateway = ""; - object.remoteGateway = ""; - object.remoteGatewayIp = ""; - object.sourceGatewayIp = ""; - object.networkUri = ""; - object.region = ""; - object.routingType = options.enums === String ? "ROUTING_TYPE_UNSPECIFIED" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.sourceGateway != null && message.hasOwnProperty("sourceGateway")) - object.sourceGateway = message.sourceGateway; - if (message.remoteGateway != null && message.hasOwnProperty("remoteGateway")) - object.remoteGateway = message.remoteGateway; - if (message.remoteGatewayIp != null && message.hasOwnProperty("remoteGatewayIp")) - object.remoteGatewayIp = message.remoteGatewayIp; - if (message.sourceGatewayIp != null && message.hasOwnProperty("sourceGatewayIp")) - object.sourceGatewayIp = message.sourceGatewayIp; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - if (message.routingType != null && message.hasOwnProperty("routingType")) - object.routingType = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] === undefined ? message.routingType : $root.google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType[message.routingType] : message.routingType; - return object; - }; - - /** - * Converts this VpnTunnelInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @instance - * @returns {Object.} JSON object - */ - VpnTunnelInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpnTunnelInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpnTunnelInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpnTunnelInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpnTunnelInfo"; - }; - - /** - * RoutingType enum. - * @name google.cloud.networkmanagement.v1beta1.VpnTunnelInfo.RoutingType - * @enum {number} - * @property {number} ROUTING_TYPE_UNSPECIFIED=0 ROUTING_TYPE_UNSPECIFIED value - * @property {number} ROUTE_BASED=1 ROUTE_BASED value - * @property {number} POLICY_BASED=2 POLICY_BASED value - * @property {number} DYNAMIC=3 DYNAMIC value - */ - VpnTunnelInfo.RoutingType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ROUTING_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ROUTE_BASED"] = 1; - values[valuesById[2] = "POLICY_BASED"] = 2; - values[valuesById[3] = "DYNAMIC"] = 3; - return values; - })(); - - return VpnTunnelInfo; - })(); - - v1beta1.EndpointInfo = (function() { - - /** - * Properties of an EndpointInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IEndpointInfo - * @property {string|null} [sourceIp] EndpointInfo sourceIp - * @property {string|null} [destinationIp] EndpointInfo destinationIp - * @property {string|null} [protocol] EndpointInfo protocol - * @property {number|null} [sourcePort] EndpointInfo sourcePort - * @property {number|null} [destinationPort] EndpointInfo destinationPort - * @property {string|null} [sourceNetworkUri] EndpointInfo sourceNetworkUri - * @property {string|null} [destinationNetworkUri] EndpointInfo destinationNetworkUri - * @property {string|null} [sourceAgentUri] EndpointInfo sourceAgentUri - */ - - /** - * Constructs a new EndpointInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an EndpointInfo. - * @implements IEndpointInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set - */ - function EndpointInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EndpointInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceIp = ""; - - /** - * EndpointInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationIp = ""; - - /** - * EndpointInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.protocol = ""; - - /** - * EndpointInfo sourcePort. - * @member {number} sourcePort - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourcePort = 0; - - /** - * EndpointInfo destinationPort. - * @member {number} destinationPort - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationPort = 0; - - /** - * EndpointInfo sourceNetworkUri. - * @member {string} sourceNetworkUri - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceNetworkUri = ""; - - /** - * EndpointInfo destinationNetworkUri. - * @member {string} destinationNetworkUri - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.destinationNetworkUri = ""; - - /** - * EndpointInfo sourceAgentUri. - * @member {string} sourceAgentUri - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - */ - EndpointInfo.prototype.sourceAgentUri = ""; - - /** - * Creates a new EndpointInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo instance - */ - EndpointInfo.create = function create(properties) { - return new EndpointInfo(properties); - }; - - /** - * Encodes the specified EndpointInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.destinationIp); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.protocol); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sourcePort); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.destinationPort); - if (message.sourceNetworkUri != null && Object.hasOwnProperty.call(message, "sourceNetworkUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sourceNetworkUri); - if (message.destinationNetworkUri != null && Object.hasOwnProperty.call(message, "destinationNetworkUri")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.destinationNetworkUri); - if (message.sourceAgentUri != null && Object.hasOwnProperty.call(message, "sourceAgentUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.sourceAgentUri); - return writer; - }; - - /** - * Encodes the specified EndpointInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.EndpointInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IEndpointInfo} message EndpointInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EndpointInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.sourceIp = reader.string(); - break; - } - case 2: { - message.destinationIp = reader.string(); - break; - } - case 3: { - message.protocol = reader.string(); - break; - } - case 4: { - message.sourcePort = reader.int32(); - break; - } - case 5: { - message.destinationPort = reader.int32(); - break; - } - case 6: { - message.sourceNetworkUri = reader.string(); - break; - } - case 7: { - message.destinationNetworkUri = reader.string(); - break; - } - case 8: { - message.sourceAgentUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EndpointInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EndpointInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EndpointInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EndpointInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isInteger(message.sourcePort)) - return "sourcePort: integer expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isInteger(message.destinationPort)) - return "destinationPort: integer expected"; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - if (!$util.isString(message.sourceNetworkUri)) - return "sourceNetworkUri: string expected"; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - if (!$util.isString(message.destinationNetworkUri)) - return "destinationNetworkUri: string expected"; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - if (!$util.isString(message.sourceAgentUri)) - return "sourceAgentUri: string expected"; - return null; - }; - - /** - * Creates an EndpointInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.EndpointInfo} EndpointInfo - */ - EndpointInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.EndpointInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.EndpointInfo(); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.sourcePort != null) - message.sourcePort = object.sourcePort | 0; - if (object.destinationPort != null) - message.destinationPort = object.destinationPort | 0; - if (object.sourceNetworkUri != null) - message.sourceNetworkUri = String(object.sourceNetworkUri); - if (object.destinationNetworkUri != null) - message.destinationNetworkUri = String(object.destinationNetworkUri); - if (object.sourceAgentUri != null) - message.sourceAgentUri = String(object.sourceAgentUri); - return message; - }; - - /** - * Creates a plain object from an EndpointInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.EndpointInfo} message EndpointInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EndpointInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sourceIp = ""; - object.destinationIp = ""; - object.protocol = ""; - object.sourcePort = 0; - object.destinationPort = 0; - object.sourceNetworkUri = ""; - object.destinationNetworkUri = ""; - object.sourceAgentUri = ""; - } - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.sourceNetworkUri != null && message.hasOwnProperty("sourceNetworkUri")) - object.sourceNetworkUri = message.sourceNetworkUri; - if (message.destinationNetworkUri != null && message.hasOwnProperty("destinationNetworkUri")) - object.destinationNetworkUri = message.destinationNetworkUri; - if (message.sourceAgentUri != null && message.hasOwnProperty("sourceAgentUri")) - object.sourceAgentUri = message.sourceAgentUri; - return object; - }; - - /** - * Converts this EndpointInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @instance - * @returns {Object.} JSON object - */ - EndpointInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EndpointInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.EndpointInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EndpointInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.EndpointInfo"; - }; - - return EndpointInfo; - })(); - - v1beta1.DeliverInfo = (function() { - - /** - * Properties of a DeliverInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDeliverInfo - * @property {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target|null} [target] DeliverInfo target - * @property {string|null} [resourceUri] DeliverInfo resourceUri - * @property {string|null} [ipAddress] DeliverInfo ipAddress - * @property {string|null} [storageBucket] DeliverInfo storageBucket - * @property {string|null} [pscGoogleApiTarget] DeliverInfo pscGoogleApiTarget - */ - - /** - * Constructs a new DeliverInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DeliverInfo. - * @implements IDeliverInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set - */ - function DeliverInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeliverInfo target. - * @member {google.cloud.networkmanagement.v1beta1.DeliverInfo.Target} target - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.target = 0; - - /** - * DeliverInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.resourceUri = ""; - - /** - * DeliverInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.ipAddress = ""; - - /** - * DeliverInfo storageBucket. - * @member {string} storageBucket - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.storageBucket = ""; - - /** - * DeliverInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - */ - DeliverInfo.prototype.pscGoogleApiTarget = ""; - - /** - * Creates a new DeliverInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo instance - */ - DeliverInfo.create = function create(properties) { - return new DeliverInfo(properties); - }; - - /** - * Encodes the specified DeliverInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - if (message.storageBucket != null && Object.hasOwnProperty.call(message, "storageBucket")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.storageBucket); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified DeliverInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeliverInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeliverInfo} message DeliverInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeliverInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - case 4: { - message.storageBucket = reader.string(); - break; - } - case 5: { - message.pscGoogleApiTarget = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeliverInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeliverInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeliverInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeliverInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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: - case 15: - case 16: - case 17: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - if (!$util.isString(message.storageBucket)) - return "storageBucket: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - return null; - }; - - /** - * Creates a DeliverInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DeliverInfo} DeliverInfo - */ - DeliverInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeliverInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DeliverInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "INSTANCE": - case 1: - message.target = 1; - break; - case "INTERNET": - case 2: - message.target = 2; - break; - case "GOOGLE_API": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "CLOUD_SQL_INSTANCE": - case 5: - message.target = 5; - break; - case "PSC_PUBLISHED_SERVICE": - case 6: - message.target = 6; - break; - case "PSC_GOOGLE_API": - case 7: - message.target = 7; - break; - case "PSC_VPC_SC": - case 8: - message.target = 8; - break; - case "SERVERLESS_NEG": - case 9: - message.target = 9; - break; - case "STORAGE_BUCKET": - case 10: - message.target = 10; - break; - case "PRIVATE_NETWORK": - case 11: - message.target = 11; - break; - case "CLOUD_FUNCTION": - case 12: - message.target = 12; - break; - case "APP_ENGINE_VERSION": - case 13: - message.target = 13; - break; - case "CLOUD_RUN_REVISION": - case 14: - message.target = 14; - break; - case "GOOGLE_MANAGED_SERVICE": - case 15: - message.target = 15; - break; - case "REDIS_INSTANCE": - case 16: - message.target = 16; - break; - case "REDIS_CLUSTER": - case 17: - message.target = 17; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.storageBucket != null) - message.storageBucket = String(object.storageBucket); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - return message; - }; - - /** - * Creates a plain object from a DeliverInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.DeliverInfo} message DeliverInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeliverInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - object.storageBucket = ""; - object.pscGoogleApiTarget = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.DeliverInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - if (message.storageBucket != null && message.hasOwnProperty("storageBucket")) - object.storageBucket = message.storageBucket; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this DeliverInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @instance - * @returns {Object.} JSON object - */ - DeliverInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeliverInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DeliverInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeliverInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeliverInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1beta1.DeliverInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} INSTANCE=1 INSTANCE value - * @property {number} INTERNET=2 INTERNET value - * @property {number} GOOGLE_API=3 GOOGLE_API value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} CLOUD_SQL_INSTANCE=5 CLOUD_SQL_INSTANCE value - * @property {number} PSC_PUBLISHED_SERVICE=6 PSC_PUBLISHED_SERVICE value - * @property {number} PSC_GOOGLE_API=7 PSC_GOOGLE_API value - * @property {number} PSC_VPC_SC=8 PSC_VPC_SC value - * @property {number} SERVERLESS_NEG=9 SERVERLESS_NEG value - * @property {number} STORAGE_BUCKET=10 STORAGE_BUCKET value - * @property {number} PRIVATE_NETWORK=11 PRIVATE_NETWORK value - * @property {number} CLOUD_FUNCTION=12 CLOUD_FUNCTION value - * @property {number} APP_ENGINE_VERSION=13 APP_ENGINE_VERSION value - * @property {number} CLOUD_RUN_REVISION=14 CLOUD_RUN_REVISION value - * @property {number} GOOGLE_MANAGED_SERVICE=15 GOOGLE_MANAGED_SERVICE value - * @property {number} REDIS_INSTANCE=16 REDIS_INSTANCE value - * @property {number} REDIS_CLUSTER=17 REDIS_CLUSTER value - */ - DeliverInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "INSTANCE"] = 1; - values[valuesById[2] = "INTERNET"] = 2; - values[valuesById[3] = "GOOGLE_API"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "CLOUD_SQL_INSTANCE"] = 5; - values[valuesById[6] = "PSC_PUBLISHED_SERVICE"] = 6; - values[valuesById[7] = "PSC_GOOGLE_API"] = 7; - values[valuesById[8] = "PSC_VPC_SC"] = 8; - values[valuesById[9] = "SERVERLESS_NEG"] = 9; - values[valuesById[10] = "STORAGE_BUCKET"] = 10; - values[valuesById[11] = "PRIVATE_NETWORK"] = 11; - values[valuesById[12] = "CLOUD_FUNCTION"] = 12; - values[valuesById[13] = "APP_ENGINE_VERSION"] = 13; - values[valuesById[14] = "CLOUD_RUN_REVISION"] = 14; - values[valuesById[15] = "GOOGLE_MANAGED_SERVICE"] = 15; - values[valuesById[16] = "REDIS_INSTANCE"] = 16; - values[valuesById[17] = "REDIS_CLUSTER"] = 17; - return values; - })(); - - return DeliverInfo; - })(); - - v1beta1.ForwardInfo = (function() { - - /** - * Properties of a ForwardInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IForwardInfo - * @property {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target|null} [target] ForwardInfo target - * @property {string|null} [resourceUri] ForwardInfo resourceUri - * @property {string|null} [ipAddress] ForwardInfo ipAddress - */ - - /** - * Constructs a new ForwardInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ForwardInfo. - * @implements IForwardInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set - */ - function ForwardInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardInfo target. - * @member {google.cloud.networkmanagement.v1beta1.ForwardInfo.Target} target - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.target = 0; - - /** - * ForwardInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.resourceUri = ""; - - /** - * ForwardInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - */ - ForwardInfo.prototype.ipAddress = ""; - - /** - * Creates a new ForwardInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo instance - */ - ForwardInfo.create = function create(properties) { - return new ForwardInfo(properties); - }; - - /** - * Encodes the specified ForwardInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.target); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified ForwardInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ForwardInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IForwardInfo} message ForwardInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.target = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.ipAddress = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.target != null && message.hasOwnProperty("target")) - switch (message.target) { - default: - return "target: 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.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - return null; - }; - - /** - * Creates a ForwardInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ForwardInfo} ForwardInfo - */ - ForwardInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ForwardInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ForwardInfo(); - switch (object.target) { - default: - if (typeof object.target === "number") { - message.target = object.target; - break; - } - break; - case "TARGET_UNSPECIFIED": - case 0: - message.target = 0; - break; - case "PEERING_VPC": - case 1: - message.target = 1; - break; - case "VPN_GATEWAY": - case 2: - message.target = 2; - break; - case "INTERCONNECT": - case 3: - message.target = 3; - break; - case "GKE_MASTER": - case 4: - message.target = 4; - break; - case "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": - case 5: - message.target = 5; - break; - case "CLOUD_SQL_INSTANCE": - case 6: - message.target = 6; - break; - case "ANOTHER_PROJECT": - case 7: - message.target = 7; - break; - case "NCC_HUB": - case 8: - message.target = 8; - break; - case "ROUTER_APPLIANCE": - case 9: - message.target = 9; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - return message; - }; - - /** - * Creates a plain object from a ForwardInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ForwardInfo} message ForwardInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.target = options.enums === String ? "TARGET_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.target != null && message.hasOwnProperty("target")) - object.target = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] === undefined ? message.target : $root.google.cloud.networkmanagement.v1beta1.ForwardInfo.Target[message.target] : message.target; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this ForwardInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @instance - * @returns {Object.} JSON object - */ - ForwardInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ForwardInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ForwardInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ForwardInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ForwardInfo"; - }; - - /** - * Target enum. - * @name google.cloud.networkmanagement.v1beta1.ForwardInfo.Target - * @enum {number} - * @property {number} TARGET_UNSPECIFIED=0 TARGET_UNSPECIFIED value - * @property {number} PEERING_VPC=1 PEERING_VPC value - * @property {number} VPN_GATEWAY=2 VPN_GATEWAY value - * @property {number} INTERCONNECT=3 INTERCONNECT value - * @property {number} GKE_MASTER=4 GKE_MASTER value - * @property {number} IMPORTED_CUSTOM_ROUTE_NEXT_HOP=5 IMPORTED_CUSTOM_ROUTE_NEXT_HOP value - * @property {number} CLOUD_SQL_INSTANCE=6 CLOUD_SQL_INSTANCE value - * @property {number} ANOTHER_PROJECT=7 ANOTHER_PROJECT value - * @property {number} NCC_HUB=8 NCC_HUB value - * @property {number} ROUTER_APPLIANCE=9 ROUTER_APPLIANCE value - */ - ForwardInfo.Target = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "PEERING_VPC"] = 1; - values[valuesById[2] = "VPN_GATEWAY"] = 2; - values[valuesById[3] = "INTERCONNECT"] = 3; - values[valuesById[4] = "GKE_MASTER"] = 4; - values[valuesById[5] = "IMPORTED_CUSTOM_ROUTE_NEXT_HOP"] = 5; - values[valuesById[6] = "CLOUD_SQL_INSTANCE"] = 6; - values[valuesById[7] = "ANOTHER_PROJECT"] = 7; - values[valuesById[8] = "NCC_HUB"] = 8; - values[valuesById[9] = "ROUTER_APPLIANCE"] = 9; - return values; - })(); - - return ForwardInfo; - })(); - - v1beta1.AbortInfo = (function() { - - /** - * Properties of an AbortInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IAbortInfo - * @property {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause|null} [cause] AbortInfo cause - * @property {string|null} [resourceUri] AbortInfo resourceUri - * @property {string|null} [ipAddress] AbortInfo ipAddress - * @property {Array.|null} [projectsMissingPermission] AbortInfo projectsMissingPermission - */ - - /** - * Constructs a new AbortInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an AbortInfo. - * @implements IAbortInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set - */ - function AbortInfo(properties) { - this.projectsMissingPermission = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AbortInfo cause. - * @member {google.cloud.networkmanagement.v1beta1.AbortInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.cause = 0; - - /** - * AbortInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.resourceUri = ""; - - /** - * AbortInfo ipAddress. - * @member {string} ipAddress - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.ipAddress = ""; - - /** - * AbortInfo projectsMissingPermission. - * @member {Array.} projectsMissingPermission - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - */ - AbortInfo.prototype.projectsMissingPermission = $util.emptyArray; - - /** - * Creates a new AbortInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo instance - */ - AbortInfo.create = function create(properties) { - return new AbortInfo(properties); - }; - - /** - * Encodes the specified AbortInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.projectsMissingPermission != null && message.projectsMissingPermission.length) - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectsMissingPermission[i]); - if (message.ipAddress != null && Object.hasOwnProperty.call(message, "ipAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddress); - return writer; - }; - - /** - * Encodes the specified AbortInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AbortInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAbortInfo} message AbortInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AbortInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 4: { - message.ipAddress = reader.string(); - break; - } - case 3: { - if (!(message.projectsMissingPermission && message.projectsMissingPermission.length)) - message.projectsMissingPermission = []; - message.projectsMissingPermission.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AbortInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AbortInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AbortInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AbortInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 3: - case 7: - case 8: - case 11: - case 12: - case 13: - case 14: - case 2: - case 32: - case 23: - case 4: - case 28: - case 29: - case 36: - case 5: - case 6: - case 9: - case 10: - case 15: - case 16: - case 17: - case 18: - case 24: - case 25: - case 26: - case 27: - case 19: - case 20: - case 34: - case 35: - case 21: - case 22: - case 30: - case 31: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - if (!$util.isString(message.ipAddress)) - return "ipAddress: string expected"; - if (message.projectsMissingPermission != null && message.hasOwnProperty("projectsMissingPermission")) { - if (!Array.isArray(message.projectsMissingPermission)) - return "projectsMissingPermission: array expected"; - for (var i = 0; i < message.projectsMissingPermission.length; ++i) - if (!$util.isString(message.projectsMissingPermission[i])) - return "projectsMissingPermission: string[] expected"; - } - return null; - }; - - /** - * Creates an AbortInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.AbortInfo} AbortInfo - */ - AbortInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AbortInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.AbortInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_NETWORK": - case 1: - message.cause = 1; - break; - case "UNKNOWN_PROJECT": - case 3: - message.cause = 3; - break; - case "NO_EXTERNAL_IP": - case 7: - message.cause = 7; - break; - case "UNINTENDED_DESTINATION": - case 8: - message.cause = 8; - break; - case "SOURCE_ENDPOINT_NOT_FOUND": - case 11: - message.cause = 11; - break; - case "MISMATCHED_SOURCE_NETWORK": - case 12: - message.cause = 12; - break; - case "DESTINATION_ENDPOINT_NOT_FOUND": - case 13: - message.cause = 13; - break; - case "MISMATCHED_DESTINATION_NETWORK": - case 14: - message.cause = 14; - break; - case "UNKNOWN_IP": - case 2: - message.cause = 2; - break; - case "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": - case 32: - message.cause = 32; - break; - case "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": - case 23: - message.cause = 23; - break; - case "PERMISSION_DENIED": - case 4: - message.cause = 4; - break; - case "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": - case 28: - message.cause = 28; - break; - case "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": - case 29: - message.cause = 29; - break; - case "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": - case 36: - message.cause = 36; - break; - case "NO_SOURCE_LOCATION": - case 5: - message.cause = 5; - break; - case "INVALID_ARGUMENT": - case 6: - message.cause = 6; - break; - case "TRACE_TOO_LONG": - case 9: - message.cause = 9; - break; - case "INTERNAL_ERROR": - case 10: - message.cause = 10; - break; - case "UNSUPPORTED": - case 15: - message.cause = 15; - break; - case "MISMATCHED_IP_VERSION": - case 16: - message.cause = 16; - break; - case "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": - case 17: - message.cause = 17; - break; - case "RESOURCE_CONFIG_NOT_FOUND": - case 18: - message.cause = 18; - break; - case "VM_INSTANCE_CONFIG_NOT_FOUND": - case 24: - message.cause = 24; - break; - case "NETWORK_CONFIG_NOT_FOUND": - case 25: - message.cause = 25; - break; - case "FIREWALL_CONFIG_NOT_FOUND": - case 26: - message.cause = 26; - break; - case "ROUTE_CONFIG_NOT_FOUND": - case 27: - message.cause = 27; - break; - case "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": - case 19: - message.cause = 19; - break; - case "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": - case 20: - message.cause = 20; - break; - case "SOURCE_REDIS_CLUSTER_UNSUPPORTED": - case 34: - message.cause = 34; - break; - case "SOURCE_REDIS_INSTANCE_UNSUPPORTED": - case 35: - message.cause = 35; - break; - case "SOURCE_FORWARDING_RULE_UNSUPPORTED": - case 21: - message.cause = 21; - break; - case "NON_ROUTABLE_IP_ADDRESS": - case 22: - message.cause = 22; - break; - case "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": - case 30: - message.cause = 30; - break; - case "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": - case 31: - message.cause = 31; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.ipAddress != null) - message.ipAddress = String(object.ipAddress); - if (object.projectsMissingPermission) { - if (!Array.isArray(object.projectsMissingPermission)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.AbortInfo.projectsMissingPermission: array expected"); - message.projectsMissingPermission = []; - for (var i = 0; i < object.projectsMissingPermission.length; ++i) - message.projectsMissingPermission[i] = String(object.projectsMissingPermission[i]); - } - return message; - }; - - /** - * Creates a plain object from an AbortInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.AbortInfo} message AbortInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AbortInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.projectsMissingPermission = []; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.ipAddress = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.AbortInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.projectsMissingPermission && message.projectsMissingPermission.length) { - object.projectsMissingPermission = []; - for (var j = 0; j < message.projectsMissingPermission.length; ++j) - object.projectsMissingPermission[j] = message.projectsMissingPermission[j]; - } - if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) - object.ipAddress = message.ipAddress; - return object; - }; - - /** - * Converts this AbortInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @instance - * @returns {Object.} JSON object - */ - AbortInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AbortInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.AbortInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AbortInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AbortInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1beta1.AbortInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_NETWORK=1 UNKNOWN_NETWORK value - * @property {number} UNKNOWN_PROJECT=3 UNKNOWN_PROJECT value - * @property {number} NO_EXTERNAL_IP=7 NO_EXTERNAL_IP value - * @property {number} UNINTENDED_DESTINATION=8 UNINTENDED_DESTINATION value - * @property {number} SOURCE_ENDPOINT_NOT_FOUND=11 SOURCE_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_SOURCE_NETWORK=12 MISMATCHED_SOURCE_NETWORK value - * @property {number} DESTINATION_ENDPOINT_NOT_FOUND=13 DESTINATION_ENDPOINT_NOT_FOUND value - * @property {number} MISMATCHED_DESTINATION_NETWORK=14 MISMATCHED_DESTINATION_NETWORK value - * @property {number} UNKNOWN_IP=2 UNKNOWN_IP value - * @property {number} GOOGLE_MANAGED_SERVICE_UNKNOWN_IP=32 GOOGLE_MANAGED_SERVICE_UNKNOWN_IP value - * @property {number} SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK=23 SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - * @property {number} PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS=28 PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS=29 PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS value - * @property {number} PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS=36 PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS value - * @property {number} NO_SOURCE_LOCATION=5 NO_SOURCE_LOCATION value - * @property {number} INVALID_ARGUMENT=6 INVALID_ARGUMENT value - * @property {number} TRACE_TOO_LONG=9 TRACE_TOO_LONG value - * @property {number} INTERNAL_ERROR=10 INTERNAL_ERROR value - * @property {number} UNSUPPORTED=15 UNSUPPORTED value - * @property {number} MISMATCHED_IP_VERSION=16 MISMATCHED_IP_VERSION value - * @property {number} GKE_KONNECTIVITY_PROXY_UNSUPPORTED=17 GKE_KONNECTIVITY_PROXY_UNSUPPORTED value - * @property {number} RESOURCE_CONFIG_NOT_FOUND=18 RESOURCE_CONFIG_NOT_FOUND value - * @property {number} VM_INSTANCE_CONFIG_NOT_FOUND=24 VM_INSTANCE_CONFIG_NOT_FOUND value - * @property {number} NETWORK_CONFIG_NOT_FOUND=25 NETWORK_CONFIG_NOT_FOUND value - * @property {number} FIREWALL_CONFIG_NOT_FOUND=26 FIREWALL_CONFIG_NOT_FOUND value - * @property {number} ROUTE_CONFIG_NOT_FOUND=27 ROUTE_CONFIG_NOT_FOUND value - * @property {number} GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT=19 GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT value - * @property {number} SOURCE_PSC_CLOUD_SQL_UNSUPPORTED=20 SOURCE_PSC_CLOUD_SQL_UNSUPPORTED value - * @property {number} SOURCE_REDIS_CLUSTER_UNSUPPORTED=34 SOURCE_REDIS_CLUSTER_UNSUPPORTED value - * @property {number} SOURCE_REDIS_INSTANCE_UNSUPPORTED=35 SOURCE_REDIS_INSTANCE_UNSUPPORTED value - * @property {number} SOURCE_FORWARDING_RULE_UNSUPPORTED=21 SOURCE_FORWARDING_RULE_UNSUPPORTED value - * @property {number} NON_ROUTABLE_IP_ADDRESS=22 NON_ROUTABLE_IP_ADDRESS value - * @property {number} UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT=30 UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT value - * @property {number} UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG=31 UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG value - */ - AbortInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_NETWORK"] = 1; - values[valuesById[3] = "UNKNOWN_PROJECT"] = 3; - values[valuesById[7] = "NO_EXTERNAL_IP"] = 7; - values[valuesById[8] = "UNINTENDED_DESTINATION"] = 8; - values[valuesById[11] = "SOURCE_ENDPOINT_NOT_FOUND"] = 11; - values[valuesById[12] = "MISMATCHED_SOURCE_NETWORK"] = 12; - values[valuesById[13] = "DESTINATION_ENDPOINT_NOT_FOUND"] = 13; - values[valuesById[14] = "MISMATCHED_DESTINATION_NETWORK"] = 14; - values[valuesById[2] = "UNKNOWN_IP"] = 2; - values[valuesById[32] = "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP"] = 32; - values[valuesById[23] = "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK"] = 23; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - values[valuesById[28] = "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS"] = 28; - values[valuesById[29] = "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS"] = 29; - values[valuesById[36] = "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS"] = 36; - values[valuesById[5] = "NO_SOURCE_LOCATION"] = 5; - values[valuesById[6] = "INVALID_ARGUMENT"] = 6; - values[valuesById[9] = "TRACE_TOO_LONG"] = 9; - values[valuesById[10] = "INTERNAL_ERROR"] = 10; - values[valuesById[15] = "UNSUPPORTED"] = 15; - values[valuesById[16] = "MISMATCHED_IP_VERSION"] = 16; - values[valuesById[17] = "GKE_KONNECTIVITY_PROXY_UNSUPPORTED"] = 17; - values[valuesById[18] = "RESOURCE_CONFIG_NOT_FOUND"] = 18; - values[valuesById[24] = "VM_INSTANCE_CONFIG_NOT_FOUND"] = 24; - values[valuesById[25] = "NETWORK_CONFIG_NOT_FOUND"] = 25; - values[valuesById[26] = "FIREWALL_CONFIG_NOT_FOUND"] = 26; - values[valuesById[27] = "ROUTE_CONFIG_NOT_FOUND"] = 27; - values[valuesById[19] = "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT"] = 19; - values[valuesById[20] = "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED"] = 20; - values[valuesById[34] = "SOURCE_REDIS_CLUSTER_UNSUPPORTED"] = 34; - values[valuesById[35] = "SOURCE_REDIS_INSTANCE_UNSUPPORTED"] = 35; - values[valuesById[21] = "SOURCE_FORWARDING_RULE_UNSUPPORTED"] = 21; - values[valuesById[22] = "NON_ROUTABLE_IP_ADDRESS"] = 22; - values[valuesById[30] = "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT"] = 30; - values[valuesById[31] = "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG"] = 31; - return values; - })(); - - return AbortInfo; - })(); - - v1beta1.DropInfo = (function() { - - /** - * Properties of a DropInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDropInfo - * @property {google.cloud.networkmanagement.v1beta1.DropInfo.Cause|null} [cause] DropInfo cause - * @property {string|null} [resourceUri] DropInfo resourceUri - * @property {string|null} [sourceIp] DropInfo sourceIp - * @property {string|null} [destinationIp] DropInfo destinationIp - * @property {string|null} [region] DropInfo region - */ - - /** - * Constructs a new DropInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DropInfo. - * @implements IDropInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set - */ - function DropInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DropInfo cause. - * @member {google.cloud.networkmanagement.v1beta1.DropInfo.Cause} cause - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.cause = 0; - - /** - * DropInfo resourceUri. - * @member {string} resourceUri - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.resourceUri = ""; - - /** - * DropInfo sourceIp. - * @member {string} sourceIp - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.sourceIp = ""; - - /** - * DropInfo destinationIp. - * @member {string} destinationIp - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.destinationIp = ""; - - /** - * DropInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - */ - DropInfo.prototype.region = ""; - - /** - * Creates a new DropInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo instance - */ - DropInfo.create = function create(properties) { - return new DropInfo(properties); - }; - - /** - * Encodes the specified DropInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cause != null && Object.hasOwnProperty.call(message, "cause")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cause); - if (message.resourceUri != null && Object.hasOwnProperty.call(message, "resourceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceUri); - if (message.sourceIp != null && Object.hasOwnProperty.call(message, "sourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceIp); - if (message.destinationIp != null && Object.hasOwnProperty.call(message, "destinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.region); - return writer; - }; - - /** - * Encodes the specified DropInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DropInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDropInfo} message DropInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DropInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cause = reader.int32(); - break; - } - case 2: { - message.resourceUri = reader.string(); - break; - } - case 3: { - message.sourceIp = reader.string(); - break; - } - case 4: { - message.destinationIp = reader.string(); - break; - } - case 5: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DropInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DropInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DropInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DropInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cause != null && message.hasOwnProperty("cause")) - switch (message.cause) { - default: - return "cause: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 42: - case 43: - case 49: - case 50: - case 51: - case 52: - case 53: - case 44: - case 45: - case 46: - case 7: - case 8: - case 47: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 27: - case 28: - case 68: - case 69: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 38: - case 36: - case 21: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 63: - case 22: - case 23: - case 24: - case 60: - case 61: - case 25: - case 26: - case 41: - case 48: - case 54: - case 58: - case 57: - case 64: - case 55: - case 56: - case 29: - case 37: - case 39: - case 40: - case 59: - case 62: - case 65: - case 66: - case 67: - case 70: - case 71: - case 72: - case 73: - case 74: - case 78: - case 75: - case 76: - case 77: - case 79: - case 80: - case 81: - case 82: - case 83: - break; - } - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - if (!$util.isString(message.resourceUri)) - return "resourceUri: string expected"; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - if (!$util.isString(message.sourceIp)) - return "sourceIp: string expected"; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - if (!$util.isString(message.destinationIp)) - return "destinationIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a DropInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DropInfo} DropInfo - */ - DropInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DropInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DropInfo(); - switch (object.cause) { - default: - if (typeof object.cause === "number") { - message.cause = object.cause; - break; - } - break; - case "CAUSE_UNSPECIFIED": - case 0: - message.cause = 0; - break; - case "UNKNOWN_EXTERNAL_ADDRESS": - case 1: - message.cause = 1; - break; - case "FOREIGN_IP_DISALLOWED": - case 2: - message.cause = 2; - break; - case "FIREWALL_RULE": - case 3: - message.cause = 3; - break; - case "NO_ROUTE": - case 4: - message.cause = 4; - break; - case "ROUTE_BLACKHOLE": - case 5: - message.cause = 5; - break; - case "ROUTE_WRONG_NETWORK": - case 6: - message.cause = 6; - break; - case "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": - case 42: - message.cause = 42; - break; - case "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": - case 43: - message.cause = 43; - break; - case "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": - case 49: - message.cause = 49; - break; - case "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": - case 50: - message.cause = 50; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": - case 51: - message.cause = 51; - break; - case "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": - case 52: - message.cause = 52; - break; - case "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": - case 53: - message.cause = 53; - break; - case "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": - case 44: - message.cause = 44; - break; - case "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": - case 45: - message.cause = 45; - break; - case "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": - case 46: - message.cause = 46; - break; - case "PRIVATE_TRAFFIC_TO_INTERNET": - case 7: - message.cause = 7; - break; - case "PRIVATE_GOOGLE_ACCESS_DISALLOWED": - case 8: - message.cause = 8; - break; - case "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": - case 47: - message.cause = 47; - break; - case "NO_EXTERNAL_ADDRESS": - case 9: - message.cause = 9; - break; - case "UNKNOWN_INTERNAL_ADDRESS": - case 10: - message.cause = 10; - break; - case "FORWARDING_RULE_MISMATCH": - case 11: - message.cause = 11; - break; - case "FORWARDING_RULE_NO_INSTANCES": - case 12: - message.cause = 12; - break; - case "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": - case 13: - message.cause = 13; - break; - case "INSTANCE_NOT_RUNNING": - case 14: - message.cause = 14; - break; - case "GKE_CLUSTER_NOT_RUNNING": - case 27: - message.cause = 27; - break; - case "CLOUD_SQL_INSTANCE_NOT_RUNNING": - case 28: - message.cause = 28; - break; - case "REDIS_INSTANCE_NOT_RUNNING": - case 68: - message.cause = 68; - break; - case "REDIS_CLUSTER_NOT_RUNNING": - case 69: - message.cause = 69; - break; - case "TRAFFIC_TYPE_BLOCKED": - case 15: - message.cause = 15; - break; - case "GKE_MASTER_UNAUTHORIZED_ACCESS": - case 16: - message.cause = 16; - break; - case "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": - case 17: - message.cause = 17; - break; - case "DROPPED_INSIDE_GKE_SERVICE": - case 18: - message.cause = 18; - break; - case "DROPPED_INSIDE_CLOUD_SQL_SERVICE": - case 19: - message.cause = 19; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PEERING": - case 20: - message.cause = 20; - break; - case "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": - case 38: - message.cause = 38; - break; - case "GKE_PSC_ENDPOINT_MISSING": - case 36: - message.cause = 36; - break; - case "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": - case 21: - message.cause = 21; - break; - case "GKE_CONTROL_PLANE_REGION_MISMATCH": - case 30: - message.cause = 30; - break; - case "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": - case 31: - message.cause = 31; - break; - case "GKE_CONTROL_PLANE_NO_ROUTE": - case 32: - message.cause = 32; - break; - case "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": - case 33: - message.cause = 33; - break; - case "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": - case 34: - message.cause = 34; - break; - case "CLOUD_SQL_INSTANCE_NO_ROUTE": - case 35: - message.cause = 35; - break; - case "CLOUD_SQL_CONNECTOR_REQUIRED": - case 63: - message.cause = 63; - break; - case "CLOUD_FUNCTION_NOT_ACTIVE": - case 22: - message.cause = 22; - break; - case "VPC_CONNECTOR_NOT_SET": - case 23: - message.cause = 23; - break; - case "VPC_CONNECTOR_NOT_RUNNING": - case 24: - message.cause = 24; - break; - case "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": - case 60: - message.cause = 60; - break; - case "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": - case 61: - message.cause = 61; - break; - case "FORWARDING_RULE_REGION_MISMATCH": - case 25: - message.cause = 25; - break; - case "PSC_CONNECTION_NOT_ACCEPTED": - case 26: - message.cause = 26; - break; - case "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": - case 41: - message.cause = 41; - break; - case "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": - case 48: - message.cause = 48; - break; - case "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": - case 54: - message.cause = 54; - break; - case "CLOUD_SQL_PSC_NEG_UNSUPPORTED": - case 58: - message.cause = 58; - break; - case "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": - case 57: - message.cause = 57; - break; - case "PSC_TRANSITIVITY_NOT_PROPAGATED": - case 64: - message.cause = 64; - break; - case "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": - case 55: - message.cause = 55; - break; - case "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": - case 56: - message.cause = 56; - break; - case "CLOUD_RUN_REVISION_NOT_READY": - case 29: - message.cause = 29; - break; - case "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": - case 37: - message.cause = 37; - break; - case "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": - case 39: - message.cause = 39; - break; - case "CLOUD_NAT_NO_ADDRESSES": - case 40: - message.cause = 40; - break; - case "ROUTING_LOOP": - case 59: - message.cause = 59; - break; - case "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": - case 62: - message.cause = 62; - break; - case "LOAD_BALANCER_BACKEND_INVALID_NETWORK": - case 65: - message.cause = 65; - break; - case "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": - case 66: - message.cause = 66; - break; - case "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": - case 67: - message.cause = 67; - break; - case "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": - case 70: - message.cause = 70; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PORT": - case 71: - message.cause = 71; - break; - case "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": - case 72: - message.cause = 72; - break; - case "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": - case 73: - message.cause = 73; - break; - case "REDIS_INSTANCE_NO_EXTERNAL_IP": - case 74: - message.cause = 74; - break; - case "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": - case 78: - message.cause = 78; - break; - case "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": - case 75: - message.cause = 75; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PORT": - case 76: - message.cause = 76; - break; - case "REDIS_CLUSTER_NO_EXTERNAL_IP": - case 77: - message.cause = 77; - break; - case "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": - case 79: - message.cause = 79; - break; - case "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": - case 80: - message.cause = 80; - break; - case "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": - case 81: - message.cause = 81; - break; - case "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": - case 82: - message.cause = 82; - break; - case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": - case 83: - message.cause = 83; - break; - } - if (object.resourceUri != null) - message.resourceUri = String(object.resourceUri); - if (object.sourceIp != null) - message.sourceIp = String(object.sourceIp); - if (object.destinationIp != null) - message.destinationIp = String(object.destinationIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a DropInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.DropInfo} message DropInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DropInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cause = options.enums === String ? "CAUSE_UNSPECIFIED" : 0; - object.resourceUri = ""; - object.sourceIp = ""; - object.destinationIp = ""; - object.region = ""; - } - if (message.cause != null && message.hasOwnProperty("cause")) - object.cause = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] === undefined ? message.cause : $root.google.cloud.networkmanagement.v1beta1.DropInfo.Cause[message.cause] : message.cause; - if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) - object.resourceUri = message.resourceUri; - if (message.sourceIp != null && message.hasOwnProperty("sourceIp")) - object.sourceIp = message.sourceIp; - if (message.destinationIp != null && message.hasOwnProperty("destinationIp")) - object.destinationIp = message.destinationIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this DropInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @instance - * @returns {Object.} JSON object - */ - DropInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DropInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DropInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DropInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DropInfo"; - }; - - /** - * Cause enum. - * @name google.cloud.networkmanagement.v1beta1.DropInfo.Cause - * @enum {number} - * @property {number} CAUSE_UNSPECIFIED=0 CAUSE_UNSPECIFIED value - * @property {number} UNKNOWN_EXTERNAL_ADDRESS=1 UNKNOWN_EXTERNAL_ADDRESS value - * @property {number} FOREIGN_IP_DISALLOWED=2 FOREIGN_IP_DISALLOWED value - * @property {number} FIREWALL_RULE=3 FIREWALL_RULE value - * @property {number} NO_ROUTE=4 NO_ROUTE value - * @property {number} ROUTE_BLACKHOLE=5 ROUTE_BLACKHOLE value - * @property {number} ROUTE_WRONG_NETWORK=6 ROUTE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED=42 ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED value - * @property {number} ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND=43 ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK=49 ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK value - * @property {number} ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP=50 ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH=51 ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH value - * @property {number} ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED=52 ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED value - * @property {number} ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID=53 ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID value - * @property {number} NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS=44 NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS value - * @property {number} VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH=45 VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH value - * @property {number} VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH=46 VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH value - * @property {number} PRIVATE_TRAFFIC_TO_INTERNET=7 PRIVATE_TRAFFIC_TO_INTERNET value - * @property {number} PRIVATE_GOOGLE_ACCESS_DISALLOWED=8 PRIVATE_GOOGLE_ACCESS_DISALLOWED value - * @property {number} PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED=47 PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED value - * @property {number} NO_EXTERNAL_ADDRESS=9 NO_EXTERNAL_ADDRESS value - * @property {number} UNKNOWN_INTERNAL_ADDRESS=10 UNKNOWN_INTERNAL_ADDRESS value - * @property {number} FORWARDING_RULE_MISMATCH=11 FORWARDING_RULE_MISMATCH value - * @property {number} FORWARDING_RULE_NO_INSTANCES=12 FORWARDING_RULE_NO_INSTANCES value - * @property {number} FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK=13 FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK value - * @property {number} INSTANCE_NOT_RUNNING=14 INSTANCE_NOT_RUNNING value - * @property {number} GKE_CLUSTER_NOT_RUNNING=27 GKE_CLUSTER_NOT_RUNNING value - * @property {number} CLOUD_SQL_INSTANCE_NOT_RUNNING=28 CLOUD_SQL_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_INSTANCE_NOT_RUNNING=68 REDIS_INSTANCE_NOT_RUNNING value - * @property {number} REDIS_CLUSTER_NOT_RUNNING=69 REDIS_CLUSTER_NOT_RUNNING value - * @property {number} TRAFFIC_TYPE_BLOCKED=15 TRAFFIC_TYPE_BLOCKED value - * @property {number} GKE_MASTER_UNAUTHORIZED_ACCESS=16 GKE_MASTER_UNAUTHORIZED_ACCESS value - * @property {number} CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS=17 CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS value - * @property {number} DROPPED_INSIDE_GKE_SERVICE=18 DROPPED_INSIDE_GKE_SERVICE value - * @property {number} DROPPED_INSIDE_CLOUD_SQL_SERVICE=19 DROPPED_INSIDE_CLOUD_SQL_SERVICE value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PEERING=20 GOOGLE_MANAGED_SERVICE_NO_PEERING value - * @property {number} GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT=38 GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT value - * @property {number} GKE_PSC_ENDPOINT_MISSING=36 GKE_PSC_ENDPOINT_MISSING value - * @property {number} CLOUD_SQL_INSTANCE_NO_IP_ADDRESS=21 CLOUD_SQL_INSTANCE_NO_IP_ADDRESS value - * @property {number} GKE_CONTROL_PLANE_REGION_MISMATCH=30 GKE_CONTROL_PLANE_REGION_MISMATCH value - * @property {number} PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION=31 PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION value - * @property {number} GKE_CONTROL_PLANE_NO_ROUTE=32 GKE_CONTROL_PLANE_NO_ROUTE value - * @property {number} CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC=33 CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC value - * @property {number} PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION=34 PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION value - * @property {number} CLOUD_SQL_INSTANCE_NO_ROUTE=35 CLOUD_SQL_INSTANCE_NO_ROUTE value - * @property {number} CLOUD_SQL_CONNECTOR_REQUIRED=63 CLOUD_SQL_CONNECTOR_REQUIRED value - * @property {number} CLOUD_FUNCTION_NOT_ACTIVE=22 CLOUD_FUNCTION_NOT_ACTIVE value - * @property {number} VPC_CONNECTOR_NOT_SET=23 VPC_CONNECTOR_NOT_SET value - * @property {number} VPC_CONNECTOR_NOT_RUNNING=24 VPC_CONNECTOR_NOT_RUNNING value - * @property {number} VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED=60 VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED value - * @property {number} VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED=61 VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED value - * @property {number} FORWARDING_RULE_REGION_MISMATCH=25 FORWARDING_RULE_REGION_MISMATCH value - * @property {number} PSC_CONNECTION_NOT_ACCEPTED=26 PSC_CONNECTION_NOT_ACCEPTED value - * @property {number} PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK=41 PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK value - * @property {number} PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS=48 PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS value - * @property {number} PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS=54 PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS value - * @property {number} CLOUD_SQL_PSC_NEG_UNSUPPORTED=58 CLOUD_SQL_PSC_NEG_UNSUPPORTED value - * @property {number} NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT=57 NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT value - * @property {number} PSC_TRANSITIVITY_NOT_PROPAGATED=64 PSC_TRANSITIVITY_NOT_PROPAGATED value - * @property {number} HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED=55 HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED value - * @property {number} HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED=56 HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED value - * @property {number} CLOUD_RUN_REVISION_NOT_READY=29 CLOUD_RUN_REVISION_NOT_READY value - * @property {number} DROPPED_INSIDE_PSC_SERVICE_PRODUCER=37 DROPPED_INSIDE_PSC_SERVICE_PRODUCER value - * @property {number} LOAD_BALANCER_HAS_NO_PROXY_SUBNET=39 LOAD_BALANCER_HAS_NO_PROXY_SUBNET value - * @property {number} CLOUD_NAT_NO_ADDRESSES=40 CLOUD_NAT_NO_ADDRESSES value - * @property {number} ROUTING_LOOP=59 ROUTING_LOOP value - * @property {number} DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE=62 DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE value - * @property {number} LOAD_BALANCER_BACKEND_INVALID_NETWORK=65 LOAD_BALANCER_BACKEND_INVALID_NETWORK value - * @property {number} BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED=66 BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED value - * @property {number} DESTINATION_IS_PRIVATE_NAT_IP_RANGE=67 DESTINATION_IS_PRIVATE_NAT_IP_RANGE value - * @property {number} DROPPED_INSIDE_REDIS_INSTANCE_SERVICE=70 DROPPED_INSIDE_REDIS_INSTANCE_SERVICE value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PORT=71 REDIS_INSTANCE_UNSUPPORTED_PORT value - * @property {number} REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS=72 REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS value - * @property {number} REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK=73 REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK value - * @property {number} REDIS_INSTANCE_NO_EXTERNAL_IP=74 REDIS_INSTANCE_NO_EXTERNAL_IP value - * @property {number} REDIS_INSTANCE_UNSUPPORTED_PROTOCOL=78 REDIS_INSTANCE_UNSUPPORTED_PROTOCOL value - * @property {number} DROPPED_INSIDE_REDIS_CLUSTER_SERVICE=75 DROPPED_INSIDE_REDIS_CLUSTER_SERVICE value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PORT=76 REDIS_CLUSTER_UNSUPPORTED_PORT value - * @property {number} REDIS_CLUSTER_NO_EXTERNAL_IP=77 REDIS_CLUSTER_NO_EXTERNAL_IP value - * @property {number} REDIS_CLUSTER_UNSUPPORTED_PROTOCOL=79 REDIS_CLUSTER_UNSUPPORTED_PROTOCOL value - * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value - * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value - * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value - * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value - */ - DropInfo.Cause = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CAUSE_UNSPECIFIED"] = 0; - values[valuesById[1] = "UNKNOWN_EXTERNAL_ADDRESS"] = 1; - values[valuesById[2] = "FOREIGN_IP_DISALLOWED"] = 2; - values[valuesById[3] = "FIREWALL_RULE"] = 3; - values[valuesById[4] = "NO_ROUTE"] = 4; - values[valuesById[5] = "ROUTE_BLACKHOLE"] = 5; - values[valuesById[6] = "ROUTE_WRONG_NETWORK"] = 6; - values[valuesById[42] = "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED"] = 42; - values[valuesById[43] = "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND"] = 43; - values[valuesById[49] = "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK"] = 49; - values[valuesById[50] = "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP"] = 50; - values[valuesById[51] = "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH"] = 51; - values[valuesById[52] = "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED"] = 52; - values[valuesById[53] = "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID"] = 53; - values[valuesById[44] = "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS"] = 44; - values[valuesById[45] = "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH"] = 45; - values[valuesById[46] = "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH"] = 46; - values[valuesById[7] = "PRIVATE_TRAFFIC_TO_INTERNET"] = 7; - values[valuesById[8] = "PRIVATE_GOOGLE_ACCESS_DISALLOWED"] = 8; - values[valuesById[47] = "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED"] = 47; - values[valuesById[9] = "NO_EXTERNAL_ADDRESS"] = 9; - values[valuesById[10] = "UNKNOWN_INTERNAL_ADDRESS"] = 10; - values[valuesById[11] = "FORWARDING_RULE_MISMATCH"] = 11; - values[valuesById[12] = "FORWARDING_RULE_NO_INSTANCES"] = 12; - values[valuesById[13] = "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK"] = 13; - values[valuesById[14] = "INSTANCE_NOT_RUNNING"] = 14; - values[valuesById[27] = "GKE_CLUSTER_NOT_RUNNING"] = 27; - values[valuesById[28] = "CLOUD_SQL_INSTANCE_NOT_RUNNING"] = 28; - values[valuesById[68] = "REDIS_INSTANCE_NOT_RUNNING"] = 68; - values[valuesById[69] = "REDIS_CLUSTER_NOT_RUNNING"] = 69; - values[valuesById[15] = "TRAFFIC_TYPE_BLOCKED"] = 15; - values[valuesById[16] = "GKE_MASTER_UNAUTHORIZED_ACCESS"] = 16; - values[valuesById[17] = "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS"] = 17; - values[valuesById[18] = "DROPPED_INSIDE_GKE_SERVICE"] = 18; - values[valuesById[19] = "DROPPED_INSIDE_CLOUD_SQL_SERVICE"] = 19; - values[valuesById[20] = "GOOGLE_MANAGED_SERVICE_NO_PEERING"] = 20; - values[valuesById[38] = "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT"] = 38; - values[valuesById[36] = "GKE_PSC_ENDPOINT_MISSING"] = 36; - values[valuesById[21] = "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS"] = 21; - values[valuesById[30] = "GKE_CONTROL_PLANE_REGION_MISMATCH"] = 30; - values[valuesById[31] = "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION"] = 31; - values[valuesById[32] = "GKE_CONTROL_PLANE_NO_ROUTE"] = 32; - values[valuesById[33] = "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC"] = 33; - values[valuesById[34] = "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION"] = 34; - values[valuesById[35] = "CLOUD_SQL_INSTANCE_NO_ROUTE"] = 35; - values[valuesById[63] = "CLOUD_SQL_CONNECTOR_REQUIRED"] = 63; - values[valuesById[22] = "CLOUD_FUNCTION_NOT_ACTIVE"] = 22; - values[valuesById[23] = "VPC_CONNECTOR_NOT_SET"] = 23; - values[valuesById[24] = "VPC_CONNECTOR_NOT_RUNNING"] = 24; - values[valuesById[60] = "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED"] = 60; - values[valuesById[61] = "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED"] = 61; - values[valuesById[25] = "FORWARDING_RULE_REGION_MISMATCH"] = 25; - values[valuesById[26] = "PSC_CONNECTION_NOT_ACCEPTED"] = 26; - values[valuesById[41] = "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK"] = 41; - values[valuesById[48] = "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS"] = 48; - values[valuesById[54] = "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS"] = 54; - values[valuesById[58] = "CLOUD_SQL_PSC_NEG_UNSUPPORTED"] = 58; - values[valuesById[57] = "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT"] = 57; - values[valuesById[64] = "PSC_TRANSITIVITY_NOT_PROPAGATED"] = 64; - values[valuesById[55] = "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED"] = 55; - values[valuesById[56] = "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED"] = 56; - values[valuesById[29] = "CLOUD_RUN_REVISION_NOT_READY"] = 29; - values[valuesById[37] = "DROPPED_INSIDE_PSC_SERVICE_PRODUCER"] = 37; - values[valuesById[39] = "LOAD_BALANCER_HAS_NO_PROXY_SUBNET"] = 39; - values[valuesById[40] = "CLOUD_NAT_NO_ADDRESSES"] = 40; - values[valuesById[59] = "ROUTING_LOOP"] = 59; - values[valuesById[62] = "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE"] = 62; - values[valuesById[65] = "LOAD_BALANCER_BACKEND_INVALID_NETWORK"] = 65; - values[valuesById[66] = "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED"] = 66; - values[valuesById[67] = "DESTINATION_IS_PRIVATE_NAT_IP_RANGE"] = 67; - values[valuesById[70] = "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE"] = 70; - values[valuesById[71] = "REDIS_INSTANCE_UNSUPPORTED_PORT"] = 71; - values[valuesById[72] = "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS"] = 72; - values[valuesById[73] = "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK"] = 73; - values[valuesById[74] = "REDIS_INSTANCE_NO_EXTERNAL_IP"] = 74; - values[valuesById[78] = "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL"] = 78; - values[valuesById[75] = "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE"] = 75; - values[valuesById[76] = "REDIS_CLUSTER_UNSUPPORTED_PORT"] = 76; - values[valuesById[77] = "REDIS_CLUSTER_NO_EXTERNAL_IP"] = 77; - values[valuesById[79] = "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL"] = 79; - values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; - values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; - values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; - values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; - return values; - })(); - - return DropInfo; - })(); - - v1beta1.GKEMasterInfo = (function() { - - /** - * Properties of a GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGKEMasterInfo - * @property {string|null} [clusterUri] GKEMasterInfo clusterUri - * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri - * @property {string|null} [internalIp] GKEMasterInfo internalIp - * @property {string|null} [externalIp] GKEMasterInfo externalIp - * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint - */ - - /** - * Constructs a new GKEMasterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GKEMasterInfo. - * @implements IGKEMasterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set - */ - function GKEMasterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GKEMasterInfo clusterUri. - * @member {string} clusterUri - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterUri = ""; - - /** - * GKEMasterInfo clusterNetworkUri. - * @member {string} clusterNetworkUri - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.clusterNetworkUri = ""; - - /** - * GKEMasterInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.internalIp = ""; - - /** - * GKEMasterInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.externalIp = ""; - - /** - * GKEMasterInfo dnsEndpoint. - * @member {string} dnsEndpoint - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - */ - GKEMasterInfo.prototype.dnsEndpoint = ""; - - /** - * Creates a new GKEMasterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo instance - */ - GKEMasterInfo.create = function create(properties) { - return new GKEMasterInfo(properties); - }; - - /** - * Encodes the specified GKEMasterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clusterUri != null && Object.hasOwnProperty.call(message, "clusterUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterUri); - if (message.clusterNetworkUri != null && Object.hasOwnProperty.call(message, "clusterNetworkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterNetworkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); - return writer; - }; - - /** - * Encodes the specified GKEMasterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GKEMasterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGKEMasterInfo} message GKEMasterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GKEMasterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.clusterUri = reader.string(); - break; - } - case 4: { - message.clusterNetworkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.dnsEndpoint = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GKEMasterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GKEMasterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GKEMasterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GKEMasterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - if (!$util.isString(message.clusterUri)) - return "clusterUri: string expected"; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - if (!$util.isString(message.clusterNetworkUri)) - return "clusterNetworkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) - if (!$util.isString(message.dnsEndpoint)) - return "dnsEndpoint: string expected"; - return null; - }; - - /** - * Creates a GKEMasterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} GKEMasterInfo - */ - GKEMasterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GKEMasterInfo(); - if (object.clusterUri != null) - message.clusterUri = String(object.clusterUri); - if (object.clusterNetworkUri != null) - message.clusterNetworkUri = String(object.clusterNetworkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.dnsEndpoint != null) - message.dnsEndpoint = String(object.dnsEndpoint); - return message; - }; - - /** - * Creates a plain object from a GKEMasterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.GKEMasterInfo} message GKEMasterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GKEMasterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clusterUri = ""; - object.clusterNetworkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.dnsEndpoint = ""; - } - if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) - object.clusterUri = message.clusterUri; - if (message.clusterNetworkUri != null && message.hasOwnProperty("clusterNetworkUri")) - object.clusterNetworkUri = message.clusterNetworkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) - object.dnsEndpoint = message.dnsEndpoint; - return object; - }; - - /** - * Converts this GKEMasterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @instance - * @returns {Object.} JSON object - */ - GKEMasterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GKEMasterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GKEMasterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GKEMasterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GKEMasterInfo"; - }; - - return GKEMasterInfo; - })(); - - v1beta1.CloudSQLInstanceInfo = (function() { - - /** - * Properties of a CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICloudSQLInstanceInfo - * @property {string|null} [displayName] CloudSQLInstanceInfo displayName - * @property {string|null} [uri] CloudSQLInstanceInfo uri - * @property {string|null} [networkUri] CloudSQLInstanceInfo networkUri - * @property {string|null} [internalIp] CloudSQLInstanceInfo internalIp - * @property {string|null} [externalIp] CloudSQLInstanceInfo externalIp - * @property {string|null} [region] CloudSQLInstanceInfo region - */ - - /** - * Constructs a new CloudSQLInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CloudSQLInstanceInfo. - * @implements ICloudSQLInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set - */ - function CloudSQLInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudSQLInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.displayName = ""; - - /** - * CloudSQLInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.uri = ""; - - /** - * CloudSQLInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.networkUri = ""; - - /** - * CloudSQLInstanceInfo internalIp. - * @member {string} internalIp - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.internalIp = ""; - - /** - * CloudSQLInstanceInfo externalIp. - * @member {string} externalIp - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.externalIp = ""; - - /** - * CloudSQLInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - */ - CloudSQLInstanceInfo.prototype.region = ""; - - /** - * Creates a new CloudSQLInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo instance - */ - CloudSQLInstanceInfo.create = function create(properties) { - return new CloudSQLInstanceInfo(properties); - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.networkUri); - if (message.internalIp != null && Object.hasOwnProperty.call(message, "internalIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); - if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.region); - return writer; - }; - - /** - * Encodes the specified CloudSQLInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudSQLInstanceInfo} message CloudSQLInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudSQLInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.networkUri = reader.string(); - break; - } - case 5: { - message.internalIp = reader.string(); - break; - } - case 6: { - message.externalIp = reader.string(); - break; - } - case 7: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudSQLInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudSQLInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudSQLInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudSQLInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - if (!$util.isString(message.internalIp)) - return "internalIp: string expected"; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - if (!$util.isString(message.externalIp)) - return "externalIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a CloudSQLInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} CloudSQLInstanceInfo - */ - CloudSQLInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.internalIp != null) - message.internalIp = String(object.internalIp); - if (object.externalIp != null) - message.externalIp = String(object.externalIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a CloudSQLInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo} message CloudSQLInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudSQLInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.internalIp = ""; - object.externalIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.internalIp != null && message.hasOwnProperty("internalIp")) - object.internalIp = message.internalIp; - if (message.externalIp != null && message.hasOwnProperty("externalIp")) - object.externalIp = message.externalIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this CloudSQLInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - CloudSQLInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudSQLInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudSQLInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudSQLInstanceInfo"; - }; - - return CloudSQLInstanceInfo; - })(); - - v1beta1.RedisInstanceInfo = (function() { - - /** - * Properties of a RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRedisInstanceInfo - * @property {string|null} [displayName] RedisInstanceInfo displayName - * @property {string|null} [uri] RedisInstanceInfo uri - * @property {string|null} [networkUri] RedisInstanceInfo networkUri - * @property {string|null} [primaryEndpointIp] RedisInstanceInfo primaryEndpointIp - * @property {string|null} [readEndpointIp] RedisInstanceInfo readEndpointIp - * @property {string|null} [region] RedisInstanceInfo region - */ - - /** - * Constructs a new RedisInstanceInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RedisInstanceInfo. - * @implements IRedisInstanceInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set - */ - function RedisInstanceInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisInstanceInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.displayName = ""; - - /** - * RedisInstanceInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.uri = ""; - - /** - * RedisInstanceInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.networkUri = ""; - - /** - * RedisInstanceInfo primaryEndpointIp. - * @member {string} primaryEndpointIp - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.primaryEndpointIp = ""; - - /** - * RedisInstanceInfo readEndpointIp. - * @member {string} readEndpointIp - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.readEndpointIp = ""; - - /** - * RedisInstanceInfo region. - * @member {string} region - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - */ - RedisInstanceInfo.prototype.region = ""; - - /** - * Creates a new RedisInstanceInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo instance - */ - RedisInstanceInfo.create = function create(properties) { - return new RedisInstanceInfo(properties); - }; - - /** - * Encodes the specified RedisInstanceInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.primaryEndpointIp != null && Object.hasOwnProperty.call(message, "primaryEndpointIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.primaryEndpointIp); - if (message.readEndpointIp != null && Object.hasOwnProperty.call(message, "readEndpointIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.readEndpointIp); - if (message.region != null && Object.hasOwnProperty.call(message, "region")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); - return writer; - }; - - /** - * Encodes the specified RedisInstanceInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisInstanceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisInstanceInfo} message RedisInstanceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisInstanceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.primaryEndpointIp = reader.string(); - break; - } - case 5: { - message.readEndpointIp = reader.string(); - break; - } - case 6: { - message.region = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisInstanceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisInstanceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisInstanceInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisInstanceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - if (!$util.isString(message.primaryEndpointIp)) - return "primaryEndpointIp: string expected"; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - if (!$util.isString(message.readEndpointIp)) - return "readEndpointIp: string expected"; - if (message.region != null && message.hasOwnProperty("region")) - if (!$util.isString(message.region)) - return "region: string expected"; - return null; - }; - - /** - * Creates a RedisInstanceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} RedisInstanceInfo - */ - RedisInstanceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RedisInstanceInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.primaryEndpointIp != null) - message.primaryEndpointIp = String(object.primaryEndpointIp); - if (object.readEndpointIp != null) - message.readEndpointIp = String(object.readEndpointIp); - if (object.region != null) - message.region = String(object.region); - return message; - }; - - /** - * Creates a plain object from a RedisInstanceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.RedisInstanceInfo} message RedisInstanceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisInstanceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.primaryEndpointIp = ""; - object.readEndpointIp = ""; - object.region = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.primaryEndpointIp != null && message.hasOwnProperty("primaryEndpointIp")) - object.primaryEndpointIp = message.primaryEndpointIp; - if (message.readEndpointIp != null && message.hasOwnProperty("readEndpointIp")) - object.readEndpointIp = message.readEndpointIp; - if (message.region != null && message.hasOwnProperty("region")) - object.region = message.region; - return object; - }; - - /** - * Converts this RedisInstanceInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @instance - * @returns {Object.} JSON object - */ - RedisInstanceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisInstanceInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RedisInstanceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisInstanceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisInstanceInfo"; - }; - - return RedisInstanceInfo; - })(); - - v1beta1.RedisClusterInfo = (function() { - - /** - * Properties of a RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRedisClusterInfo - * @property {string|null} [displayName] RedisClusterInfo displayName - * @property {string|null} [uri] RedisClusterInfo uri - * @property {string|null} [networkUri] RedisClusterInfo networkUri - * @property {string|null} [discoveryEndpointIpAddress] RedisClusterInfo discoveryEndpointIpAddress - * @property {string|null} [secondaryEndpointIpAddress] RedisClusterInfo secondaryEndpointIpAddress - * @property {string|null} [location] RedisClusterInfo location - */ - - /** - * Constructs a new RedisClusterInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RedisClusterInfo. - * @implements IRedisClusterInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set - */ - function RedisClusterInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RedisClusterInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.displayName = ""; - - /** - * RedisClusterInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.uri = ""; - - /** - * RedisClusterInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.networkUri = ""; - - /** - * RedisClusterInfo discoveryEndpointIpAddress. - * @member {string} discoveryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.discoveryEndpointIpAddress = ""; - - /** - * RedisClusterInfo secondaryEndpointIpAddress. - * @member {string} secondaryEndpointIpAddress - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.secondaryEndpointIpAddress = ""; - - /** - * RedisClusterInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - */ - RedisClusterInfo.prototype.location = ""; - - /** - * Creates a new RedisClusterInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo instance - */ - RedisClusterInfo.create = function create(properties) { - return new RedisClusterInfo(properties); - }; - - /** - * Encodes the specified RedisClusterInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.discoveryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "discoveryEndpointIpAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.discoveryEndpointIpAddress); - if (message.secondaryEndpointIpAddress != null && Object.hasOwnProperty.call(message, "secondaryEndpointIpAddress")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.secondaryEndpointIpAddress); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.location); - return writer; - }; - - /** - * Encodes the specified RedisClusterInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RedisClusterInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRedisClusterInfo} message RedisClusterInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedisClusterInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.discoveryEndpointIpAddress = reader.string(); - break; - } - case 5: { - message.secondaryEndpointIpAddress = reader.string(); - break; - } - case 6: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RedisClusterInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedisClusterInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedisClusterInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedisClusterInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - if (!$util.isString(message.discoveryEndpointIpAddress)) - return "discoveryEndpointIpAddress: string expected"; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - if (!$util.isString(message.secondaryEndpointIpAddress)) - return "secondaryEndpointIpAddress: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a RedisClusterInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} RedisClusterInfo - */ - RedisClusterInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RedisClusterInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.discoveryEndpointIpAddress != null) - message.discoveryEndpointIpAddress = String(object.discoveryEndpointIpAddress); - if (object.secondaryEndpointIpAddress != null) - message.secondaryEndpointIpAddress = String(object.secondaryEndpointIpAddress); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a RedisClusterInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.RedisClusterInfo} message RedisClusterInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedisClusterInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.networkUri = ""; - object.discoveryEndpointIpAddress = ""; - object.secondaryEndpointIpAddress = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.discoveryEndpointIpAddress != null && message.hasOwnProperty("discoveryEndpointIpAddress")) - object.discoveryEndpointIpAddress = message.discoveryEndpointIpAddress; - if (message.secondaryEndpointIpAddress != null && message.hasOwnProperty("secondaryEndpointIpAddress")) - object.secondaryEndpointIpAddress = message.secondaryEndpointIpAddress; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this RedisClusterInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @instance - * @returns {Object.} JSON object - */ - RedisClusterInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RedisClusterInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RedisClusterInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RedisClusterInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RedisClusterInfo"; - }; - - return RedisClusterInfo; - })(); - - v1beta1.CloudFunctionInfo = (function() { - - /** - * Properties of a CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICloudFunctionInfo - * @property {string|null} [displayName] CloudFunctionInfo displayName - * @property {string|null} [uri] CloudFunctionInfo uri - * @property {string|null} [location] CloudFunctionInfo location - * @property {number|Long|null} [versionId] CloudFunctionInfo versionId - */ - - /** - * Constructs a new CloudFunctionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CloudFunctionInfo. - * @implements ICloudFunctionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set - */ - function CloudFunctionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudFunctionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.displayName = ""; - - /** - * CloudFunctionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.uri = ""; - - /** - * CloudFunctionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.location = ""; - - /** - * CloudFunctionInfo versionId. - * @member {number|Long} versionId - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - */ - CloudFunctionInfo.prototype.versionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new CloudFunctionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo instance - */ - CloudFunctionInfo.create = function create(properties) { - return new CloudFunctionInfo(properties); - }; - - /** - * Encodes the specified CloudFunctionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.versionId); - return writer; - }; - - /** - * Encodes the specified CloudFunctionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudFunctionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudFunctionInfo} message CloudFunctionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudFunctionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - case 4: { - message.versionId = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudFunctionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudFunctionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudFunctionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudFunctionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (!$util.isInteger(message.versionId) && !(message.versionId && $util.isInteger(message.versionId.low) && $util.isInteger(message.versionId.high))) - return "versionId: integer|Long expected"; - return null; - }; - - /** - * Creates a CloudFunctionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} CloudFunctionInfo - */ - CloudFunctionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CloudFunctionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.versionId != null) - if ($util.Long) - (message.versionId = $util.Long.fromValue(object.versionId)).unsigned = false; - else if (typeof object.versionId === "string") - message.versionId = parseInt(object.versionId, 10); - else if (typeof object.versionId === "number") - message.versionId = object.versionId; - else if (typeof object.versionId === "object") - message.versionId = new $util.LongBits(object.versionId.low >>> 0, object.versionId.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a CloudFunctionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.CloudFunctionInfo} message CloudFunctionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudFunctionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.versionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.versionId = options.longs === String ? "0" : 0; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.versionId != null && message.hasOwnProperty("versionId")) - if (typeof message.versionId === "number") - object.versionId = options.longs === String ? String(message.versionId) : message.versionId; - else - object.versionId = options.longs === String ? $util.Long.prototype.toString.call(message.versionId) : options.longs === Number ? new $util.LongBits(message.versionId.low >>> 0, message.versionId.high >>> 0).toNumber() : message.versionId; - return object; - }; - - /** - * Converts this CloudFunctionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudFunctionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudFunctionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CloudFunctionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudFunctionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudFunctionInfo"; - }; - - return CloudFunctionInfo; - })(); - - v1beta1.CloudRunRevisionInfo = (function() { - - /** - * Properties of a CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICloudRunRevisionInfo - * @property {string|null} [displayName] CloudRunRevisionInfo displayName - * @property {string|null} [uri] CloudRunRevisionInfo uri - * @property {string|null} [location] CloudRunRevisionInfo location - * @property {string|null} [serviceUri] CloudRunRevisionInfo serviceUri - */ - - /** - * Constructs a new CloudRunRevisionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CloudRunRevisionInfo. - * @implements ICloudRunRevisionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set - */ - function CloudRunRevisionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudRunRevisionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.displayName = ""; - - /** - * CloudRunRevisionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.uri = ""; - - /** - * CloudRunRevisionInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.location = ""; - - /** - * CloudRunRevisionInfo serviceUri. - * @member {string} serviceUri - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - */ - CloudRunRevisionInfo.prototype.serviceUri = ""; - - /** - * Creates a new CloudRunRevisionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo instance - */ - CloudRunRevisionInfo.create = function create(properties) { - return new CloudRunRevisionInfo(properties); - }; - - /** - * Encodes the specified CloudRunRevisionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); - if (message.serviceUri != null && Object.hasOwnProperty.call(message, "serviceUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.serviceUri); - return writer; - }; - - /** - * Encodes the specified CloudRunRevisionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICloudRunRevisionInfo} message CloudRunRevisionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudRunRevisionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 4: { - message.location = reader.string(); - break; - } - case 5: { - message.serviceUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudRunRevisionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudRunRevisionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudRunRevisionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudRunRevisionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - if (!$util.isString(message.serviceUri)) - return "serviceUri: string expected"; - return null; - }; - - /** - * Creates a CloudRunRevisionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} CloudRunRevisionInfo - */ - CloudRunRevisionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - if (object.serviceUri != null) - message.serviceUri = String(object.serviceUri); - return message; - }; - - /** - * Creates a plain object from a CloudRunRevisionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo} message CloudRunRevisionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudRunRevisionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - object.serviceUri = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.serviceUri != null && message.hasOwnProperty("serviceUri")) - object.serviceUri = message.serviceUri; - return object; - }; - - /** - * Converts this CloudRunRevisionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @instance - * @returns {Object.} JSON object - */ - CloudRunRevisionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudRunRevisionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudRunRevisionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CloudRunRevisionInfo"; - }; - - return CloudRunRevisionInfo; - })(); - - v1beta1.AppEngineVersionInfo = (function() { - - /** - * Properties of an AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IAppEngineVersionInfo - * @property {string|null} [displayName] AppEngineVersionInfo displayName - * @property {string|null} [uri] AppEngineVersionInfo uri - * @property {string|null} [runtime] AppEngineVersionInfo runtime - * @property {string|null} [environment] AppEngineVersionInfo environment - */ - - /** - * Constructs a new AppEngineVersionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an AppEngineVersionInfo. - * @implements IAppEngineVersionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set - */ - function AppEngineVersionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AppEngineVersionInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.displayName = ""; - - /** - * AppEngineVersionInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.uri = ""; - - /** - * AppEngineVersionInfo runtime. - * @member {string} runtime - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.runtime = ""; - - /** - * AppEngineVersionInfo environment. - * @member {string} environment - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - */ - AppEngineVersionInfo.prototype.environment = ""; - - /** - * Creates a new AppEngineVersionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo instance - */ - AppEngineVersionInfo.create = function create(properties) { - return new AppEngineVersionInfo(properties); - }; - - /** - * Encodes the specified AppEngineVersionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.runtime != null && Object.hasOwnProperty.call(message, "runtime")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.runtime); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.environment); - return writer; - }; - - /** - * Encodes the specified AppEngineVersionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IAppEngineVersionInfo} message AppEngineVersionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AppEngineVersionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.runtime = reader.string(); - break; - } - case 4: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AppEngineVersionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AppEngineVersionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AppEngineVersionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AppEngineVersionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.runtime != null && message.hasOwnProperty("runtime")) - if (!$util.isString(message.runtime)) - return "runtime: string expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates an AppEngineVersionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} AppEngineVersionInfo - */ - AppEngineVersionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.runtime != null) - message.runtime = String(object.runtime); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from an AppEngineVersionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo} message AppEngineVersionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AppEngineVersionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.runtime = ""; - object.environment = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.runtime != null && message.hasOwnProperty("runtime")) - object.runtime = message.runtime; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this AppEngineVersionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @instance - * @returns {Object.} JSON object - */ - AppEngineVersionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AppEngineVersionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AppEngineVersionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.AppEngineVersionInfo"; - }; - - return AppEngineVersionInfo; - })(); - - v1beta1.VpcConnectorInfo = (function() { - - /** - * Properties of a VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpcConnectorInfo - * @property {string|null} [displayName] VpcConnectorInfo displayName - * @property {string|null} [uri] VpcConnectorInfo uri - * @property {string|null} [location] VpcConnectorInfo location - */ - - /** - * Constructs a new VpcConnectorInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpcConnectorInfo. - * @implements IVpcConnectorInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set - */ - function VpcConnectorInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VpcConnectorInfo displayName. - * @member {string} displayName - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.displayName = ""; - - /** - * VpcConnectorInfo uri. - * @member {string} uri - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.uri = ""; - - /** - * VpcConnectorInfo location. - * @member {string} location - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - */ - VpcConnectorInfo.prototype.location = ""; - - /** - * Creates a new VpcConnectorInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo instance - */ - VpcConnectorInfo.create = function create(properties) { - return new VpcConnectorInfo(properties); - }; - - /** - * Encodes the specified VpcConnectorInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.location); - return writer; - }; - - /** - * Encodes the specified VpcConnectorInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcConnectorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcConnectorInfo} message VpcConnectorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcConnectorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.uri = reader.string(); - break; - } - case 3: { - message.location = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcConnectorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcConnectorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcConnectorInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcConnectorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.uri != null && message.hasOwnProperty("uri")) - if (!$util.isString(message.uri)) - return "uri: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - return null; - }; - - /** - * Creates a VpcConnectorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} VpcConnectorInfo - */ - VpcConnectorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpcConnectorInfo(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.uri != null) - message.uri = String(object.uri); - if (object.location != null) - message.location = String(object.location); - return message; - }; - - /** - * Creates a plain object from a VpcConnectorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpcConnectorInfo} message VpcConnectorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcConnectorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.uri = ""; - object.location = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.uri != null && message.hasOwnProperty("uri")) - object.uri = message.uri; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - return object; - }; - - /** - * Converts this VpcConnectorInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @instance - * @returns {Object.} JSON object - */ - VpcConnectorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcConnectorInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpcConnectorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcConnectorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcConnectorInfo"; - }; - - return VpcConnectorInfo; - })(); - - v1beta1.NatInfo = (function() { - - /** - * Properties of a NatInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface INatInfo - * @property {google.cloud.networkmanagement.v1beta1.NatInfo.Type|null} [type] NatInfo type - * @property {string|null} [protocol] NatInfo protocol - * @property {string|null} [networkUri] NatInfo networkUri - * @property {string|null} [oldSourceIp] NatInfo oldSourceIp - * @property {string|null} [newSourceIp] NatInfo newSourceIp - * @property {string|null} [oldDestinationIp] NatInfo oldDestinationIp - * @property {string|null} [newDestinationIp] NatInfo newDestinationIp - * @property {number|null} [oldSourcePort] NatInfo oldSourcePort - * @property {number|null} [newSourcePort] NatInfo newSourcePort - * @property {number|null} [oldDestinationPort] NatInfo oldDestinationPort - * @property {number|null} [newDestinationPort] NatInfo newDestinationPort - * @property {string|null} [routerUri] NatInfo routerUri - * @property {string|null} [natGatewayName] NatInfo natGatewayName - */ - - /** - * Constructs a new NatInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a NatInfo. - * @implements INatInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set - */ - function NatInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NatInfo type. - * @member {google.cloud.networkmanagement.v1beta1.NatInfo.Type} type - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.type = 0; - - /** - * NatInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.protocol = ""; - - /** - * NatInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.networkUri = ""; - - /** - * NatInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourceIp = ""; - - /** - * NatInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newSourceIp = ""; - - /** - * NatInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationIp = ""; - - /** - * NatInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationIp = ""; - - /** - * NatInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldSourcePort = 0; - - /** - * NatInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newSourcePort = 0; - - /** - * NatInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.oldDestinationPort = 0; - - /** - * NatInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.newDestinationPort = 0; - - /** - * NatInfo routerUri. - * @member {string} routerUri - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.routerUri = ""; - - /** - * NatInfo natGatewayName. - * @member {string} natGatewayName - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - */ - NatInfo.prototype.natGatewayName = ""; - - /** - * Creates a new NatInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INatInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo instance - */ - NatInfo.create = function create(properties) { - return new NatInfo(properties); - }; - - /** - * Encodes the specified NatInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.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.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.protocol); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.networkUri); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.newDestinationPort); - if (message.routerUri != null && Object.hasOwnProperty.call(message, "routerUri")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.routerUri); - if (message.natGatewayName != null && Object.hasOwnProperty.call(message, "natGatewayName")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.natGatewayName); - return writer; - }; - - /** - * Encodes the specified NatInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.NatInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.INatInfo} message NatInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NatInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.int32(); - break; - } - case 2: { - message.protocol = reader.string(); - break; - } - case 3: { - message.networkUri = reader.string(); - break; - } - case 4: { - message.oldSourceIp = reader.string(); - break; - } - case 5: { - message.newSourceIp = reader.string(); - break; - } - case 6: { - message.oldDestinationIp = reader.string(); - break; - } - case 7: { - message.newDestinationIp = reader.string(); - break; - } - case 8: { - message.oldSourcePort = reader.int32(); - break; - } - case 9: { - message.newSourcePort = reader.int32(); - break; - } - case 10: { - message.oldDestinationPort = reader.int32(); - break; - } - case 11: { - message.newDestinationPort = reader.int32(); - break; - } - case 12: { - message.routerUri = reader.string(); - break; - } - case 13: { - message.natGatewayName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NatInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NatInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NatInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NatInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - if (!$util.isString(message.routerUri)) - return "routerUri: string expected"; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - if (!$util.isString(message.natGatewayName)) - return "natGatewayName: string expected"; - return null; - }; - - /** - * Creates a NatInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.NatInfo} NatInfo - */ - NatInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.NatInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.NatInfo(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "INTERNAL_TO_EXTERNAL": - case 1: - message.type = 1; - break; - case "EXTERNAL_TO_INTERNAL": - case 2: - message.type = 2; - break; - case "CLOUD_NAT": - case 3: - message.type = 3; - break; - case "PRIVATE_SERVICE_CONNECT": - case 4: - message.type = 4; - break; - } - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.routerUri != null) - message.routerUri = String(object.routerUri); - if (object.natGatewayName != null) - message.natGatewayName = String(object.natGatewayName); - return message; - }; - - /** - * Creates a plain object from a NatInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.NatInfo} message NatInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NatInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.protocol = ""; - object.networkUri = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.routerUri = ""; - object.natGatewayName = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] === undefined ? message.type : $root.google.cloud.networkmanagement.v1beta1.NatInfo.Type[message.type] : message.type; - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.routerUri != null && message.hasOwnProperty("routerUri")) - object.routerUri = message.routerUri; - if (message.natGatewayName != null && message.hasOwnProperty("natGatewayName")) - object.natGatewayName = message.natGatewayName; - return object; - }; - - /** - * Converts this NatInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @instance - * @returns {Object.} JSON object - */ - NatInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NatInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.NatInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NatInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.NatInfo"; - }; - - /** - * Type enum. - * @name google.cloud.networkmanagement.v1beta1.NatInfo.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} INTERNAL_TO_EXTERNAL=1 INTERNAL_TO_EXTERNAL value - * @property {number} EXTERNAL_TO_INTERNAL=2 EXTERNAL_TO_INTERNAL value - * @property {number} CLOUD_NAT=3 CLOUD_NAT value - * @property {number} PRIVATE_SERVICE_CONNECT=4 PRIVATE_SERVICE_CONNECT value - */ - NatInfo.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERNAL_TO_EXTERNAL"] = 1; - values[valuesById[2] = "EXTERNAL_TO_INTERNAL"] = 2; - values[valuesById[3] = "CLOUD_NAT"] = 3; - values[valuesById[4] = "PRIVATE_SERVICE_CONNECT"] = 4; - return values; - })(); - - return NatInfo; - })(); - - v1beta1.ProxyConnectionInfo = (function() { - - /** - * Properties of a ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IProxyConnectionInfo - * @property {string|null} [protocol] ProxyConnectionInfo protocol - * @property {string|null} [oldSourceIp] ProxyConnectionInfo oldSourceIp - * @property {string|null} [newSourceIp] ProxyConnectionInfo newSourceIp - * @property {string|null} [oldDestinationIp] ProxyConnectionInfo oldDestinationIp - * @property {string|null} [newDestinationIp] ProxyConnectionInfo newDestinationIp - * @property {number|null} [oldSourcePort] ProxyConnectionInfo oldSourcePort - * @property {number|null} [newSourcePort] ProxyConnectionInfo newSourcePort - * @property {number|null} [oldDestinationPort] ProxyConnectionInfo oldDestinationPort - * @property {number|null} [newDestinationPort] ProxyConnectionInfo newDestinationPort - * @property {string|null} [subnetUri] ProxyConnectionInfo subnetUri - * @property {string|null} [networkUri] ProxyConnectionInfo networkUri - */ - - /** - * Constructs a new ProxyConnectionInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ProxyConnectionInfo. - * @implements IProxyConnectionInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set - */ - function ProxyConnectionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProxyConnectionInfo protocol. - * @member {string} protocol - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.protocol = ""; - - /** - * ProxyConnectionInfo oldSourceIp. - * @member {string} oldSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourceIp = ""; - - /** - * ProxyConnectionInfo newSourceIp. - * @member {string} newSourceIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourceIp = ""; - - /** - * ProxyConnectionInfo oldDestinationIp. - * @member {string} oldDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationIp = ""; - - /** - * ProxyConnectionInfo newDestinationIp. - * @member {string} newDestinationIp - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationIp = ""; - - /** - * ProxyConnectionInfo oldSourcePort. - * @member {number} oldSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldSourcePort = 0; - - /** - * ProxyConnectionInfo newSourcePort. - * @member {number} newSourcePort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newSourcePort = 0; - - /** - * ProxyConnectionInfo oldDestinationPort. - * @member {number} oldDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.oldDestinationPort = 0; - - /** - * ProxyConnectionInfo newDestinationPort. - * @member {number} newDestinationPort - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.newDestinationPort = 0; - - /** - * ProxyConnectionInfo subnetUri. - * @member {string} subnetUri - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.subnetUri = ""; - - /** - * ProxyConnectionInfo networkUri. - * @member {string} networkUri - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - */ - ProxyConnectionInfo.prototype.networkUri = ""; - - /** - * Creates a new ProxyConnectionInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo instance - */ - ProxyConnectionInfo.create = function create(properties) { - return new ProxyConnectionInfo(properties); - }; - - /** - * Encodes the specified ProxyConnectionInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.protocol); - if (message.oldSourceIp != null && Object.hasOwnProperty.call(message, "oldSourceIp")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.oldSourceIp); - if (message.newSourceIp != null && Object.hasOwnProperty.call(message, "newSourceIp")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.newSourceIp); - if (message.oldDestinationIp != null && Object.hasOwnProperty.call(message, "oldDestinationIp")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.oldDestinationIp); - if (message.newDestinationIp != null && Object.hasOwnProperty.call(message, "newDestinationIp")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.newDestinationIp); - if (message.oldSourcePort != null && Object.hasOwnProperty.call(message, "oldSourcePort")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.oldSourcePort); - if (message.newSourcePort != null && Object.hasOwnProperty.call(message, "newSourcePort")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.newSourcePort); - if (message.oldDestinationPort != null && Object.hasOwnProperty.call(message, "oldDestinationPort")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.oldDestinationPort); - if (message.newDestinationPort != null && Object.hasOwnProperty.call(message, "newDestinationPort")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.newDestinationPort); - if (message.subnetUri != null && Object.hasOwnProperty.call(message, "subnetUri")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.subnetUri); - if (message.networkUri != null && Object.hasOwnProperty.call(message, "networkUri")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.networkUri); - return writer; - }; - - /** - * Encodes the specified ProxyConnectionInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IProxyConnectionInfo} message ProxyConnectionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProxyConnectionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.protocol = reader.string(); - break; - } - case 2: { - message.oldSourceIp = reader.string(); - break; - } - case 3: { - message.newSourceIp = reader.string(); - break; - } - case 4: { - message.oldDestinationIp = reader.string(); - break; - } - case 5: { - message.newDestinationIp = reader.string(); - break; - } - case 6: { - message.oldSourcePort = reader.int32(); - break; - } - case 7: { - message.newSourcePort = reader.int32(); - break; - } - case 8: { - message.oldDestinationPort = reader.int32(); - break; - } - case 9: { - message.newDestinationPort = reader.int32(); - break; - } - case 10: { - message.subnetUri = reader.string(); - break; - } - case 11: { - message.networkUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProxyConnectionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProxyConnectionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProxyConnectionInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProxyConnectionInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isString(message.protocol)) - return "protocol: string expected"; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - if (!$util.isString(message.oldSourceIp)) - return "oldSourceIp: string expected"; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - if (!$util.isString(message.newSourceIp)) - return "newSourceIp: string expected"; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - if (!$util.isString(message.oldDestinationIp)) - return "oldDestinationIp: string expected"; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - if (!$util.isString(message.newDestinationIp)) - return "newDestinationIp: string expected"; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - if (!$util.isInteger(message.oldSourcePort)) - return "oldSourcePort: integer expected"; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - if (!$util.isInteger(message.newSourcePort)) - return "newSourcePort: integer expected"; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - if (!$util.isInteger(message.oldDestinationPort)) - return "oldDestinationPort: integer expected"; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - if (!$util.isInteger(message.newDestinationPort)) - return "newDestinationPort: integer expected"; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - if (!$util.isString(message.subnetUri)) - return "subnetUri: string expected"; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - if (!$util.isString(message.networkUri)) - return "networkUri: string expected"; - return null; - }; - - /** - * Creates a ProxyConnectionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} ProxyConnectionInfo - */ - ProxyConnectionInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo(); - if (object.protocol != null) - message.protocol = String(object.protocol); - if (object.oldSourceIp != null) - message.oldSourceIp = String(object.oldSourceIp); - if (object.newSourceIp != null) - message.newSourceIp = String(object.newSourceIp); - if (object.oldDestinationIp != null) - message.oldDestinationIp = String(object.oldDestinationIp); - if (object.newDestinationIp != null) - message.newDestinationIp = String(object.newDestinationIp); - if (object.oldSourcePort != null) - message.oldSourcePort = object.oldSourcePort | 0; - if (object.newSourcePort != null) - message.newSourcePort = object.newSourcePort | 0; - if (object.oldDestinationPort != null) - message.oldDestinationPort = object.oldDestinationPort | 0; - if (object.newDestinationPort != null) - message.newDestinationPort = object.newDestinationPort | 0; - if (object.subnetUri != null) - message.subnetUri = String(object.subnetUri); - if (object.networkUri != null) - message.networkUri = String(object.networkUri); - return message; - }; - - /** - * Creates a plain object from a ProxyConnectionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo} message ProxyConnectionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProxyConnectionInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.protocol = ""; - object.oldSourceIp = ""; - object.newSourceIp = ""; - object.oldDestinationIp = ""; - object.newDestinationIp = ""; - object.oldSourcePort = 0; - object.newSourcePort = 0; - object.oldDestinationPort = 0; - object.newDestinationPort = 0; - object.subnetUri = ""; - object.networkUri = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - object.protocol = message.protocol; - if (message.oldSourceIp != null && message.hasOwnProperty("oldSourceIp")) - object.oldSourceIp = message.oldSourceIp; - if (message.newSourceIp != null && message.hasOwnProperty("newSourceIp")) - object.newSourceIp = message.newSourceIp; - if (message.oldDestinationIp != null && message.hasOwnProperty("oldDestinationIp")) - object.oldDestinationIp = message.oldDestinationIp; - if (message.newDestinationIp != null && message.hasOwnProperty("newDestinationIp")) - object.newDestinationIp = message.newDestinationIp; - if (message.oldSourcePort != null && message.hasOwnProperty("oldSourcePort")) - object.oldSourcePort = message.oldSourcePort; - if (message.newSourcePort != null && message.hasOwnProperty("newSourcePort")) - object.newSourcePort = message.newSourcePort; - if (message.oldDestinationPort != null && message.hasOwnProperty("oldDestinationPort")) - object.oldDestinationPort = message.oldDestinationPort; - if (message.newDestinationPort != null && message.hasOwnProperty("newDestinationPort")) - object.newDestinationPort = message.newDestinationPort; - if (message.subnetUri != null && message.hasOwnProperty("subnetUri")) - object.subnetUri = message.subnetUri; - if (message.networkUri != null && message.hasOwnProperty("networkUri")) - object.networkUri = message.networkUri; - return object; - }; - - /** - * Converts this ProxyConnectionInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @instance - * @returns {Object.} JSON object - */ - ProxyConnectionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ProxyConnectionInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ProxyConnectionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ProxyConnectionInfo"; - }; - - return ProxyConnectionInfo; - })(); - - v1beta1.LoadBalancerBackendInfo = (function() { - - /** - * Properties of a LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ILoadBalancerBackendInfo - * @property {string|null} [name] LoadBalancerBackendInfo name - * @property {string|null} [instanceUri] LoadBalancerBackendInfo instanceUri - * @property {string|null} [backendServiceUri] LoadBalancerBackendInfo backendServiceUri - * @property {string|null} [instanceGroupUri] LoadBalancerBackendInfo instanceGroupUri - * @property {string|null} [networkEndpointGroupUri] LoadBalancerBackendInfo networkEndpointGroupUri - * @property {string|null} [backendBucketUri] LoadBalancerBackendInfo backendBucketUri - * @property {string|null} [pscServiceAttachmentUri] LoadBalancerBackendInfo pscServiceAttachmentUri - * @property {string|null} [pscGoogleApiTarget] LoadBalancerBackendInfo pscGoogleApiTarget - * @property {string|null} [healthCheckUri] LoadBalancerBackendInfo healthCheckUri - * @property {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState|null} [healthCheckFirewallsConfigState] LoadBalancerBackendInfo healthCheckFirewallsConfigState - */ - - /** - * Constructs a new LoadBalancerBackendInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a LoadBalancerBackendInfo. - * @implements ILoadBalancerBackendInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set - */ - function LoadBalancerBackendInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadBalancerBackendInfo name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.name = ""; - - /** - * LoadBalancerBackendInfo instanceUri. - * @member {string} instanceUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceUri = ""; - - /** - * LoadBalancerBackendInfo backendServiceUri. - * @member {string} backendServiceUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendServiceUri = ""; - - /** - * LoadBalancerBackendInfo instanceGroupUri. - * @member {string} instanceGroupUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.instanceGroupUri = ""; - - /** - * LoadBalancerBackendInfo networkEndpointGroupUri. - * @member {string} networkEndpointGroupUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.networkEndpointGroupUri = ""; - - /** - * LoadBalancerBackendInfo backendBucketUri. - * @member {string} backendBucketUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.backendBucketUri = ""; - - /** - * LoadBalancerBackendInfo pscServiceAttachmentUri. - * @member {string} pscServiceAttachmentUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscServiceAttachmentUri = ""; - - /** - * LoadBalancerBackendInfo pscGoogleApiTarget. - * @member {string} pscGoogleApiTarget - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.pscGoogleApiTarget = ""; - - /** - * LoadBalancerBackendInfo healthCheckUri. - * @member {string} healthCheckUri - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckUri = ""; - - /** - * LoadBalancerBackendInfo healthCheckFirewallsConfigState. - * @member {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState} healthCheckFirewallsConfigState - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - */ - LoadBalancerBackendInfo.prototype.healthCheckFirewallsConfigState = 0; - - /** - * Creates a new LoadBalancerBackendInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo instance - */ - LoadBalancerBackendInfo.create = function create(properties) { - return new LoadBalancerBackendInfo(properties); - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.instanceUri != null && Object.hasOwnProperty.call(message, "instanceUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceUri); - if (message.backendServiceUri != null && Object.hasOwnProperty.call(message, "backendServiceUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.backendServiceUri); - if (message.instanceGroupUri != null && Object.hasOwnProperty.call(message, "instanceGroupUri")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.instanceGroupUri); - if (message.networkEndpointGroupUri != null && Object.hasOwnProperty.call(message, "networkEndpointGroupUri")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.networkEndpointGroupUri); - if (message.healthCheckUri != null && Object.hasOwnProperty.call(message, "healthCheckUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.healthCheckUri); - if (message.healthCheckFirewallsConfigState != null && Object.hasOwnProperty.call(message, "healthCheckFirewallsConfigState")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.healthCheckFirewallsConfigState); - if (message.backendBucketUri != null && Object.hasOwnProperty.call(message, "backendBucketUri")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.backendBucketUri); - if (message.pscServiceAttachmentUri != null && Object.hasOwnProperty.call(message, "pscServiceAttachmentUri")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.pscServiceAttachmentUri); - if (message.pscGoogleApiTarget != null && Object.hasOwnProperty.call(message, "pscGoogleApiTarget")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.pscGoogleApiTarget); - return writer; - }; - - /** - * Encodes the specified LoadBalancerBackendInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ILoadBalancerBackendInfo} message LoadBalancerBackendInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadBalancerBackendInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.instanceUri = reader.string(); - break; - } - case 3: { - message.backendServiceUri = reader.string(); - break; - } - case 4: { - message.instanceGroupUri = reader.string(); - break; - } - case 5: { - message.networkEndpointGroupUri = reader.string(); - break; - } - case 8: { - message.backendBucketUri = reader.string(); - break; - } - case 9: { - message.pscServiceAttachmentUri = reader.string(); - break; - } - case 10: { - message.pscGoogleApiTarget = reader.string(); - break; - } - case 6: { - message.healthCheckUri = reader.string(); - break; - } - case 7: { - message.healthCheckFirewallsConfigState = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadBalancerBackendInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadBalancerBackendInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadBalancerBackendInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadBalancerBackendInfo.verify = function verify(message) { - if (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.instanceUri != null && message.hasOwnProperty("instanceUri")) - if (!$util.isString(message.instanceUri)) - return "instanceUri: string expected"; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - if (!$util.isString(message.backendServiceUri)) - return "backendServiceUri: string expected"; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - if (!$util.isString(message.instanceGroupUri)) - return "instanceGroupUri: string expected"; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - if (!$util.isString(message.networkEndpointGroupUri)) - return "networkEndpointGroupUri: string expected"; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - if (!$util.isString(message.backendBucketUri)) - return "backendBucketUri: string expected"; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - if (!$util.isString(message.pscServiceAttachmentUri)) - return "pscServiceAttachmentUri: string expected"; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - if (!$util.isString(message.pscGoogleApiTarget)) - return "pscGoogleApiTarget: string expected"; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - if (!$util.isString(message.healthCheckUri)) - return "healthCheckUri: string expected"; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - switch (message.healthCheckFirewallsConfigState) { - default: - return "healthCheckFirewallsConfigState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a LoadBalancerBackendInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} LoadBalancerBackendInfo - */ - LoadBalancerBackendInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo(); - if (object.name != null) - message.name = String(object.name); - if (object.instanceUri != null) - message.instanceUri = String(object.instanceUri); - if (object.backendServiceUri != null) - message.backendServiceUri = String(object.backendServiceUri); - if (object.instanceGroupUri != null) - message.instanceGroupUri = String(object.instanceGroupUri); - if (object.networkEndpointGroupUri != null) - message.networkEndpointGroupUri = String(object.networkEndpointGroupUri); - if (object.backendBucketUri != null) - message.backendBucketUri = String(object.backendBucketUri); - if (object.pscServiceAttachmentUri != null) - message.pscServiceAttachmentUri = String(object.pscServiceAttachmentUri); - if (object.pscGoogleApiTarget != null) - message.pscGoogleApiTarget = String(object.pscGoogleApiTarget); - if (object.healthCheckUri != null) - message.healthCheckUri = String(object.healthCheckUri); - switch (object.healthCheckFirewallsConfigState) { - default: - if (typeof object.healthCheckFirewallsConfigState === "number") { - message.healthCheckFirewallsConfigState = object.healthCheckFirewallsConfigState; - break; - } - break; - case "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": - case 0: - message.healthCheckFirewallsConfigState = 0; - break; - case "FIREWALLS_CONFIGURED": - case 1: - message.healthCheckFirewallsConfigState = 1; - break; - case "FIREWALLS_PARTIALLY_CONFIGURED": - case 2: - message.healthCheckFirewallsConfigState = 2; - break; - case "FIREWALLS_NOT_CONFIGURED": - case 3: - message.healthCheckFirewallsConfigState = 3; - break; - case "FIREWALLS_UNSUPPORTED": - case 4: - message.healthCheckFirewallsConfigState = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a LoadBalancerBackendInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo} message LoadBalancerBackendInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadBalancerBackendInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.instanceUri = ""; - object.backendServiceUri = ""; - object.instanceGroupUri = ""; - object.networkEndpointGroupUri = ""; - object.healthCheckUri = ""; - object.healthCheckFirewallsConfigState = options.enums === String ? "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED" : 0; - object.backendBucketUri = ""; - object.pscServiceAttachmentUri = ""; - object.pscGoogleApiTarget = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.instanceUri != null && message.hasOwnProperty("instanceUri")) - object.instanceUri = message.instanceUri; - if (message.backendServiceUri != null && message.hasOwnProperty("backendServiceUri")) - object.backendServiceUri = message.backendServiceUri; - if (message.instanceGroupUri != null && message.hasOwnProperty("instanceGroupUri")) - object.instanceGroupUri = message.instanceGroupUri; - if (message.networkEndpointGroupUri != null && message.hasOwnProperty("networkEndpointGroupUri")) - object.networkEndpointGroupUri = message.networkEndpointGroupUri; - if (message.healthCheckUri != null && message.hasOwnProperty("healthCheckUri")) - object.healthCheckUri = message.healthCheckUri; - if (message.healthCheckFirewallsConfigState != null && message.hasOwnProperty("healthCheckFirewallsConfigState")) - object.healthCheckFirewallsConfigState = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] === undefined ? message.healthCheckFirewallsConfigState : $root.google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState[message.healthCheckFirewallsConfigState] : message.healthCheckFirewallsConfigState; - if (message.backendBucketUri != null && message.hasOwnProperty("backendBucketUri")) - object.backendBucketUri = message.backendBucketUri; - if (message.pscServiceAttachmentUri != null && message.hasOwnProperty("pscServiceAttachmentUri")) - object.pscServiceAttachmentUri = message.pscServiceAttachmentUri; - if (message.pscGoogleApiTarget != null && message.hasOwnProperty("pscGoogleApiTarget")) - object.pscGoogleApiTarget = message.pscGoogleApiTarget; - return object; - }; - - /** - * Converts this LoadBalancerBackendInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @instance - * @returns {Object.} JSON object - */ - LoadBalancerBackendInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadBalancerBackendInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadBalancerBackendInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo"; - }; - - /** - * HealthCheckFirewallsConfigState enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerBackendInfo.HealthCheckFirewallsConfigState - * @enum {number} - * @property {number} HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED=0 HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED value - * @property {number} FIREWALLS_CONFIGURED=1 FIREWALLS_CONFIGURED value - * @property {number} FIREWALLS_PARTIALLY_CONFIGURED=2 FIREWALLS_PARTIALLY_CONFIGURED value - * @property {number} FIREWALLS_NOT_CONFIGURED=3 FIREWALLS_NOT_CONFIGURED value - * @property {number} FIREWALLS_UNSUPPORTED=4 FIREWALLS_UNSUPPORTED value - */ - LoadBalancerBackendInfo.HealthCheckFirewallsConfigState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "FIREWALLS_CONFIGURED"] = 1; - values[valuesById[2] = "FIREWALLS_PARTIALLY_CONFIGURED"] = 2; - values[valuesById[3] = "FIREWALLS_NOT_CONFIGURED"] = 3; - values[valuesById[4] = "FIREWALLS_UNSUPPORTED"] = 4; - return values; - })(); - - return LoadBalancerBackendInfo; - })(); - - /** - * LoadBalancerType enum. - * @name google.cloud.networkmanagement.v1beta1.LoadBalancerType - * @enum {number} - * @property {number} LOAD_BALANCER_TYPE_UNSPECIFIED=0 LOAD_BALANCER_TYPE_UNSPECIFIED value - * @property {number} HTTPS_ADVANCED_LOAD_BALANCER=1 HTTPS_ADVANCED_LOAD_BALANCER value - * @property {number} HTTPS_LOAD_BALANCER=2 HTTPS_LOAD_BALANCER value - * @property {number} REGIONAL_HTTPS_LOAD_BALANCER=3 REGIONAL_HTTPS_LOAD_BALANCER value - * @property {number} INTERNAL_HTTPS_LOAD_BALANCER=4 INTERNAL_HTTPS_LOAD_BALANCER value - * @property {number} SSL_PROXY_LOAD_BALANCER=5 SSL_PROXY_LOAD_BALANCER value - * @property {number} TCP_PROXY_LOAD_BALANCER=6 TCP_PROXY_LOAD_BALANCER value - * @property {number} INTERNAL_TCP_PROXY_LOAD_BALANCER=7 INTERNAL_TCP_PROXY_LOAD_BALANCER value - * @property {number} NETWORK_LOAD_BALANCER=8 NETWORK_LOAD_BALANCER value - * @property {number} LEGACY_NETWORK_LOAD_BALANCER=9 LEGACY_NETWORK_LOAD_BALANCER value - * @property {number} TCP_UDP_INTERNAL_LOAD_BALANCER=10 TCP_UDP_INTERNAL_LOAD_BALANCER value - */ - v1beta1.LoadBalancerType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOAD_BALANCER_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HTTPS_ADVANCED_LOAD_BALANCER"] = 1; - values[valuesById[2] = "HTTPS_LOAD_BALANCER"] = 2; - values[valuesById[3] = "REGIONAL_HTTPS_LOAD_BALANCER"] = 3; - values[valuesById[4] = "INTERNAL_HTTPS_LOAD_BALANCER"] = 4; - values[valuesById[5] = "SSL_PROXY_LOAD_BALANCER"] = 5; - values[valuesById[6] = "TCP_PROXY_LOAD_BALANCER"] = 6; - values[valuesById[7] = "INTERNAL_TCP_PROXY_LOAD_BALANCER"] = 7; - values[valuesById[8] = "NETWORK_LOAD_BALANCER"] = 8; - values[valuesById[9] = "LEGACY_NETWORK_LOAD_BALANCER"] = 9; - values[valuesById[10] = "TCP_UDP_INTERNAL_LOAD_BALANCER"] = 10; - return values; - })(); - - v1beta1.StorageBucketInfo = (function() { - - /** - * Properties of a StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IStorageBucketInfo - * @property {string|null} [bucket] StorageBucketInfo bucket - */ - - /** - * Constructs a new StorageBucketInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a StorageBucketInfo. - * @implements IStorageBucketInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set - */ - function StorageBucketInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageBucketInfo bucket. - * @member {string} bucket - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @instance - */ - StorageBucketInfo.prototype.bucket = ""; - - /** - * Creates a new StorageBucketInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo instance - */ - StorageBucketInfo.create = function create(properties) { - return new StorageBucketInfo(properties); - }; - - /** - * Encodes the specified StorageBucketInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - return writer; - }; - - /** - * Encodes the specified StorageBucketInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.StorageBucketInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IStorageBucketInfo} message StorageBucketInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageBucketInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageBucketInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageBucketInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageBucketInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageBucketInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - return null; - }; - - /** - * Creates a StorageBucketInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} StorageBucketInfo - */ - StorageBucketInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.StorageBucketInfo(); - if (object.bucket != null) - message.bucket = String(object.bucket); - return message; - }; - - /** - * Creates a plain object from a StorageBucketInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.StorageBucketInfo} message StorageBucketInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageBucketInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bucket = ""; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - return object; - }; - - /** - * Converts this StorageBucketInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @instance - * @returns {Object.} JSON object - */ - StorageBucketInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageBucketInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.StorageBucketInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageBucketInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.StorageBucketInfo"; - }; - - return StorageBucketInfo; - })(); - - v1beta1.ServerlessNegInfo = (function() { - - /** - * Properties of a ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IServerlessNegInfo - * @property {string|null} [negUri] ServerlessNegInfo negUri - */ - - /** - * Constructs a new ServerlessNegInfo. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ServerlessNegInfo. - * @implements IServerlessNegInfo - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set - */ - function ServerlessNegInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerlessNegInfo negUri. - * @member {string} negUri - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @instance - */ - ServerlessNegInfo.prototype.negUri = ""; - - /** - * Creates a new ServerlessNegInfo instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo instance - */ - ServerlessNegInfo.create = function create(properties) { - return new ServerlessNegInfo(properties); - }; - - /** - * Encodes the specified ServerlessNegInfo message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.negUri != null && Object.hasOwnProperty.call(message, "negUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.negUri); - return writer; - }; - - /** - * Encodes the specified ServerlessNegInfo message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ServerlessNegInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.IServerlessNegInfo} message ServerlessNegInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerlessNegInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.negUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServerlessNegInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServerlessNegInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServerlessNegInfo message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServerlessNegInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.negUri != null && message.hasOwnProperty("negUri")) - if (!$util.isString(message.negUri)) - return "negUri: string expected"; - return null; - }; - - /** - * Creates a ServerlessNegInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} ServerlessNegInfo - */ - ServerlessNegInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ServerlessNegInfo(); - if (object.negUri != null) - message.negUri = String(object.negUri); - return message; - }; - - /** - * Creates a plain object from a ServerlessNegInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {google.cloud.networkmanagement.v1beta1.ServerlessNegInfo} message ServerlessNegInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServerlessNegInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.negUri = ""; - if (message.negUri != null && message.hasOwnProperty("negUri")) - object.negUri = message.negUri; - return object; - }; - - /** - * Converts this ServerlessNegInfo to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @instance - * @returns {Object.} JSON object - */ - ServerlessNegInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServerlessNegInfo - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ServerlessNegInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServerlessNegInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ServerlessNegInfo"; - }; - - return ServerlessNegInfo; - })(); - - v1beta1.ReachabilityService = (function() { - - /** - * Constructs a new ReachabilityService service. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ReachabilityService - * @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 ReachabilityService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ReachabilityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ReachabilityService; - - /** - * Creates new ReachabilityService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @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 {ReachabilityService} RPC service. Useful where requests and/or responses are streamed. - */ - ReachabilityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|listConnectivityTests}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef ListConnectivityTestsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} [response] ListConnectivityTestsResponse - */ - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTestsCallback} callback Node-style callback called with the error, if any, and ListConnectivityTestsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.listConnectivityTests = function listConnectivityTests(request, callback) { - return this.rpcCall(listConnectivityTests, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest, $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse, request, callback); - }, "name", { value: "ListConnectivityTests" }); - - /** - * Calls ListConnectivityTests. - * @function listConnectivityTests - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} request ListConnectivityTestsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|getConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef GetConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} [response] ConnectivityTest - */ - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTestCallback} callback Node-style callback called with the error, if any, and ConnectivityTest - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.getConnectivityTest = function getConnectivityTest(request, callback) { - return this.rpcCall(getConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest, $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest, request, callback); - }, "name", { value: "GetConnectivityTest" }); - - /** - * Calls GetConnectivityTest. - * @function getConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} request GetConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|createConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef CreateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.createConnectivityTest = function createConnectivityTest(request, callback) { - return this.rpcCall(createConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateConnectivityTest" }); - - /** - * Calls CreateConnectivityTest. - * @function createConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} request CreateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|updateConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef UpdateConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.updateConnectivityTest = function updateConnectivityTest(request, callback) { - return this.rpcCall(updateConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateConnectivityTest" }); - - /** - * Calls UpdateConnectivityTest. - * @function updateConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} request UpdateConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|rerunConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef RerunConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.rerunConnectivityTest = function rerunConnectivityTest(request, callback) { - return this.rpcCall(rerunConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RerunConnectivityTest" }); - - /** - * Calls RerunConnectivityTest. - * @function rerunConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} request RerunConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.ReachabilityService|deleteConnectivityTest}. - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @typedef DeleteConnectivityTestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTestCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ReachabilityService.prototype.deleteConnectivityTest = function deleteConnectivityTest(request, callback) { - return this.rpcCall(deleteConnectivityTest, $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteConnectivityTest" }); - - /** - * Calls DeleteConnectivityTest. - * @function deleteConnectivityTest - * @memberof google.cloud.networkmanagement.v1beta1.ReachabilityService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} request DeleteConnectivityTestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ReachabilityService; - })(); - - v1beta1.ListConnectivityTestsRequest = (function() { - - /** - * Properties of a ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListConnectivityTestsRequest - * @property {string|null} [parent] ListConnectivityTestsRequest parent - * @property {number|null} [pageSize] ListConnectivityTestsRequest pageSize - * @property {string|null} [pageToken] ListConnectivityTestsRequest pageToken - * @property {string|null} [filter] ListConnectivityTestsRequest filter - * @property {string|null} [orderBy] ListConnectivityTestsRequest orderBy - */ - - /** - * Constructs a new ListConnectivityTestsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListConnectivityTestsRequest. - * @implements IListConnectivityTestsRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set - */ - function ListConnectivityTestsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListConnectivityTestsRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.parent = ""; - - /** - * ListConnectivityTestsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageSize = 0; - - /** - * ListConnectivityTestsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.pageToken = ""; - - /** - * ListConnectivityTestsRequest filter. - * @member {string} filter - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.filter = ""; - - /** - * ListConnectivityTestsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - */ - ListConnectivityTestsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListConnectivityTestsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest instance - */ - ListConnectivityTestsRequest.create = function create(properties) { - return new ListConnectivityTestsRequest(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest} message ListConnectivityTestsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} ListConnectivityTestsRequest - */ - ListConnectivityTestsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest(); - 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 ListConnectivityTestsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest} message ListConnectivityTestsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsRequest.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 ListConnectivityTestsRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest"; - }; - - return ListConnectivityTestsRequest; - })(); - - v1beta1.ListConnectivityTestsResponse = (function() { - - /** - * Properties of a ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListConnectivityTestsResponse - * @property {Array.|null} [resources] ListConnectivityTestsResponse resources - * @property {string|null} [nextPageToken] ListConnectivityTestsResponse nextPageToken - * @property {Array.|null} [unreachable] ListConnectivityTestsResponse unreachable - */ - - /** - * Constructs a new ListConnectivityTestsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListConnectivityTestsResponse. - * @implements IListConnectivityTestsResponse - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set - */ - function ListConnectivityTestsResponse(properties) { - this.resources = []; - 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]]; - } - - /** - * ListConnectivityTestsResponse resources. - * @member {Array.} resources - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.resources = $util.emptyArray; - - /** - * ListConnectivityTestsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.nextPageToken = ""; - - /** - * ListConnectivityTestsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - */ - ListConnectivityTestsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListConnectivityTestsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse instance - */ - ListConnectivityTestsResponse.create = function create(properties) { - return new ListConnectivityTestsResponse(properties); - }; - - /** - * Encodes the specified ListConnectivityTestsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resources[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 ListConnectivityTestsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse} message ListConnectivityTestsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListConnectivityTestsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListConnectivityTestsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.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 ListConnectivityTestsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListConnectivityTestsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListConnectivityTestsResponse message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListConnectivityTestsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resources[i]); - if (error) - return "resources." + 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 ListConnectivityTestsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} ListConnectivityTestsResponse - */ - ListConnectivityTestsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resources[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse.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 ListConnectivityTestsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse} message ListConnectivityTestsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListConnectivityTestsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resources[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 ListConnectivityTestsResponse to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @instance - * @returns {Object.} JSON object - */ - ListConnectivityTestsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListConnectivityTestsResponse - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListConnectivityTestsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListConnectivityTestsResponse"; - }; - - return ListConnectivityTestsResponse; - })(); - - v1beta1.GetConnectivityTestRequest = (function() { - - /** - * Properties of a GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGetConnectivityTestRequest - * @property {string|null} [name] GetConnectivityTestRequest name - */ - - /** - * Constructs a new GetConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GetConnectivityTestRequest. - * @implements IGetConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set - */ - function GetConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @instance - */ - GetConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new GetConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest instance - */ - GetConnectivityTestRequest.create = function create(properties) { - return new GetConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified GetConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encode = function encode(message, writer) { - 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 GetConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest} message GetConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); - 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 GetConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetConnectivityTestRequest.verify = function verify(message) { - if (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 GetConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} GetConnectivityTestRequest - */ - GetConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest} message GetConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetConnectivityTestRequest.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 GetConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - GetConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest"; - }; - - return GetConnectivityTestRequest; - })(); - - v1beta1.CreateConnectivityTestRequest = (function() { - - /** - * Properties of a CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICreateConnectivityTestRequest - * @property {string|null} [parent] CreateConnectivityTestRequest parent - * @property {string|null} [testId] CreateConnectivityTestRequest testId - * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] CreateConnectivityTestRequest resource - */ - - /** - * Constructs a new CreateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CreateConnectivityTestRequest. - * @implements ICreateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set - */ - function CreateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateConnectivityTestRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.parent = ""; - - /** - * CreateConnectivityTestRequest testId. - * @member {string} testId - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.testId = ""; - - /** - * CreateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - */ - CreateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new CreateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest instance - */ - CreateConnectivityTestRequest.create = function create(properties) { - return new CreateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.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.testId != null && Object.hasOwnProperty.call(message, "testId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.testId); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest} message CreateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.testId = reader.string(); - break; - } - case 3: { - message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateConnectivityTestRequest.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.testId != null && message.hasOwnProperty("testId")) - if (!$util.isString(message.testId)) - return "testId: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates a CreateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} CreateConnectivityTestRequest - */ - CreateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.testId != null) - message.testId = String(object.testId); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from a CreateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest} message CreateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.testId = ""; - object.resource = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.testId != null && message.hasOwnProperty("testId")) - object.testId = message.testId; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this CreateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - CreateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest"; - }; - - return CreateConnectivityTestRequest; - })(); - - v1beta1.UpdateConnectivityTestRequest = (function() { - - /** - * Properties of an UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IUpdateConnectivityTestRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectivityTestRequest updateMask - * @property {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null} [resource] UpdateConnectivityTestRequest resource - */ - - /** - * Constructs a new UpdateConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an UpdateConnectivityTestRequest. - * @implements IUpdateConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set - */ - function UpdateConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateConnectivityTestRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.updateMask = null; - - /** - * UpdateConnectivityTestRequest resource. - * @member {google.cloud.networkmanagement.v1beta1.IConnectivityTest|null|undefined} resource - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @instance - */ - UpdateConnectivityTestRequest.prototype.resource = null; - - /** - * Creates a new UpdateConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest instance - */ - UpdateConnectivityTestRequest.create = function create(properties) { - return new UpdateConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.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.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.encode(message.resource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest} message UpdateConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); - 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.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateConnectivityTestRequest.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.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.verify(message.resource); - if (error) - return "resource." + error; - } - return null; - }; - - /** - * Creates an UpdateConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} UpdateConnectivityTestRequest - */ - UpdateConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest.resource: object expected"); - message.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.fromObject(object.resource); - } - return message; - }; - - /** - * Creates a plain object from an UpdateConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest} message UpdateConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateConnectivityTestRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.resource = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.networkmanagement.v1beta1.ConnectivityTest.toObject(message.resource, options); - return object; - }; - - /** - * Converts this UpdateConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest"; - }; - - return UpdateConnectivityTestRequest; - })(); - - v1beta1.DeleteConnectivityTestRequest = (function() { - - /** - * Properties of a DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDeleteConnectivityTestRequest - * @property {string|null} [name] DeleteConnectivityTestRequest name - */ - - /** - * Constructs a new DeleteConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DeleteConnectivityTestRequest. - * @implements IDeleteConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set - */ - function DeleteConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @instance - */ - DeleteConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new DeleteConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest instance - */ - DeleteConnectivityTestRequest.create = function create(properties) { - return new DeleteConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified DeleteConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encode = function encode(message, writer) { - 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 DeleteConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest} message DeleteConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); - 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 DeleteConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteConnectivityTestRequest.verify = function verify(message) { - if (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 DeleteConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} DeleteConnectivityTestRequest - */ - DeleteConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest} message DeleteConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteConnectivityTestRequest.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 DeleteConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest"; - }; - - return DeleteConnectivityTestRequest; - })(); - - v1beta1.RerunConnectivityTestRequest = (function() { - - /** - * Properties of a RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IRerunConnectivityTestRequest - * @property {string|null} [name] RerunConnectivityTestRequest name - */ - - /** - * Constructs a new RerunConnectivityTestRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a RerunConnectivityTestRequest. - * @implements IRerunConnectivityTestRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set - */ - function RerunConnectivityTestRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RerunConnectivityTestRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @instance - */ - RerunConnectivityTestRequest.prototype.name = ""; - - /** - * Creates a new RerunConnectivityTestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest instance - */ - RerunConnectivityTestRequest.create = function create(properties) { - return new RerunConnectivityTestRequest(properties); - }; - - /** - * Encodes the specified RerunConnectivityTestRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encode = function encode(message, writer) { - 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 RerunConnectivityTestRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest} message RerunConnectivityTestRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RerunConnectivityTestRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RerunConnectivityTestRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); - 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 RerunConnectivityTestRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RerunConnectivityTestRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RerunConnectivityTestRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RerunConnectivityTestRequest.verify = function verify(message) { - if (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 RerunConnectivityTestRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} RerunConnectivityTestRequest - */ - RerunConnectivityTestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RerunConnectivityTestRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest} message RerunConnectivityTestRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RerunConnectivityTestRequest.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 RerunConnectivityTestRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @instance - * @returns {Object.} JSON object - */ - RerunConnectivityTestRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RerunConnectivityTestRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RerunConnectivityTestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest"; - }; - - return RerunConnectivityTestRequest; - })(); - - v1beta1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.networkmanagement.v1beta1 - * @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} [statusDetail] OperationMetadata statusDetail - * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested - * @property {string|null} [apiVersion] OperationMetadata apiVersion - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set - */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.target = ""; - - /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.verb = ""; - - /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusDetail = ""; - - /** - * OperationMetadata cancelRequested. - * @member {boolean} cancelRequested - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.cancelRequested = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.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.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); - if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusDetail = reader.string(); - break; - } - case 6: { - message.cancelRequested = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - 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.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - if (typeof message.cancelRequested !== "boolean") - return "cancelRequested: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: 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.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.OperationMetadata) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.cancelRequested != null) - message.cancelRequested = Boolean(object.cancelRequested); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networkmanagement.v1beta1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusDetail = ""; - object.cancelRequested = 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.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - object.cancelRequested = message.cancelRequested; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.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.networkmanagement.v1beta1.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.networkmanagement.v1beta1.OperationMetadata"; - }; - - return OperationMetadata; - })(); - - v1beta1.VpcFlowLogsService = (function() { - - /** - * Constructs a new VpcFlowLogsService service. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpcFlowLogsService - * @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 VpcFlowLogsService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (VpcFlowLogsService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = VpcFlowLogsService; - - /** - * Creates new VpcFlowLogsService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @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 {VpcFlowLogsService} RPC service. Useful where requests and/or responses are streamed. - */ - VpcFlowLogsService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|listVpcFlowLogsConfigs}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef ListVpcFlowLogsConfigsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} [response] ListVpcFlowLogsConfigsResponse - */ - - /** - * Calls ListVpcFlowLogsConfigs. - * @function listVpcFlowLogsConfigs - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigsCallback} callback Node-style callback called with the error, if any, and ListVpcFlowLogsConfigsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.listVpcFlowLogsConfigs = function listVpcFlowLogsConfigs(request, callback) { - return this.rpcCall(listVpcFlowLogsConfigs, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest, $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse, request, callback); - }, "name", { value: "ListVpcFlowLogsConfigs" }); - - /** - * Calls ListVpcFlowLogsConfigs. - * @function listVpcFlowLogsConfigs - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} request ListVpcFlowLogsConfigsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|getVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef GetVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} [response] VpcFlowLogsConfig - */ - - /** - * Calls GetVpcFlowLogsConfig. - * @function getVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and VpcFlowLogsConfig - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.getVpcFlowLogsConfig = function getVpcFlowLogsConfig(request, callback) { - return this.rpcCall(getVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest, $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig, request, callback); - }, "name", { value: "GetVpcFlowLogsConfig" }); - - /** - * Calls GetVpcFlowLogsConfig. - * @function getVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} request GetVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|createVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef CreateVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateVpcFlowLogsConfig. - * @function createVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.createVpcFlowLogsConfig = function createVpcFlowLogsConfig(request, callback) { - return this.rpcCall(createVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateVpcFlowLogsConfig" }); - - /** - * Calls CreateVpcFlowLogsConfig. - * @function createVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} request CreateVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|updateVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef UpdateVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateVpcFlowLogsConfig. - * @function updateVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.updateVpcFlowLogsConfig = function updateVpcFlowLogsConfig(request, callback) { - return this.rpcCall(updateVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateVpcFlowLogsConfig" }); - - /** - * Calls UpdateVpcFlowLogsConfig. - * @function updateVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} request UpdateVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsService|deleteVpcFlowLogsConfig}. - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @typedef DeleteVpcFlowLogsConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteVpcFlowLogsConfig. - * @function deleteVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(VpcFlowLogsService.prototype.deleteVpcFlowLogsConfig = function deleteVpcFlowLogsConfig(request, callback) { - return this.rpcCall(deleteVpcFlowLogsConfig, $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteVpcFlowLogsConfig" }); - - /** - * Calls DeleteVpcFlowLogsConfig. - * @function deleteVpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsService - * @instance - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} request DeleteVpcFlowLogsConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return VpcFlowLogsService; - })(); - - v1beta1.ListVpcFlowLogsConfigsRequest = (function() { - - /** - * Properties of a ListVpcFlowLogsConfigsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListVpcFlowLogsConfigsRequest - * @property {string|null} [parent] ListVpcFlowLogsConfigsRequest parent - * @property {number|null} [pageSize] ListVpcFlowLogsConfigsRequest pageSize - * @property {string|null} [pageToken] ListVpcFlowLogsConfigsRequest pageToken - * @property {string|null} [filter] ListVpcFlowLogsConfigsRequest filter - * @property {string|null} [orderBy] ListVpcFlowLogsConfigsRequest orderBy - */ - - /** - * Constructs a new ListVpcFlowLogsConfigsRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListVpcFlowLogsConfigsRequest. - * @implements IListVpcFlowLogsConfigsRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set - */ - function ListVpcFlowLogsConfigsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListVpcFlowLogsConfigsRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.parent = ""; - - /** - * ListVpcFlowLogsConfigsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.pageSize = 0; - - /** - * ListVpcFlowLogsConfigsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.pageToken = ""; - - /** - * ListVpcFlowLogsConfigsRequest filter. - * @member {string} filter - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.filter = ""; - - /** - * ListVpcFlowLogsConfigsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - */ - ListVpcFlowLogsConfigsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListVpcFlowLogsConfigsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest instance - */ - ListVpcFlowLogsConfigsRequest.create = function create(properties) { - return new ListVpcFlowLogsConfigsRequest(properties); - }; - - /** - * Encodes the specified ListVpcFlowLogsConfigsRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVpcFlowLogsConfigsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); - 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 ListVpcFlowLogsConfigsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVpcFlowLogsConfigsRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} ListVpcFlowLogsConfigsRequest - */ - ListVpcFlowLogsConfigsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest(); - 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 ListVpcFlowLogsConfigsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest} message ListVpcFlowLogsConfigsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVpcFlowLogsConfigsRequest.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 ListVpcFlowLogsConfigsRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @instance - * @returns {Object.} JSON object - */ - ListVpcFlowLogsConfigsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVpcFlowLogsConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest"; - }; - - return ListVpcFlowLogsConfigsRequest; - })(); - - v1beta1.ListVpcFlowLogsConfigsResponse = (function() { - - /** - * Properties of a ListVpcFlowLogsConfigsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IListVpcFlowLogsConfigsResponse - * @property {Array.|null} [vpcFlowLogsConfigs] ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs - * @property {string|null} [nextPageToken] ListVpcFlowLogsConfigsResponse nextPageToken - * @property {Array.|null} [unreachable] ListVpcFlowLogsConfigsResponse unreachable - */ - - /** - * Constructs a new ListVpcFlowLogsConfigsResponse. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a ListVpcFlowLogsConfigsResponse. - * @implements IListVpcFlowLogsConfigsResponse - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set - */ - function ListVpcFlowLogsConfigsResponse(properties) { - this.vpcFlowLogsConfigs = []; - 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]]; - } - - /** - * ListVpcFlowLogsConfigsResponse vpcFlowLogsConfigs. - * @member {Array.} vpcFlowLogsConfigs - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - */ - ListVpcFlowLogsConfigsResponse.prototype.vpcFlowLogsConfigs = $util.emptyArray; - - /** - * ListVpcFlowLogsConfigsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - */ - ListVpcFlowLogsConfigsResponse.prototype.nextPageToken = ""; - - /** - * ListVpcFlowLogsConfigsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - */ - ListVpcFlowLogsConfigsResponse.prototype.unreachable = $util.emptyArray; - - /** - * Creates a new ListVpcFlowLogsConfigsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse instance - */ - ListVpcFlowLogsConfigsResponse.create = function create(properties) { - return new ListVpcFlowLogsConfigsResponse(properties); - }; - - /** - * Encodes the specified ListVpcFlowLogsConfigsResponse message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.vpcFlowLogsConfigs != null && message.vpcFlowLogsConfigs.length) - for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) - $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListVpcFlowLogsConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListVpcFlowLogsConfigsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length)) - message.vpcFlowLogsConfigs = []; - message.vpcFlowLogsConfigs.push($root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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 ListVpcFlowLogsConfigsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListVpcFlowLogsConfigsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListVpcFlowLogsConfigsResponse message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListVpcFlowLogsConfigsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.vpcFlowLogsConfigs != null && message.hasOwnProperty("vpcFlowLogsConfigs")) { - if (!Array.isArray(message.vpcFlowLogsConfigs)) - return "vpcFlowLogsConfigs: array expected"; - for (var i = 0; i < message.vpcFlowLogsConfigs.length; ++i) { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfigs[i]); - if (error) - return "vpcFlowLogsConfigs." + 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 ListVpcFlowLogsConfigsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} ListVpcFlowLogsConfigsResponse - */ - ListVpcFlowLogsConfigsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse(); - if (object.vpcFlowLogsConfigs) { - if (!Array.isArray(object.vpcFlowLogsConfigs)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: array expected"); - message.vpcFlowLogsConfigs = []; - for (var i = 0; i < object.vpcFlowLogsConfigs.length; ++i) { - if (typeof object.vpcFlowLogsConfigs[i] !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.vpcFlowLogsConfigs: object expected"); - message.vpcFlowLogsConfigs[i] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfigs[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse.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 ListVpcFlowLogsConfigsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse} message ListVpcFlowLogsConfigsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListVpcFlowLogsConfigsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.vpcFlowLogsConfigs = []; - object.unreachable = []; - } - if (options.defaults) - object.nextPageToken = ""; - if (message.vpcFlowLogsConfigs && message.vpcFlowLogsConfigs.length) { - object.vpcFlowLogsConfigs = []; - for (var j = 0; j < message.vpcFlowLogsConfigs.length; ++j) - object.vpcFlowLogsConfigs[j] = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfigs[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 ListVpcFlowLogsConfigsResponse to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @instance - * @returns {Object.} JSON object - */ - ListVpcFlowLogsConfigsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListVpcFlowLogsConfigsResponse - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListVpcFlowLogsConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse"; - }; - - return ListVpcFlowLogsConfigsResponse; - })(); - - v1beta1.GetVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of a GetVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IGetVpcFlowLogsConfigRequest - * @property {string|null} [name] GetVpcFlowLogsConfigRequest name - */ - - /** - * Constructs a new GetVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a GetVpcFlowLogsConfigRequest. - * @implements IGetVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function GetVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetVpcFlowLogsConfigRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @instance - */ - GetVpcFlowLogsConfigRequest.prototype.name = ""; - - /** - * Creates a new GetVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest instance - */ - GetVpcFlowLogsConfigRequest.create = function create(properties) { - return new GetVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified GetVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVpcFlowLogsConfigRequest.encode = function encode(message, writer) { - 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 GetVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); - 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 GetVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetVpcFlowLogsConfigRequest.verify = function verify(message) { - if (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 GetVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} GetVpcFlowLogsConfigRequest - */ - GetVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest} message GetVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetVpcFlowLogsConfigRequest.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 GetVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - GetVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest"; - }; - - return GetVpcFlowLogsConfigRequest; - })(); - - v1beta1.CreateVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of a CreateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface ICreateVpcFlowLogsConfigRequest - * @property {string|null} [parent] CreateVpcFlowLogsConfigRequest parent - * @property {string|null} [vpcFlowLogsConfigId] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId - * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig - */ - - /** - * Constructs a new CreateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a CreateVpcFlowLogsConfigRequest. - * @implements ICreateVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function CreateVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateVpcFlowLogsConfigRequest parent. - * @member {string} parent - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - */ - CreateVpcFlowLogsConfigRequest.prototype.parent = ""; - - /** - * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfigId. - * @member {string} vpcFlowLogsConfigId - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - */ - CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfigId = ""; - - /** - * CreateVpcFlowLogsConfigRequest vpcFlowLogsConfig. - * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - */ - CreateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; - - /** - * Creates a new CreateVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest instance - */ - CreateVpcFlowLogsConfigRequest.create = function create(properties) { - return new CreateVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfigId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.vpcFlowLogsConfigId); - if (message.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) - $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.vpcFlowLogsConfigId = reader.string(); - break; - } - case 3: { - message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) - if (!$util.isString(message.vpcFlowLogsConfigId)) - return "vpcFlowLogsConfigId: string expected"; - if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); - if (error) - return "vpcFlowLogsConfig." + error; - } - return null; - }; - - /** - * Creates a CreateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} CreateVpcFlowLogsConfigRequest - */ - CreateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.vpcFlowLogsConfigId != null) - message.vpcFlowLogsConfigId = String(object.vpcFlowLogsConfigId); - if (object.vpcFlowLogsConfig != null) { - if (typeof object.vpcFlowLogsConfig !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); - message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); - } - return message; - }; - - /** - * Creates a plain object from a CreateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest} message CreateVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.vpcFlowLogsConfigId = ""; - object.vpcFlowLogsConfig = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.vpcFlowLogsConfigId != null && message.hasOwnProperty("vpcFlowLogsConfigId")) - object.vpcFlowLogsConfigId = message.vpcFlowLogsConfigId; - if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) - object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); - return object; - }; - - /** - * Converts this CreateVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - CreateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest"; - }; - - return CreateVpcFlowLogsConfigRequest; - })(); - - v1beta1.UpdateVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of an UpdateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IUpdateVpcFlowLogsConfigRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateVpcFlowLogsConfigRequest updateMask - * @property {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null} [vpcFlowLogsConfig] UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig - */ - - /** - * Constructs a new UpdateVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents an UpdateVpcFlowLogsConfigRequest. - * @implements IUpdateVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function UpdateVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateVpcFlowLogsConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @instance - */ - UpdateVpcFlowLogsConfigRequest.prototype.updateMask = null; - - /** - * UpdateVpcFlowLogsConfigRequest vpcFlowLogsConfig. - * @member {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null|undefined} vpcFlowLogsConfig - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @instance - */ - UpdateVpcFlowLogsConfigRequest.prototype.vpcFlowLogsConfig = null; - - /** - * Creates a new UpdateVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest instance - */ - UpdateVpcFlowLogsConfigRequest.create = function create(properties) { - return new UpdateVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && Object.hasOwnProperty.call(message, "vpcFlowLogsConfig")) - $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.encode(message.vpcFlowLogsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); - 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.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateVpcFlowLogsConfigRequest.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.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) { - var error = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify(message.vpcFlowLogsConfig); - if (error) - return "vpcFlowLogsConfig." + error; - } - return null; - }; - - /** - * Creates an UpdateVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} UpdateVpcFlowLogsConfigRequest - */ - UpdateVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.vpcFlowLogsConfig != null) { - if (typeof object.vpcFlowLogsConfig !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest.vpcFlowLogsConfig: object expected"); - message.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.fromObject(object.vpcFlowLogsConfig); - } - return message; - }; - - /** - * Creates a plain object from an UpdateVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest} message UpdateVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateVpcFlowLogsConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.vpcFlowLogsConfig = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.vpcFlowLogsConfig != null && message.hasOwnProperty("vpcFlowLogsConfig")) - object.vpcFlowLogsConfig = $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.toObject(message.vpcFlowLogsConfig, options); - return object; - }; - - /** - * Converts this UpdateVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest"; - }; - - return UpdateVpcFlowLogsConfigRequest; - })(); - - v1beta1.DeleteVpcFlowLogsConfigRequest = (function() { - - /** - * Properties of a DeleteVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IDeleteVpcFlowLogsConfigRequest - * @property {string|null} [name] DeleteVpcFlowLogsConfigRequest name - */ - - /** - * Constructs a new DeleteVpcFlowLogsConfigRequest. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a DeleteVpcFlowLogsConfigRequest. - * @implements IDeleteVpcFlowLogsConfigRequest - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set - */ - function DeleteVpcFlowLogsConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteVpcFlowLogsConfigRequest name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @instance - */ - DeleteVpcFlowLogsConfigRequest.prototype.name = ""; - - /** - * Creates a new DeleteVpcFlowLogsConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest instance - */ - DeleteVpcFlowLogsConfigRequest.create = function create(properties) { - return new DeleteVpcFlowLogsConfigRequest(properties); - }; - - /** - * Encodes the specified DeleteVpcFlowLogsConfigRequest message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVpcFlowLogsConfigRequest.encode = function encode(message, writer) { - 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 DeleteVpcFlowLogsConfigRequest message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteVpcFlowLogsConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVpcFlowLogsConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); - 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 DeleteVpcFlowLogsConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteVpcFlowLogsConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteVpcFlowLogsConfigRequest message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteVpcFlowLogsConfigRequest.verify = function verify(message) { - if (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 DeleteVpcFlowLogsConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} DeleteVpcFlowLogsConfigRequest - */ - DeleteVpcFlowLogsConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteVpcFlowLogsConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest} message DeleteVpcFlowLogsConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteVpcFlowLogsConfigRequest.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 DeleteVpcFlowLogsConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteVpcFlowLogsConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteVpcFlowLogsConfigRequest - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteVpcFlowLogsConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest"; - }; - - return DeleteVpcFlowLogsConfigRequest; - })(); - - v1beta1.VpcFlowLogsConfig = (function() { - - /** - * Properties of a VpcFlowLogsConfig. - * @memberof google.cloud.networkmanagement.v1beta1 - * @interface IVpcFlowLogsConfig - * @property {string|null} [name] VpcFlowLogsConfig name - * @property {string|null} [description] VpcFlowLogsConfig description - * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null} [state] VpcFlowLogsConfig state - * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null} [aggregationInterval] VpcFlowLogsConfig aggregationInterval - * @property {number|null} [flowSampling] VpcFlowLogsConfig flowSampling - * @property {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null} [metadata] VpcFlowLogsConfig metadata - * @property {Array.|null} [metadataFields] VpcFlowLogsConfig metadataFields - * @property {string|null} [filterExpr] VpcFlowLogsConfig filterExpr - * @property {string|null} [interconnectAttachment] VpcFlowLogsConfig interconnectAttachment - * @property {string|null} [vpnTunnel] VpcFlowLogsConfig vpnTunnel - * @property {Object.|null} [labels] VpcFlowLogsConfig labels - * @property {google.protobuf.ITimestamp|null} [createTime] VpcFlowLogsConfig createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] VpcFlowLogsConfig updateTime - */ - - /** - * Constructs a new VpcFlowLogsConfig. - * @memberof google.cloud.networkmanagement.v1beta1 - * @classdesc Represents a VpcFlowLogsConfig. - * @implements IVpcFlowLogsConfig - * @constructor - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set - */ - function VpcFlowLogsConfig(properties) { - this.metadataFields = []; - 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]]; - } - - /** - * VpcFlowLogsConfig name. - * @member {string} name - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.name = ""; - - /** - * VpcFlowLogsConfig description. - * @member {string|null|undefined} description - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.description = null; - - /** - * VpcFlowLogsConfig state. - * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State|null|undefined} state - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.state = null; - - /** - * VpcFlowLogsConfig aggregationInterval. - * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval|null|undefined} aggregationInterval - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.aggregationInterval = null; - - /** - * VpcFlowLogsConfig flowSampling. - * @member {number|null|undefined} flowSampling - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.flowSampling = null; - - /** - * VpcFlowLogsConfig metadata. - * @member {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata|null|undefined} metadata - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.metadata = null; - - /** - * VpcFlowLogsConfig metadataFields. - * @member {Array.} metadataFields - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.metadataFields = $util.emptyArray; - - /** - * VpcFlowLogsConfig filterExpr. - * @member {string|null|undefined} filterExpr - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.filterExpr = null; - - /** - * VpcFlowLogsConfig interconnectAttachment. - * @member {string|null|undefined} interconnectAttachment - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.interconnectAttachment = null; - - /** - * VpcFlowLogsConfig vpnTunnel. - * @member {string|null|undefined} vpnTunnel - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.vpnTunnel = null; - - /** - * VpcFlowLogsConfig labels. - * @member {Object.} labels - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.labels = $util.emptyObject; - - /** - * VpcFlowLogsConfig createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.createTime = null; - - /** - * VpcFlowLogsConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - VpcFlowLogsConfig.prototype.updateTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * VpcFlowLogsConfig _description. - * @member {"description"|undefined} _description - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_description", { - get: $util.oneOfGetter($oneOfFields = ["description"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _state. - * @member {"state"|undefined} _state - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_state", { - get: $util.oneOfGetter($oneOfFields = ["state"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _aggregationInterval. - * @member {"aggregationInterval"|undefined} _aggregationInterval - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_aggregationInterval", { - get: $util.oneOfGetter($oneOfFields = ["aggregationInterval"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _flowSampling. - * @member {"flowSampling"|undefined} _flowSampling - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_flowSampling", { - get: $util.oneOfGetter($oneOfFields = ["flowSampling"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _metadata. - * @member {"metadata"|undefined} _metadata - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_metadata", { - get: $util.oneOfGetter($oneOfFields = ["metadata"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig _filterExpr. - * @member {"filterExpr"|undefined} _filterExpr - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "_filterExpr", { - get: $util.oneOfGetter($oneOfFields = ["filterExpr"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * VpcFlowLogsConfig targetResource. - * @member {"interconnectAttachment"|"vpnTunnel"|undefined} targetResource - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - */ - Object.defineProperty(VpcFlowLogsConfig.prototype, "targetResource", { - get: $util.oneOfGetter($oneOfFields = ["interconnectAttachment", "vpnTunnel"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new VpcFlowLogsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig=} [properties] Properties to set - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig instance - */ - VpcFlowLogsConfig.create = function create(properties) { - return new VpcFlowLogsConfig(properties); - }; - - /** - * Encodes the specified VpcFlowLogsConfig message. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcFlowLogsConfig.encode = function encode(message, writer) { - if (!writer) - 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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.aggregationInterval != null && Object.hasOwnProperty.call(message, "aggregationInterval")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aggregationInterval); - if (message.flowSampling != null && Object.hasOwnProperty.call(message, "flowSampling")) - writer.uint32(/* id 5, wireType 5 =*/45).float(message.flowSampling); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.metadata); - if (message.metadataFields != null && message.metadataFields.length) - for (var i = 0; i < message.metadataFields.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.metadataFields[i]); - if (message.filterExpr != null && Object.hasOwnProperty.call(message, "filterExpr")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.filterExpr); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).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 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.interconnectAttachment != null && Object.hasOwnProperty.call(message, "interconnectAttachment")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.interconnectAttachment); - if (message.vpnTunnel != null && Object.hasOwnProperty.call(message, "vpnTunnel")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.vpnTunnel); - return writer; - }; - - /** - * Encodes the specified VpcFlowLogsConfig message, length delimited. Does not implicitly {@link google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig} message VpcFlowLogsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VpcFlowLogsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcFlowLogsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(), 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.state = reader.int32(); - break; - } - case 4: { - message.aggregationInterval = reader.int32(); - break; - } - case 5: { - message.flowSampling = reader.float(); - break; - } - case 6: { - message.metadata = reader.int32(); - break; - } - case 7: { - if (!(message.metadataFields && message.metadataFields.length)) - message.metadataFields = []; - message.metadataFields.push(reader.string()); - break; - } - case 8: { - message.filterExpr = reader.string(); - break; - } - case 102: { - message.interconnectAttachment = reader.string(); - break; - } - case 103: { - message.vpnTunnel = reader.string(); - break; - } - case 11: { - 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 9: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VpcFlowLogsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VpcFlowLogsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VpcFlowLogsConfig message. - * @function verify - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VpcFlowLogsConfig.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.state != null && message.hasOwnProperty("state")) { - properties._state = 1; - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { - properties._aggregationInterval = 1; - switch (message.aggregationInterval) { - default: - return "aggregationInterval: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - } - if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { - properties._flowSampling = 1; - if (typeof message.flowSampling !== "number") - return "flowSampling: number expected"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - properties._metadata = 1; - switch (message.metadata) { - default: - return "metadata: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.metadataFields != null && message.hasOwnProperty("metadataFields")) { - if (!Array.isArray(message.metadataFields)) - return "metadataFields: array expected"; - for (var i = 0; i < message.metadataFields.length; ++i) - if (!$util.isString(message.metadataFields[i])) - return "metadataFields: string[] expected"; - } - if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { - properties._filterExpr = 1; - if (!$util.isString(message.filterExpr)) - return "filterExpr: string expected"; - } - if (message.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { - properties.targetResource = 1; - if (!$util.isString(message.interconnectAttachment)) - return "interconnectAttachment: string expected"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - if (properties.targetResource === 1) - return "targetResource: multiple values"; - properties.targetResource = 1; - if (!$util.isString(message.vpnTunnel)) - return "vpnTunnel: 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; - } - return null; - }; - - /** - * Creates a VpcFlowLogsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} VpcFlowLogsConfig - */ - VpcFlowLogsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) - return object; - var message = new $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ENABLED": - case 1: - message.state = 1; - break; - case "DISABLED": - case 2: - message.state = 2; - break; - } - switch (object.aggregationInterval) { - default: - if (typeof object.aggregationInterval === "number") { - message.aggregationInterval = object.aggregationInterval; - break; - } - break; - case "AGGREGATION_INTERVAL_UNSPECIFIED": - case 0: - message.aggregationInterval = 0; - break; - case "INTERVAL_5_SEC": - case 1: - message.aggregationInterval = 1; - break; - case "INTERVAL_30_SEC": - case 2: - message.aggregationInterval = 2; - break; - case "INTERVAL_1_MIN": - case 3: - message.aggregationInterval = 3; - break; - case "INTERVAL_5_MIN": - case 4: - message.aggregationInterval = 4; - break; - case "INTERVAL_10_MIN": - case 5: - message.aggregationInterval = 5; - break; - case "INTERVAL_15_MIN": - case 6: - message.aggregationInterval = 6; - break; - } - if (object.flowSampling != null) - message.flowSampling = Number(object.flowSampling); - switch (object.metadata) { - default: - if (typeof object.metadata === "number") { - message.metadata = object.metadata; - break; - } - break; - case "METADATA_UNSPECIFIED": - case 0: - message.metadata = 0; - break; - case "INCLUDE_ALL_METADATA": - case 1: - message.metadata = 1; - break; - case "EXCLUDE_ALL_METADATA": - case 2: - message.metadata = 2; - break; - case "CUSTOM_METADATA": - case 3: - message.metadata = 3; - break; - } - if (object.metadataFields) { - if (!Array.isArray(object.metadataFields)) - throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.metadataFields: array expected"); - message.metadataFields = []; - for (var i = 0; i < object.metadataFields.length; ++i) - message.metadataFields[i] = String(object.metadataFields[i]); - } - if (object.filterExpr != null) - message.filterExpr = String(object.filterExpr); - if (object.interconnectAttachment != null) - message.interconnectAttachment = String(object.interconnectAttachment); - if (object.vpnTunnel != null) - message.vpnTunnel = String(object.vpnTunnel); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.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.networkmanagement.v1beta1.VpcFlowLogsConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a VpcFlowLogsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} message VpcFlowLogsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VpcFlowLogsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.metadataFields = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - } - 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.state != null && message.hasOwnProperty("state")) { - object.state = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] === undefined ? message.state : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State[message.state] : message.state; - if (options.oneofs) - object._state = "state"; - } - if (message.aggregationInterval != null && message.hasOwnProperty("aggregationInterval")) { - object.aggregationInterval = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] === undefined ? message.aggregationInterval : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval[message.aggregationInterval] : message.aggregationInterval; - if (options.oneofs) - object._aggregationInterval = "aggregationInterval"; - } - if (message.flowSampling != null && message.hasOwnProperty("flowSampling")) { - object.flowSampling = options.json && !isFinite(message.flowSampling) ? String(message.flowSampling) : message.flowSampling; - if (options.oneofs) - object._flowSampling = "flowSampling"; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - object.metadata = options.enums === String ? $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] === undefined ? message.metadata : $root.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata[message.metadata] : message.metadata; - if (options.oneofs) - object._metadata = "metadata"; - } - if (message.metadataFields && message.metadataFields.length) { - object.metadataFields = []; - for (var j = 0; j < message.metadataFields.length; ++j) - object.metadataFields[j] = message.metadataFields[j]; - } - if (message.filterExpr != null && message.hasOwnProperty("filterExpr")) { - object.filterExpr = message.filterExpr; - if (options.oneofs) - object._filterExpr = "filterExpr"; - } - 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.interconnectAttachment != null && message.hasOwnProperty("interconnectAttachment")) { - object.interconnectAttachment = message.interconnectAttachment; - if (options.oneofs) - object.targetResource = "interconnectAttachment"; - } - if (message.vpnTunnel != null && message.hasOwnProperty("vpnTunnel")) { - object.vpnTunnel = message.vpnTunnel; - if (options.oneofs) - object.targetResource = "vpnTunnel"; - } - return object; - }; - - /** - * Converts this VpcFlowLogsConfig to JSON. - * @function toJSON - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @instance - * @returns {Object.} JSON object - */ - VpcFlowLogsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VpcFlowLogsConfig - * @function getTypeUrl - * @memberof google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VpcFlowLogsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig"; - }; - - /** - * State enum. - * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - */ - VpcFlowLogsConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - return values; - })(); - - /** - * AggregationInterval enum. - * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.AggregationInterval - * @enum {number} - * @property {number} AGGREGATION_INTERVAL_UNSPECIFIED=0 AGGREGATION_INTERVAL_UNSPECIFIED value - * @property {number} INTERVAL_5_SEC=1 INTERVAL_5_SEC value - * @property {number} INTERVAL_30_SEC=2 INTERVAL_30_SEC value - * @property {number} INTERVAL_1_MIN=3 INTERVAL_1_MIN value - * @property {number} INTERVAL_5_MIN=4 INTERVAL_5_MIN value - * @property {number} INTERVAL_10_MIN=5 INTERVAL_10_MIN value - * @property {number} INTERVAL_15_MIN=6 INTERVAL_15_MIN value - */ - VpcFlowLogsConfig.AggregationInterval = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "AGGREGATION_INTERVAL_UNSPECIFIED"] = 0; - values[valuesById[1] = "INTERVAL_5_SEC"] = 1; - values[valuesById[2] = "INTERVAL_30_SEC"] = 2; - values[valuesById[3] = "INTERVAL_1_MIN"] = 3; - values[valuesById[4] = "INTERVAL_5_MIN"] = 4; - values[valuesById[5] = "INTERVAL_10_MIN"] = 5; - values[valuesById[6] = "INTERVAL_15_MIN"] = 6; - return values; - })(); - - /** - * Metadata enum. - * @name google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig.Metadata - * @enum {number} - * @property {number} METADATA_UNSPECIFIED=0 METADATA_UNSPECIFIED value - * @property {number} INCLUDE_ALL_METADATA=1 INCLUDE_ALL_METADATA value - * @property {number} EXCLUDE_ALL_METADATA=2 EXCLUDE_ALL_METADATA value - * @property {number} CUSTOM_METADATA=3 CUSTOM_METADATA value - */ - VpcFlowLogsConfig.Metadata = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METADATA_UNSPECIFIED"] = 0; - values[valuesById[1] = "INCLUDE_ALL_METADATA"] = 1; - values[valuesById[2] = "EXCLUDE_ALL_METADATA"] = 2; - values[valuesById[3] = "CUSTOM_METADATA"] = 3; - return values; - })(); - - return VpcFlowLogsConfig; - })(); - - return v1beta1; - })(); - - return networkmanagement; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - 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; - })(); - - 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.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; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * FieldOptions .google.api.fieldInfo. - * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldInfo"] = 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 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - case 291403980: { - message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - 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; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - 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"]); - } - 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.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.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.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - google.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-networkmanagement/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json deleted file mode 100644 index d0087788008..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/protos/protos.json +++ /dev/null @@ -1,4682 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "networkmanagement": { - "nested": { - "v1beta1": { - "options": { - "csharp_namespace": "Google.Cloud.NetworkManagement.V1Beta1", - "go_package": "cloud.google.com/go/networkmanagement/apiv1beta1/networkmanagementpb;networkmanagementpb", - "java_multiple_files": true, - "java_outer_classname": "VpcFlowLogsConfigProto", - "java_package": "com.google.cloud.networkmanagement.v1beta1", - "php_namespace": "Google\\Cloud\\NetworkManagement\\V1beta1", - "ruby_package": "Google::Cloud::NetworkManagement::V1beta1" - }, - "nested": { - "ConnectivityTest": { - "options": { - "(google.api.resource).type": "networkmanagement.googleapis.com/ConnectivityTest", - "(google.api.resource).pattern": "projects/{project}/locations/global/connectivityTests/{test}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "description": { - "type": "string", - "id": 2 - }, - "source": { - "type": "Endpoint", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "destination": { - "type": "Endpoint", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "protocol": { - "type": "string", - "id": 5 - }, - "relatedProjects": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 8 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "reachabilityDetails": { - "type": "ReachabilityDetails", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "probingDetails": { - "type": "ProbingDetails", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "bypassFirewallChecks": { - "type": "bool", - "id": 17 - } - } - }, - "Endpoint": { - "oneofs": { - "_forwardingRuleTarget": { - "oneof": [ - "forwardingRuleTarget" - ] - }, - "_loadBalancerId": { - "oneof": [ - "loadBalancerId" - ] - }, - "_loadBalancerType": { - "oneof": [ - "loadBalancerType" - ] - } - }, - "fields": { - "ipAddress": { - "type": "string", - "id": 1 - }, - "port": { - "type": "int32", - "id": 2 - }, - "instance": { - "type": "string", - "id": 3 - }, - "forwardingRule": { - "type": "string", - "id": 13 - }, - "forwardingRuleTarget": { - "type": "ForwardingRuleTarget", - "id": 14, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerId": { - "type": "string", - "id": 15, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 16, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "gkeMasterCluster": { - "type": "string", - "id": 7 - }, - "fqdn": { - "type": "string", - "id": 19 - }, - "cloudSqlInstance": { - "type": "string", - "id": 8 - }, - "redisInstance": { - "type": "string", - "id": 17 - }, - "redisCluster": { - "type": "string", - "id": 18 - }, - "cloudFunction": { - "type": "CloudFunctionEndpoint", - "id": 10 - }, - "appEngineVersion": { - "type": "AppEngineVersionEndpoint", - "id": 11 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionEndpoint", - "id": 12 - }, - "network": { - "type": "string", - "id": 4 - }, - "networkType": { - "type": "NetworkType", - "id": 5 - }, - "projectId": { - "type": "string", - "id": 6 - } - }, - "nested": { - "NetworkType": { - "values": { - "NETWORK_TYPE_UNSPECIFIED": 0, - "GCP_NETWORK": 1, - "NON_GCP_NETWORK": 2 - } - }, - "ForwardingRuleTarget": { - "values": { - "FORWARDING_RULE_TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "LOAD_BALANCER": 2, - "VPN_GATEWAY": 3, - "PSC": 4 - } - }, - "CloudFunctionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "AppEngineVersionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - }, - "CloudRunRevisionEndpoint": { - "fields": { - "uri": { - "type": "string", - "id": 1 - } - } - } - } - }, - "ReachabilityDetails": { - "fields": { - "result": { - "type": "Result", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "traces": { - "rule": "repeated", - "type": "Trace", - "id": 5 - } - }, - "nested": { - "Result": { - "values": { - "RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "AMBIGUOUS": 4, - "UNDETERMINED": 5 - } - } - } - }, - "LatencyPercentile": { - "fields": { - "percent": { - "type": "int32", - "id": 1 - }, - "latencyMicros": { - "type": "int64", - "id": 2 - } - } - }, - "LatencyDistribution": { - "fields": { - "latencyPercentiles": { - "rule": "repeated", - "type": "LatencyPercentile", - "id": 1 - } - } - }, - "ProbingDetails": { - "fields": { - "result": { - "type": "ProbingResult", - "id": 1 - }, - "verifyTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "error": { - "type": "google.rpc.Status", - "id": 3 - }, - "abortCause": { - "type": "ProbingAbortCause", - "id": 4 - }, - "sentProbeCount": { - "type": "int32", - "id": 5 - }, - "successfulProbeCount": { - "type": "int32", - "id": 6 - }, - "endpointInfo": { - "type": "EndpointInfo", - "id": 7 - }, - "probingLatency": { - "type": "LatencyDistribution", - "id": 8 - }, - "destinationEgressLocation": { - "type": "EdgeLocation", - "id": 9 - } - }, - "nested": { - "ProbingResult": { - "values": { - "PROBING_RESULT_UNSPECIFIED": 0, - "REACHABLE": 1, - "UNREACHABLE": 2, - "REACHABILITY_INCONSISTENT": 3, - "UNDETERMINED": 4 - } - }, - "ProbingAbortCause": { - "values": { - "PROBING_ABORT_CAUSE_UNSPECIFIED": 0, - "PERMISSION_DENIED": 1, - "NO_SOURCE_LOCATION": 2 - } - }, - "EdgeLocation": { - "fields": { - "metropolitanArea": { - "type": "string", - "id": 1 - } - } - } - } - }, - "Trace": { - "fields": { - "endpointInfo": { - "type": "EndpointInfo", - "id": 1 - }, - "steps": { - "rule": "repeated", - "type": "Step", - "id": 2 - }, - "forwardTraceId": { - "type": "int32", - "id": 4 - } - } - }, - "Step": { - "oneofs": { - "stepInfo": { - "oneof": [ - "instance", - "firewall", - "route", - "endpoint", - "googleService", - "forwardingRule", - "vpnGateway", - "vpnTunnel", - "vpcConnector", - "deliver", - "forward", - "abort", - "drop", - "loadBalancer", - "network", - "gkeMaster", - "cloudSqlInstance", - "redisInstance", - "redisCluster", - "cloudFunction", - "appEngineVersion", - "cloudRunRevision", - "nat", - "proxyConnection", - "loadBalancerBackendInfo", - "storageBucket", - "serverlessNeg" - ] - } - }, - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - }, - "causesDrop": { - "type": "bool", - "id": 3 - }, - "projectId": { - "type": "string", - "id": 4 - }, - "instance": { - "type": "InstanceInfo", - "id": 5 - }, - "firewall": { - "type": "FirewallInfo", - "id": 6 - }, - "route": { - "type": "RouteInfo", - "id": 7 - }, - "endpoint": { - "type": "EndpointInfo", - "id": 8 - }, - "googleService": { - "type": "GoogleServiceInfo", - "id": 24 - }, - "forwardingRule": { - "type": "ForwardingRuleInfo", - "id": 9 - }, - "vpnGateway": { - "type": "VpnGatewayInfo", - "id": 10 - }, - "vpnTunnel": { - "type": "VpnTunnelInfo", - "id": 11 - }, - "vpcConnector": { - "type": "VpcConnectorInfo", - "id": 21 - }, - "deliver": { - "type": "DeliverInfo", - "id": 12 - }, - "forward": { - "type": "ForwardInfo", - "id": 13 - }, - "abort": { - "type": "AbortInfo", - "id": 14 - }, - "drop": { - "type": "DropInfo", - "id": 15 - }, - "loadBalancer": { - "type": "LoadBalancerInfo", - "id": 16, - "options": { - "deprecated": true - } - }, - "network": { - "type": "NetworkInfo", - "id": 17 - }, - "gkeMaster": { - "type": "GKEMasterInfo", - "id": 18 - }, - "cloudSqlInstance": { - "type": "CloudSQLInstanceInfo", - "id": 19 - }, - "redisInstance": { - "type": "RedisInstanceInfo", - "id": 30 - }, - "redisCluster": { - "type": "RedisClusterInfo", - "id": 31 - }, - "cloudFunction": { - "type": "CloudFunctionInfo", - "id": 20 - }, - "appEngineVersion": { - "type": "AppEngineVersionInfo", - "id": 22 - }, - "cloudRunRevision": { - "type": "CloudRunRevisionInfo", - "id": 23 - }, - "nat": { - "type": "NatInfo", - "id": 25 - }, - "proxyConnection": { - "type": "ProxyConnectionInfo", - "id": 26 - }, - "loadBalancerBackendInfo": { - "type": "LoadBalancerBackendInfo", - "id": 27 - }, - "storageBucket": { - "type": "StorageBucketInfo", - "id": 28 - }, - "serverlessNeg": { - "type": "ServerlessNegInfo", - "id": 29 - } - }, - "nested": { - "State": { - "valuesOptions": { - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": { - "deprecated": true - }, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": { - "deprecated": true - } - }, - "values": { - "STATE_UNSPECIFIED": 0, - "START_FROM_INSTANCE": 1, - "START_FROM_INTERNET": 2, - "START_FROM_GOOGLE_SERVICE": 27, - "START_FROM_PRIVATE_NETWORK": 3, - "START_FROM_GKE_MASTER": 21, - "START_FROM_CLOUD_SQL_INSTANCE": 22, - "START_FROM_REDIS_INSTANCE": 32, - "START_FROM_REDIS_CLUSTER": 33, - "START_FROM_CLOUD_FUNCTION": 23, - "START_FROM_APP_ENGINE_VERSION": 25, - "START_FROM_CLOUD_RUN_REVISION": 26, - "START_FROM_STORAGE_BUCKET": 29, - "START_FROM_PSC_PUBLISHED_SERVICE": 30, - "START_FROM_SERVERLESS_NEG": 31, - "APPLY_INGRESS_FIREWALL_RULE": 4, - "APPLY_EGRESS_FIREWALL_RULE": 5, - "APPLY_ROUTE": 6, - "APPLY_FORWARDING_RULE": 7, - "ANALYZE_LOAD_BALANCER_BACKEND": 28, - "SPOOFING_APPROVED": 8, - "ARRIVE_AT_INSTANCE": 9, - "ARRIVE_AT_INTERNAL_LOAD_BALANCER": 10, - "ARRIVE_AT_EXTERNAL_LOAD_BALANCER": 11, - "ARRIVE_AT_VPN_GATEWAY": 12, - "ARRIVE_AT_VPN_TUNNEL": 13, - "ARRIVE_AT_VPC_CONNECTOR": 24, - "NAT": 14, - "PROXY_CONNECTION": 15, - "DELIVER": 16, - "DROP": 17, - "FORWARD": 18, - "ABORT": 19, - "VIEWER_PERMISSION_MISSING": 20 - } - } - } - }, - "InstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "interface": { - "type": "string", - "id": 3 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "networkTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "serviceAccount": { - "type": "string", - "id": 8, - "options": { - "deprecated": true - } - }, - "pscNetworkAttachmentUri": { - "type": "string", - "id": 9 - } - } - }, - "NetworkInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedSubnetUri": { - "type": "string", - "id": 5 - }, - "matchedIpRange": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "FirewallInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "direction": { - "type": "string", - "id": 3 - }, - "action": { - "type": "string", - "id": 4 - }, - "priority": { - "type": "int32", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 6 - }, - "targetTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "targetServiceAccounts": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "policy": { - "type": "string", - "id": 9 - }, - "policyUri": { - "type": "string", - "id": 11 - }, - "firewallRuleType": { - "type": "FirewallRuleType", - "id": 10 - } - }, - "nested": { - "FirewallRuleType": { - "values": { - "FIREWALL_RULE_TYPE_UNSPECIFIED": 0, - "HIERARCHICAL_FIREWALL_POLICY_RULE": 1, - "VPC_FIREWALL_RULE": 2, - "IMPLIED_VPC_FIREWALL_RULE": 3, - "SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE": 4, - "NETWORK_FIREWALL_POLICY_RULE": 5, - "NETWORK_REGIONAL_FIREWALL_POLICY_RULE": 6, - "UNSUPPORTED_FIREWALL_POLICY_RULE": 100, - "TRACKING_STATE": 101 - } - } - } - }, - "RouteInfo": { - "oneofs": { - "_nccHubUri": { - "oneof": [ - "nccHubUri" - ] - }, - "_nccSpokeUri": { - "oneof": [ - "nccSpokeUri" - ] - }, - "_advertisedRouteSourceRouterUri": { - "oneof": [ - "advertisedRouteSourceRouterUri" - ] - }, - "_advertisedRouteNextHopUri": { - "oneof": [ - "advertisedRouteNextHopUri" - ] - } - }, - "fields": { - "routeType": { - "type": "RouteType", - "id": 8 - }, - "nextHopType": { - "type": "NextHopType", - "id": 9 - }, - "routeScope": { - "type": "RouteScope", - "id": 14 - }, - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "region": { - "type": "string", - "id": 19 - }, - "destIpRange": { - "type": "string", - "id": 3 - }, - "nextHop": { - "type": "string", - "id": 4 - }, - "networkUri": { - "type": "string", - "id": 5 - }, - "priority": { - "type": "int32", - "id": 6 - }, - "instanceTags": { - "rule": "repeated", - "type": "string", - "id": 7 - }, - "srcIpRange": { - "type": "string", - "id": 10 - }, - "destPortRanges": { - "rule": "repeated", - "type": "string", - "id": 11 - }, - "srcPortRanges": { - "rule": "repeated", - "type": "string", - "id": 12 - }, - "protocols": { - "rule": "repeated", - "type": "string", - "id": 13 - }, - "nccHubUri": { - "type": "string", - "id": 15, - "options": { - "proto3_optional": true - } - }, - "nccSpokeUri": { - "type": "string", - "id": 16, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteSourceRouterUri": { - "type": "string", - "id": 17, - "options": { - "proto3_optional": true - } - }, - "advertisedRouteNextHopUri": { - "type": "string", - "id": 18, - "options": { - "proto3_optional": true - } - } - }, - "nested": { - "RouteType": { - "values": { - "ROUTE_TYPE_UNSPECIFIED": 0, - "SUBNET": 1, - "STATIC": 2, - "DYNAMIC": 3, - "PEERING_SUBNET": 4, - "PEERING_STATIC": 5, - "PEERING_DYNAMIC": 6, - "POLICY_BASED": 7, - "ADVERTISED": 101 - } - }, - "NextHopType": { - "values": { - "NEXT_HOP_TYPE_UNSPECIFIED": 0, - "NEXT_HOP_IP": 1, - "NEXT_HOP_INSTANCE": 2, - "NEXT_HOP_NETWORK": 3, - "NEXT_HOP_PEERING": 4, - "NEXT_HOP_INTERCONNECT": 5, - "NEXT_HOP_VPN_TUNNEL": 6, - "NEXT_HOP_VPN_GATEWAY": 7, - "NEXT_HOP_INTERNET_GATEWAY": 8, - "NEXT_HOP_BLACKHOLE": 9, - "NEXT_HOP_ILB": 10, - "NEXT_HOP_ROUTER_APPLIANCE": 11, - "NEXT_HOP_NCC_HUB": 12 - } - }, - "RouteScope": { - "values": { - "ROUTE_SCOPE_UNSPECIFIED": 0, - "NETWORK": 1, - "NCC_HUB": 2 - } - } - } - }, - "GoogleServiceInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "googleServiceType": { - "type": "GoogleServiceType", - "id": 2 - } - }, - "nested": { - "GoogleServiceType": { - "values": { - "GOOGLE_SERVICE_TYPE_UNSPECIFIED": 0, - "IAP": 1, - "GFE_PROXY_OR_HEALTH_CHECK_PROBER": 2, - "CLOUD_DNS": 3, - "GOOGLE_API": 4, - "GOOGLE_API_PSC": 5, - "GOOGLE_API_VPC_SC": 6 - } - } - } - }, - "ForwardingRuleInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "matchedProtocol": { - "type": "string", - "id": 3 - }, - "matchedPortRange": { - "type": "string", - "id": 6 - }, - "vip": { - "type": "string", - "id": 4 - }, - "target": { - "type": "string", - "id": 5 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "loadBalancerName": { - "type": "string", - "id": 9 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 10 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerInfo": { - "fields": { - "loadBalancerType": { - "type": "LoadBalancerType", - "id": 1 - }, - "healthCheckUri": { - "type": "string", - "id": 2, - "options": { - "deprecated": true - } - }, - "backends": { - "rule": "repeated", - "type": "LoadBalancerBackend", - "id": 3 - }, - "backendType": { - "type": "BackendType", - "id": 4 - }, - "backendUri": { - "type": "string", - "id": 5 - } - }, - "nested": { - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "INTERNAL_TCP_UDP": 1, - "NETWORK_TCP_UDP": 2, - "HTTP_PROXY": 3, - "TCP_PROXY": 4, - "SSL_PROXY": 5 - } - }, - "BackendType": { - "values": { - "BACKEND_TYPE_UNSPECIFIED": 0, - "BACKEND_SERVICE": 1, - "TARGET_POOL": 2, - "TARGET_INSTANCE": 3 - } - } - } - }, - "LoadBalancerBackend": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "healthCheckFirewallState": { - "type": "HealthCheckFirewallState", - "id": 3 - }, - "healthCheckAllowingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "healthCheckBlockingFirewallRules": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "HealthCheckFirewallState": { - "values": { - "HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED": 0, - "CONFIGURED": 1, - "MISCONFIGURED": 2 - } - } - } - }, - "VpnGatewayInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "ipAddress": { - "type": "string", - "id": 4 - }, - "vpnTunnelUri": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "VpnTunnelInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "sourceGateway": { - "type": "string", - "id": 3 - }, - "remoteGateway": { - "type": "string", - "id": 4 - }, - "remoteGatewayIp": { - "type": "string", - "id": 5 - }, - "sourceGatewayIp": { - "type": "string", - "id": 6 - }, - "networkUri": { - "type": "string", - "id": 7 - }, - "region": { - "type": "string", - "id": 8 - }, - "routingType": { - "type": "RoutingType", - "id": 9 - } - }, - "nested": { - "RoutingType": { - "values": { - "ROUTING_TYPE_UNSPECIFIED": 0, - "ROUTE_BASED": 1, - "POLICY_BASED": 2, - "DYNAMIC": 3 - } - } - } - }, - "EndpointInfo": { - "fields": { - "sourceIp": { - "type": "string", - "id": 1 - }, - "destinationIp": { - "type": "string", - "id": 2 - }, - "protocol": { - "type": "string", - "id": 3 - }, - "sourcePort": { - "type": "int32", - "id": 4 - }, - "destinationPort": { - "type": "int32", - "id": 5 - }, - "sourceNetworkUri": { - "type": "string", - "id": 6 - }, - "destinationNetworkUri": { - "type": "string", - "id": 7 - }, - "sourceAgentUri": { - "type": "string", - "id": 8 - } - } - }, - "DeliverInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "storageBucket": { - "type": "string", - "id": 4 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Target": { - "values": { - "TARGET_UNSPECIFIED": 0, - "INSTANCE": 1, - "INTERNET": 2, - "GOOGLE_API": 3, - "GKE_MASTER": 4, - "CLOUD_SQL_INSTANCE": 5, - "PSC_PUBLISHED_SERVICE": 6, - "PSC_GOOGLE_API": 7, - "PSC_VPC_SC": 8, - "SERVERLESS_NEG": 9, - "STORAGE_BUCKET": 10, - "PRIVATE_NETWORK": 11, - "CLOUD_FUNCTION": 12, - "APP_ENGINE_VERSION": 13, - "CLOUD_RUN_REVISION": 14, - "GOOGLE_MANAGED_SERVICE": 15, - "REDIS_INSTANCE": 16, - "REDIS_CLUSTER": 17 - } - } - } - }, - "ForwardInfo": { - "fields": { - "target": { - "type": "Target", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - } - }, - "nested": { - "Target": { - "valuesOptions": { - "GKE_MASTER": { - "deprecated": true - }, - "CLOUD_SQL_INSTANCE": { - "deprecated": true - } - }, - "values": { - "TARGET_UNSPECIFIED": 0, - "PEERING_VPC": 1, - "VPN_GATEWAY": 2, - "INTERCONNECT": 3, - "GKE_MASTER": 4, - "IMPORTED_CUSTOM_ROUTE_NEXT_HOP": 5, - "CLOUD_SQL_INSTANCE": 6, - "ANOTHER_PROJECT": 7, - "NCC_HUB": 8, - "ROUTER_APPLIANCE": 9 - } - } - } - }, - "AbortInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "ipAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "projectsMissingPermission": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "Cause": { - "valuesOptions": { - "UNKNOWN_NETWORK": { - "deprecated": true - }, - "UNKNOWN_PROJECT": { - "deprecated": true - }, - "NO_EXTERNAL_IP": { - "deprecated": true - }, - "UNINTENDED_DESTINATION": { - "deprecated": true - }, - "SOURCE_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_SOURCE_NETWORK": { - "deprecated": true - }, - "DESTINATION_ENDPOINT_NOT_FOUND": { - "deprecated": true - }, - "MISMATCHED_DESTINATION_NETWORK": { - "deprecated": true - } - }, - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_NETWORK": 1, - "UNKNOWN_PROJECT": 3, - "NO_EXTERNAL_IP": 7, - "UNINTENDED_DESTINATION": 8, - "SOURCE_ENDPOINT_NOT_FOUND": 11, - "MISMATCHED_SOURCE_NETWORK": 12, - "DESTINATION_ENDPOINT_NOT_FOUND": 13, - "MISMATCHED_DESTINATION_NETWORK": 14, - "UNKNOWN_IP": 2, - "GOOGLE_MANAGED_SERVICE_UNKNOWN_IP": 32, - "SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK": 23, - "PERMISSION_DENIED": 4, - "PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS": 28, - "PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS": 29, - "PERMISSION_DENIED_NO_CLOUD_ROUTER_CONFIGS": 36, - "NO_SOURCE_LOCATION": 5, - "INVALID_ARGUMENT": 6, - "TRACE_TOO_LONG": 9, - "INTERNAL_ERROR": 10, - "UNSUPPORTED": 15, - "MISMATCHED_IP_VERSION": 16, - "GKE_KONNECTIVITY_PROXY_UNSUPPORTED": 17, - "RESOURCE_CONFIG_NOT_FOUND": 18, - "VM_INSTANCE_CONFIG_NOT_FOUND": 24, - "NETWORK_CONFIG_NOT_FOUND": 25, - "FIREWALL_CONFIG_NOT_FOUND": 26, - "ROUTE_CONFIG_NOT_FOUND": 27, - "GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT": 19, - "SOURCE_PSC_CLOUD_SQL_UNSUPPORTED": 20, - "SOURCE_REDIS_CLUSTER_UNSUPPORTED": 34, - "SOURCE_REDIS_INSTANCE_UNSUPPORTED": 35, - "SOURCE_FORWARDING_RULE_UNSUPPORTED": 21, - "NON_ROUTABLE_IP_ADDRESS": 22, - "UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT": 30, - "UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG": 31 - } - } - } - }, - "DropInfo": { - "fields": { - "cause": { - "type": "Cause", - "id": 1 - }, - "resourceUri": { - "type": "string", - "id": 2 - }, - "sourceIp": { - "type": "string", - "id": 3 - }, - "destinationIp": { - "type": "string", - "id": 4 - }, - "region": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Cause": { - "values": { - "CAUSE_UNSPECIFIED": 0, - "UNKNOWN_EXTERNAL_ADDRESS": 1, - "FOREIGN_IP_DISALLOWED": 2, - "FIREWALL_RULE": 3, - "NO_ROUTE": 4, - "ROUTE_BLACKHOLE": 5, - "ROUTE_WRONG_NETWORK": 6, - "ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED": 42, - "ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND": 43, - "ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK": 49, - "ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP": 50, - "ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH": 51, - "ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED": 52, - "ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID": 53, - "NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS": 44, - "VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH": 45, - "VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH": 46, - "PRIVATE_TRAFFIC_TO_INTERNET": 7, - "PRIVATE_GOOGLE_ACCESS_DISALLOWED": 8, - "PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED": 47, - "NO_EXTERNAL_ADDRESS": 9, - "UNKNOWN_INTERNAL_ADDRESS": 10, - "FORWARDING_RULE_MISMATCH": 11, - "FORWARDING_RULE_NO_INSTANCES": 12, - "FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK": 13, - "INSTANCE_NOT_RUNNING": 14, - "GKE_CLUSTER_NOT_RUNNING": 27, - "CLOUD_SQL_INSTANCE_NOT_RUNNING": 28, - "REDIS_INSTANCE_NOT_RUNNING": 68, - "REDIS_CLUSTER_NOT_RUNNING": 69, - "TRAFFIC_TYPE_BLOCKED": 15, - "GKE_MASTER_UNAUTHORIZED_ACCESS": 16, - "CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS": 17, - "DROPPED_INSIDE_GKE_SERVICE": 18, - "DROPPED_INSIDE_CLOUD_SQL_SERVICE": 19, - "GOOGLE_MANAGED_SERVICE_NO_PEERING": 20, - "GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT": 38, - "GKE_PSC_ENDPOINT_MISSING": 36, - "CLOUD_SQL_INSTANCE_NO_IP_ADDRESS": 21, - "GKE_CONTROL_PLANE_REGION_MISMATCH": 30, - "PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION": 31, - "GKE_CONTROL_PLANE_NO_ROUTE": 32, - "CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC": 33, - "PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION": 34, - "CLOUD_SQL_INSTANCE_NO_ROUTE": 35, - "CLOUD_SQL_CONNECTOR_REQUIRED": 63, - "CLOUD_FUNCTION_NOT_ACTIVE": 22, - "VPC_CONNECTOR_NOT_SET": 23, - "VPC_CONNECTOR_NOT_RUNNING": 24, - "VPC_CONNECTOR_SERVERLESS_TRAFFIC_BLOCKED": 60, - "VPC_CONNECTOR_HEALTH_CHECK_TRAFFIC_BLOCKED": 61, - "FORWARDING_RULE_REGION_MISMATCH": 25, - "PSC_CONNECTION_NOT_ACCEPTED": 26, - "PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK": 41, - "PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS": 48, - "PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS": 54, - "CLOUD_SQL_PSC_NEG_UNSUPPORTED": 58, - "NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT": 57, - "PSC_TRANSITIVITY_NOT_PROPAGATED": 64, - "HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED": 55, - "HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED": 56, - "CLOUD_RUN_REVISION_NOT_READY": 29, - "DROPPED_INSIDE_PSC_SERVICE_PRODUCER": 37, - "LOAD_BALANCER_HAS_NO_PROXY_SUBNET": 39, - "CLOUD_NAT_NO_ADDRESSES": 40, - "ROUTING_LOOP": 59, - "DROPPED_INSIDE_GOOGLE_MANAGED_SERVICE": 62, - "LOAD_BALANCER_BACKEND_INVALID_NETWORK": 65, - "BACKEND_SERVICE_NAMED_PORT_NOT_DEFINED": 66, - "DESTINATION_IS_PRIVATE_NAT_IP_RANGE": 67, - "DROPPED_INSIDE_REDIS_INSTANCE_SERVICE": 70, - "REDIS_INSTANCE_UNSUPPORTED_PORT": 71, - "REDIS_INSTANCE_CONNECTING_FROM_PUPI_ADDRESS": 72, - "REDIS_INSTANCE_NO_ROUTE_TO_DESTINATION_NETWORK": 73, - "REDIS_INSTANCE_NO_EXTERNAL_IP": 74, - "REDIS_INSTANCE_UNSUPPORTED_PROTOCOL": 78, - "DROPPED_INSIDE_REDIS_CLUSTER_SERVICE": 75, - "REDIS_CLUSTER_UNSUPPORTED_PORT": 76, - "REDIS_CLUSTER_NO_EXTERNAL_IP": 77, - "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, - "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, - "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, - "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, - "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 - } - } - } - }, - "GKEMasterInfo": { - "fields": { - "clusterUri": { - "type": "string", - "id": 2 - }, - "clusterNetworkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "dnsEndpoint": { - "type": "string", - "id": 7 - } - } - }, - "CloudSQLInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 4 - }, - "internalIp": { - "type": "string", - "id": 5 - }, - "externalIp": { - "type": "string", - "id": 6 - }, - "region": { - "type": "string", - "id": 7 - } - } - }, - "RedisInstanceInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "primaryEndpointIp": { - "type": "string", - "id": 4 - }, - "readEndpointIp": { - "type": "string", - "id": 5 - }, - "region": { - "type": "string", - "id": 6 - } - } - }, - "RedisClusterInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "discoveryEndpointIpAddress": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "secondaryEndpointIpAddress": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_info).format": "IPV4_OR_IPV6" - } - }, - "location": { - "type": "string", - "id": 6 - } - } - }, - "CloudFunctionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - }, - "versionId": { - "type": "int64", - "id": 4 - } - } - }, - "CloudRunRevisionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 4 - }, - "serviceUri": { - "type": "string", - "id": 5 - } - } - }, - "AppEngineVersionInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "runtime": { - "type": "string", - "id": 3 - }, - "environment": { - "type": "string", - "id": 4 - } - } - }, - "VpcConnectorInfo": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "uri": { - "type": "string", - "id": 2 - }, - "location": { - "type": "string", - "id": 3 - } - } - }, - "NatInfo": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "protocol": { - "type": "string", - "id": 2 - }, - "networkUri": { - "type": "string", - "id": 3 - }, - "oldSourceIp": { - "type": "string", - "id": 4 - }, - "newSourceIp": { - "type": "string", - "id": 5 - }, - "oldDestinationIp": { - "type": "string", - "id": 6 - }, - "newDestinationIp": { - "type": "string", - "id": 7 - }, - "oldSourcePort": { - "type": "int32", - "id": 8 - }, - "newSourcePort": { - "type": "int32", - "id": 9 - }, - "oldDestinationPort": { - "type": "int32", - "id": 10 - }, - "newDestinationPort": { - "type": "int32", - "id": 11 - }, - "routerUri": { - "type": "string", - "id": 12 - }, - "natGatewayName": { - "type": "string", - "id": 13 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "INTERNAL_TO_EXTERNAL": 1, - "EXTERNAL_TO_INTERNAL": 2, - "CLOUD_NAT": 3, - "PRIVATE_SERVICE_CONNECT": 4 - } - } - } - }, - "ProxyConnectionInfo": { - "fields": { - "protocol": { - "type": "string", - "id": 1 - }, - "oldSourceIp": { - "type": "string", - "id": 2 - }, - "newSourceIp": { - "type": "string", - "id": 3 - }, - "oldDestinationIp": { - "type": "string", - "id": 4 - }, - "newDestinationIp": { - "type": "string", - "id": 5 - }, - "oldSourcePort": { - "type": "int32", - "id": 6 - }, - "newSourcePort": { - "type": "int32", - "id": 7 - }, - "oldDestinationPort": { - "type": "int32", - "id": 8 - }, - "newDestinationPort": { - "type": "int32", - "id": 9 - }, - "subnetUri": { - "type": "string", - "id": 10 - }, - "networkUri": { - "type": "string", - "id": 11 - } - } - }, - "LoadBalancerBackendInfo": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "instanceUri": { - "type": "string", - "id": 2 - }, - "backendServiceUri": { - "type": "string", - "id": 3 - }, - "instanceGroupUri": { - "type": "string", - "id": 4 - }, - "networkEndpointGroupUri": { - "type": "string", - "id": 5 - }, - "backendBucketUri": { - "type": "string", - "id": 8 - }, - "pscServiceAttachmentUri": { - "type": "string", - "id": 9 - }, - "pscGoogleApiTarget": { - "type": "string", - "id": 10 - }, - "healthCheckUri": { - "type": "string", - "id": 6 - }, - "healthCheckFirewallsConfigState": { - "type": "HealthCheckFirewallsConfigState", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "HealthCheckFirewallsConfigState": { - "values": { - "HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED": 0, - "FIREWALLS_CONFIGURED": 1, - "FIREWALLS_PARTIALLY_CONFIGURED": 2, - "FIREWALLS_NOT_CONFIGURED": 3, - "FIREWALLS_UNSUPPORTED": 4 - } - } - } - }, - "LoadBalancerType": { - "values": { - "LOAD_BALANCER_TYPE_UNSPECIFIED": 0, - "HTTPS_ADVANCED_LOAD_BALANCER": 1, - "HTTPS_LOAD_BALANCER": 2, - "REGIONAL_HTTPS_LOAD_BALANCER": 3, - "INTERNAL_HTTPS_LOAD_BALANCER": 4, - "SSL_PROXY_LOAD_BALANCER": 5, - "TCP_PROXY_LOAD_BALANCER": 6, - "INTERNAL_TCP_PROXY_LOAD_BALANCER": 7, - "NETWORK_LOAD_BALANCER": 8, - "LEGACY_NETWORK_LOAD_BALANCER": 9, - "TCP_UDP_INTERNAL_LOAD_BALANCER": 10 - } - }, - "StorageBucketInfo": { - "fields": { - "bucket": { - "type": "string", - "id": 1 - } - } - }, - "ServerlessNegInfo": { - "fields": { - "negUri": { - "type": "string", - "id": 1 - } - } - }, - "ReachabilityService": { - "options": { - "(google.api.default_host)": "networkmanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListConnectivityTests": { - "requestType": "ListConnectivityTestsRequest", - "responseType": "ListConnectivityTestsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests" - } - } - ] - }, - "GetConnectivityTest": { - "requestType": "GetConnectivityTestRequest", - "responseType": "ConnectivityTest", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - } - } - ] - }, - "CreateConnectivityTest": { - "requestType": "CreateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", - "(google.api.http).body": "resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/global}/connectivityTests", - "body": "resource" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "UpdateConnectivityTest": { - "requestType": "UpdateConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "(google.api.http).body": "resource", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{resource.name=projects/*/locations/global/connectivityTests/*}", - "body": "resource" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "RerunConnectivityTest": { - "requestType": "RerunConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}:rerun", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "metadata_type": "OperationMetadata" - } - } - ] - }, - "DeleteConnectivityTest": { - "requestType": "DeleteConnectivityTestRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/global/connectivityTests/*}" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] - } - } - }, - "ListConnectivityTestsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - }, - "orderBy": { - "type": "string", - "id": 5 - } - } - }, - "ListConnectivityTestsResponse": { - "fields": { - "resources": { - "rule": "repeated", - "type": "ConnectivityTest", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "CreateConnectivityTestRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "cloudresourcemanager.googleapis.com/Project" - } - }, - "testId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateConnectivityTestRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "resource": { - "type": "ConnectivityTest", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "RerunConnectivityTestRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/ConnectivityTest" - } - } - } - }, - "OperationMetadata": { - "fields": { - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 1 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "target": { - "type": "string", - "id": 3 - }, - "verb": { - "type": "string", - "id": 4 - }, - "statusDetail": { - "type": "string", - "id": 5 - }, - "cancelRequested": { - "type": "bool", - "id": 6 - }, - "apiVersion": { - "type": "string", - "id": 7 - } - } - }, - "VpcFlowLogsService": { - "options": { - "(google.api.default_host)": "networkmanagement.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListVpcFlowLogsConfigs": { - "requestType": "ListVpcFlowLogsConfigsRequest", - "responseType": "ListVpcFlowLogsConfigsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "GetVpcFlowLogsConfig": { - "requestType": "GetVpcFlowLogsConfigRequest", - "responseType": "VpcFlowLogsConfig", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateVpcFlowLogsConfig": { - "requestType": "CreateVpcFlowLogsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", - "(google.api.http).body": "vpc_flow_logs_config", - "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id", - "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", - "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/vpcFlowLogsConfigs", - "body": "vpc_flow_logs_config" - } - }, - { - "(google.api.method_signature)": "parent,vpc_flow_logs_config,vpc_flow_logs_config_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "VpcFlowLogsConfig", - "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - } - } - ] - }, - "UpdateVpcFlowLogsConfig": { - "requestType": "UpdateVpcFlowLogsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "(google.api.http).body": "vpc_flow_logs_config", - "(google.api.method_signature)": "vpc_flow_logs_config,update_mask", - "(google.longrunning.operation_info).response_type": "VpcFlowLogsConfig", - "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{vpc_flow_logs_config.name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "body": "vpc_flow_logs_config" - } - }, - { - "(google.api.method_signature)": "vpc_flow_logs_config,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "VpcFlowLogsConfig", - "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - } - } - ] - }, - "DeleteVpcFlowLogsConfig": { - "requestType": "DeleteVpcFlowLogsConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/vpcFlowLogsConfigs/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.cloud.networkmanagement.v1beta1.OperationMetadata" - } - } - ] - } - } - }, - "ListVpcFlowLogsConfigsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - }, - "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" - } - } - } - }, - "ListVpcFlowLogsConfigsResponse": { - "fields": { - "vpcFlowLogsConfigs": { - "rule": "repeated", - "type": "VpcFlowLogsConfig", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - }, - "unreachable": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "GetVpcFlowLogsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - } - } - }, - "CreateVpcFlowLogsConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - }, - "vpcFlowLogsConfigId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - }, - "vpcFlowLogsConfig": { - "type": "VpcFlowLogsConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "UpdateVpcFlowLogsConfigRequest": { - "fields": { - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "vpcFlowLogsConfig": { - "type": "VpcFlowLogsConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "DeleteVpcFlowLogsConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig" - } - } - } - }, - "VpcFlowLogsConfig": { - "options": { - "(google.api.resource).type": "networkmanagement.googleapis.com/VpcFlowLogsConfig", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}", - "(google.api.resource).plural": "vpcFlowLogsConfigs", - "(google.api.resource).singular": "vpcFlowLogsConfig" - }, - "oneofs": { - "_description": { - "oneof": [ - "description" - ] - }, - "_state": { - "oneof": [ - "state" - ] - }, - "_aggregationInterval": { - "oneof": [ - "aggregationInterval" - ] - }, - "_flowSampling": { - "oneof": [ - "flowSampling" - ] - }, - "_metadata": { - "oneof": [ - "metadata" - ] - }, - "_filterExpr": { - "oneof": [ - "filterExpr" - ] - }, - "targetResource": { - "oneof": [ - "interconnectAttachment", - "vpnTunnel" - ] - } - }, - "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 - } - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "aggregationInterval": { - "type": "AggregationInterval", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "flowSampling": { - "type": "float", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadata": { - "type": "Metadata", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "metadataFields": { - "rule": "repeated", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filterExpr": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - }, - "interconnectAttachment": { - "type": "string", - "id": 102 - }, - "vpnTunnel": { - "type": "string", - "id": 103 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 9, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2 - } - }, - "AggregationInterval": { - "values": { - "AGGREGATION_INTERVAL_UNSPECIFIED": 0, - "INTERVAL_5_SEC": 1, - "INTERVAL_30_SEC": 2, - "INTERVAL_1_MIN": 3, - "INTERVAL_5_MIN": 4, - "INTERVAL_10_MIN": 5, - "INTERVAL_15_MIN": 6 - } - }, - "Metadata": { - "values": { - "METADATA_UNSPECIFIED": 0, - "INCLUDE_ALL_METADATA": 1, - "EXCLUDE_ALL_METADATA": 2, - "CUSTOM_METADATA": 3 - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", - "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - }, - "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 - } - } - } - } - } - }, - "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 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js deleted file mode 100644 index 05458c89c11..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.create_connectivity_test.js +++ /dev/null @@ -1,79 +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, testId, resource) { - // [START networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - */ - // const testId = 'abc123' - /** - * Required. A `ConnectivityTest` resource - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callCreateConnectivityTest() { - // Construct request - const request = { - parent, - testId, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.createConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js deleted file mode 100644 index 22a9e8e6bcc..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.delete_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callDeleteConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.deleteConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.js deleted file mode 100644 index 136815a174a..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.get_connectivity_test.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 networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callGetConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await networkmanagementClient.getConnectivityTest(request); - console.log(response); - } - - callGetConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.js deleted file mode 100644 index 0f13d2d7bd8..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.list_connectivity_tests.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(parent) { - // [START networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Number of `ConnectivityTests` to return. - */ - // const pageSize = 1234 - /** - * Page token from an earlier query, as returned in `next_page_token`. - */ - // const pageToken = 'abc123' - /** - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - */ - // const filter = 'abc123' - /** - * Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callListConnectivityTests() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = networkmanagementClient.listConnectivityTestsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListConnectivityTests(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js deleted file mode 100644 index 060a9e295e1..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.rerun_connectivity_test.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callRerunConnectivityTest() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.rerunConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRerunConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js deleted file mode 100644 index f6925cd1908..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/reachability_service.update_connectivity_test.js +++ /dev/null @@ -1,68 +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, resource) { - // [START networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. Only fields specified in update_mask are updated. - */ - // const resource = {} - - // Imports the Networkmanagement library - const {ReachabilityServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new ReachabilityServiceClient(); - - async function callUpdateConnectivityTest() { - // Construct request - const request = { - updateMask, - resource, - }; - - // Run request - const [operation] = await networkmanagementClient.updateConnectivityTest(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateConnectivityTest(); - // [END networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_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-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json deleted file mode 100644 index 526ea089821..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.networkmanagement.v1beta1.json +++ /dev/null @@ -1,511 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-networkmanagement", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.networkmanagement.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async", - "title": "ReachabilityService listConnectivityTests Sample", - "origin": "API_DEFINITION", - "description": " Lists all Connectivity Tests owned by a project.", - "canonical": true, - "file": "reachability_service.list_connectivity_tests.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 87, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", - "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.networkmanagement.v1beta1.ListConnectivityTestsResponse", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "ListConnectivityTests", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.ListConnectivityTests", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async", - "title": "ReachabilityService getConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific Connectivity Test.", - "canonical": true, - "file": "reachability_service.get_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "GetConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.GetConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async", - "title": "ReachabilityService createConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", - "canonical": true, - "file": "reachability_service.create_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "test_id", - "type": "TYPE_STRING" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "CreateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.CreateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async", - "title": "ReachabilityService updateConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", - "canonical": true, - "file": "reachability_service.update_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "resource", - "type": ".google.cloud.networkmanagement.v1beta1.ConnectivityTest" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "UpdateConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.UpdateConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async", - "title": "ReachabilityService rerunConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", - "canonical": true, - "file": "reachability_service.rerun_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "RerunConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.RerunConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async", - "title": "ReachabilityService deleteConnectivityTest Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific `ConnectivityTest`.", - "canonical": true, - "file": "reachability_service.delete_connectivity_test.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "ReachabilityServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityServiceClient" - }, - "method": { - "shortName": "DeleteConnectivityTest", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService.DeleteConnectivityTest", - "service": { - "shortName": "ReachabilityService", - "fullName": "google.cloud.networkmanagement.v1beta1.ReachabilityService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async", - "title": "ReachabilityService listVpcFlowLogsConfigs Sample", - "origin": "API_DEFINITION", - "description": " Lists all `VpcFlowLogsConfigs` in a given project.", - "canonical": true, - "file": "vpc_flow_logs_service.list_vpc_flow_logs_configs.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 75, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListVpcFlowLogsConfigs", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", - "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.networkmanagement.v1beta1.ListVpcFlowLogsConfigsResponse", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "ListVpcFlowLogsConfigs", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.ListVpcFlowLogsConfigs", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async", - "title": "ReachabilityService getVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Gets the details of a specific `VpcFlowLogsConfig`.", - "canonical": true, - "file": "vpc_flow_logs_service.get_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "GetVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.GetVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async", - "title": "ReachabilityService createVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Creates a new `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. Creating a configuration with state=DISABLED will fail. 2. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - creating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", - "canonical": true, - "file": "vpc_flow_logs_service.create_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "vpc_flow_logs_config_id", - "type": "TYPE_STRING" - }, - { - "name": "vpc_flow_logs_config", - "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "CreateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.CreateVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async", - "title": "ReachabilityService updateVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Updates an existing `VpcFlowLogsConfig`. If a configuration with the exact same settings already exists (even if the ID is different), the creation fails. Notes: 1. The following fields are not considrered as `settings` for the purpose of the check mentioned above, therefore - updating another configuration with the same fields but different values for the following fields will fail as well: - name - create_time - update_time - labels - description", - "canonical": true, - "file": "vpc_flow_logs_service.update_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "vpc_flow_logs_config", - "type": ".google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "UpdateVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.UpdateVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - }, - { - "regionTag": "networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async", - "title": "ReachabilityService deleteVpcFlowLogsConfig Sample", - "origin": "API_DEFINITION", - "description": " Deletes a specific `VpcFlowLogsConfig`.", - "canonical": true, - "file": "vpc_flow_logs_service.delete_vpc_flow_logs_config.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "VpcFlowLogsServiceClient", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsServiceClient" - }, - "method": { - "shortName": "DeleteVpcFlowLogsConfig", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService.DeleteVpcFlowLogsConfig", - "service": { - "shortName": "VpcFlowLogsService", - "fullName": "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js deleted file mode 100644 index be3d5827f4b..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js +++ /dev/null @@ -1,73 +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, vpcFlowLogsConfigId, vpcFlowLogsConfig) { - // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the VPC Flow Logs configuration to create: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Required. ID of the `VpcFlowLogsConfig`. - */ - // const vpcFlowLogsConfigId = 'abc123' - /** - * Required. A `VpcFlowLogsConfig` resource - */ - // const vpcFlowLogsConfig = {} - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callCreateVpcFlowLogsConfig() { - // Construct request - const request = { - parent, - vpcFlowLogsConfigId, - vpcFlowLogsConfig, - }; - - // Run request - const [operation] = await networkmanagementClient.createVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js deleted file mode 100644 index 5c029e6248c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js +++ /dev/null @@ -1,63 +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 networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callDeleteVpcFlowLogsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const [operation] = await networkmanagementClient.deleteVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js deleted file mode 100644 index 7fca2193c11..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.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 networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - */ - // const name = 'abc123' - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callGetVpcFlowLogsConfig() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await networkmanagementClient.getVpcFlowLogsConfig(request); - console.log(response); - } - - callGetVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js deleted file mode 100644 index 79caacd62bf..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js +++ /dev/null @@ -1,83 +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 networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - */ - // const parent = 'abc123' - /** - * Optional. Number of `VpcFlowLogsConfigs` to return. - */ - // const pageSize = 1234 - /** - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - */ - // const pageToken = 'abc123' - /** - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported CEL logic operators - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - */ - // const filter = 'abc123' - /** - * Optional. Field to use to sort the list. - */ - // const orderBy = 'abc123' - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callListVpcFlowLogsConfigs() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = networkmanagementClient.listVpcFlowLogsConfigsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListVpcFlowLogsConfigs(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_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-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js deleted file mode 100644 index ee3fbc9e1fb..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/samples/generated/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js +++ /dev/null @@ -1,68 +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, vpcFlowLogsConfig) { - // [START networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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. Mask of fields to update. At least one path must be supplied in - * this field. - */ - // const updateMask = {} - /** - * Required. Only fields specified in update_mask are updated. - */ - // const vpcFlowLogsConfig = {} - - // Imports the Networkmanagement library - const {VpcFlowLogsServiceClient} = require('@google-cloud/network-management').v1beta1; - - // Instantiates a client - const networkmanagementClient = new VpcFlowLogsServiceClient(); - - async function callUpdateVpcFlowLogsConfig() { - // Construct request - const request = { - updateMask, - vpcFlowLogsConfig, - }; - - // Run request - const [operation] = await networkmanagementClient.updateVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateVpcFlowLogsConfig(); - // [END networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_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-networkmanagement/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts deleted file mode 100644 index cdc6c3b552c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/index.ts +++ /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. ** - -import * as v1beta1 from './v1beta1'; -const ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; -type ReachabilityServiceClient = v1beta1.ReachabilityServiceClient; -const VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; -type VpcFlowLogsServiceClient = v1beta1.VpcFlowLogsServiceClient; -export {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; -export default {v1beta1, ReachabilityServiceClient, VpcFlowLogsServiceClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json deleted file mode 100644 index 8318960dbe5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.networkmanagement.v1beta1", - "libraryPackage": "@google-cloud/network-management", - "services": { - "ReachabilityService": { - "clients": { - "grpc": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ReachabilityServiceClient", - "rpcs": { - "GetConnectivityTest": { - "methods": [ - "getConnectivityTest" - ] - }, - "CreateConnectivityTest": { - "methods": [ - "createConnectivityTest" - ] - }, - "UpdateConnectivityTest": { - "methods": [ - "updateConnectivityTest" - ] - }, - "RerunConnectivityTest": { - "methods": [ - "rerunConnectivityTest" - ] - }, - "DeleteConnectivityTest": { - "methods": [ - "deleteConnectivityTest" - ] - }, - "ListConnectivityTests": { - "methods": [ - "listConnectivityTests", - "listConnectivityTestsStream", - "listConnectivityTestsAsync" - ] - } - } - } - } - }, - "VpcFlowLogsService": { - "clients": { - "grpc": { - "libraryClient": "VpcFlowLogsServiceClient", - "rpcs": { - "GetVpcFlowLogsConfig": { - "methods": [ - "getVpcFlowLogsConfig" - ] - }, - "CreateVpcFlowLogsConfig": { - "methods": [ - "createVpcFlowLogsConfig" - ] - }, - "UpdateVpcFlowLogsConfig": { - "methods": [ - "updateVpcFlowLogsConfig" - ] - }, - "DeleteVpcFlowLogsConfig": { - "methods": [ - "deleteVpcFlowLogsConfig" - ] - }, - "ListVpcFlowLogsConfigs": { - "methods": [ - "listVpcFlowLogsConfigs", - "listVpcFlowLogsConfigsStream", - "listVpcFlowLogsConfigsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "VpcFlowLogsServiceClient", - "rpcs": { - "GetVpcFlowLogsConfig": { - "methods": [ - "getVpcFlowLogsConfig" - ] - }, - "CreateVpcFlowLogsConfig": { - "methods": [ - "createVpcFlowLogsConfig" - ] - }, - "UpdateVpcFlowLogsConfig": { - "methods": [ - "updateVpcFlowLogsConfig" - ] - }, - "DeleteVpcFlowLogsConfig": { - "methods": [ - "deleteVpcFlowLogsConfig" - ] - }, - "ListVpcFlowLogsConfigs": { - "methods": [ - "listVpcFlowLogsConfigs", - "listVpcFlowLogsConfigsStream", - "listVpcFlowLogsConfigsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts deleted file mode 100644 index f8ad762c8da..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/index.ts +++ /dev/null @@ -1,20 +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 {ReachabilityServiceClient} from './reachability_service_client'; -export {VpcFlowLogsServiceClient} from './vpc_flow_logs_service_client'; diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts deleted file mode 100644 index b0e51c2f99b..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client.ts +++ /dev/null @@ -1,1647 +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/v1beta1/reachability_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './reachability_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The Reachability service in the Google Cloud Network Management API provides - * services that analyze the reachability within a single Google Virtual Private - * Cloud (VPC) network, between peered VPC networks, between VPC and on-premises - * networks, or between VPC networks and internet hosts. A reachability analysis - * is based on Google Cloud network configurations. - * - * You can use the analysis results to verify these configurations and - * to troubleshoot connectivity issues. - * @class - * @memberof v1beta1 - */ -export class ReachabilityServiceClient { - 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; - reachabilityServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ReachabilityServiceClient. - * - * @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 ReachabilityServiceClient({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 ReachabilityServiceClient; - 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 = 'networkmanagement.' + 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 = { - connectivityTestPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/global/connectivityTests/{test}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' - ), - }; - - // 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 = { - listConnectivityTests: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') - }; - - 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; - const createConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const updateConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; - const updateConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const rerunConnectivityTestResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.ConnectivityTest') as gax.protobuf.Type; - const rerunConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const deleteConnectivityTestResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteConnectivityTestMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createConnectivityTestResponse.decode.bind(createConnectivityTestResponse), - createConnectivityTestMetadata.decode.bind(createConnectivityTestMetadata)), - updateConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateConnectivityTestResponse.decode.bind(updateConnectivityTestResponse), - updateConnectivityTestMetadata.decode.bind(updateConnectivityTestMetadata)), - rerunConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - rerunConnectivityTestResponse.decode.bind(rerunConnectivityTestResponse), - rerunConnectivityTestMetadata.decode.bind(rerunConnectivityTestMetadata)), - deleteConnectivityTest: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteConnectivityTestResponse.decode.bind(deleteConnectivityTestResponse), - deleteConnectivityTestMetadata.decode.bind(deleteConnectivityTestMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.networkmanagement.v1beta1.ReachabilityService', 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.reachabilityServiceStub) { - return this.reachabilityServiceStub; - } - - // Put together the "service stub" for - // google.cloud.networkmanagement.v1beta1.ReachabilityService. - this.reachabilityServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.ReachabilityService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.networkmanagement.v1beta1.ReachabilityService, - 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 reachabilityServiceStubMethods = - ['listConnectivityTests', 'getConnectivityTest', 'createConnectivityTest', 'updateConnectivityTest', 'rerunConnectivityTest', 'deleteConnectivityTest']; - for (const methodName of reachabilityServiceStubMethods) { - const callPromise = this.reachabilityServiceStub.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.reachabilityServiceStub; - } - - /** - * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific Connectivity Test. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `ConnectivityTest` resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. - * 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/v1beta1/reachability_service.get_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_GetConnectivityTest_async - */ - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|undefined, {}|undefined - ]>; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): void; - getConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest, - protos.google.cloud.networkmanagement.v1beta1.IGetConnectivityTestRequest|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.getConnectivityTest(request, options, callback); - } - -/** - * Creates a new Connectivity Test. - * After you create a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, containing non-existent resources in the network, or you - * don't have read permissions to the network configurations of listed - * projects), then the reachability result returns a value of `UNKNOWN`. - * - * If the endpoint specifications in `ConnectivityTest` are - * incomplete, the reachability result returns a value of - * AMBIGUOUS. For more information, - * see the Connectivity Test documentation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Test to create: - * `projects/{project_id}/locations/global` - * @param {string} request.testId - * Required. The logical name of the Connectivity Test in your project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-40 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource - * Required. A `ConnectivityTest` 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 - * 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/v1beta1/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async - */ - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateConnectivityTestRequest, - 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.createConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createConnectivityTest()`. - * @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/v1beta1/reachability_service.create_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_CreateConnectivityTest_async - */ - async checkCreateConnectivityTestProgress(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.createConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates the configuration of an existing `ConnectivityTest`. - * After you update a test, the reachability analysis is performed as part - * of the long running operation, which completes when the analysis completes. - * The Reachability state in the test resource is updated with the new result. - * - * If the endpoint specifications in `ConnectivityTest` are invalid - * (for example, they contain non-existent resources in the network, or the - * user does not have read permissions to the network configurations of - * listed projects), then the reachability result returns a value of - * UNKNOWN. - * - * If the endpoint specifications in `ConnectivityTest` are incomplete, the - * reachability result returns a value of `AMBIGUOUS`. See the documentation - * in `ConnectivityTest` for more details. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.networkmanagement.v1beta1.ConnectivityTest} request.resource - * Required. Only fields specified in update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateConnectivityTestRequest, - 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({ - 'resource.name': request.resource!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateConnectivityTest()`. - * @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/v1beta1/reachability_service.update_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_UpdateConnectivityTest_async - */ - async checkUpdateConnectivityTestProgress(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.updateConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Rerun an existing `ConnectivityTest`. - * After the user triggers the rerun, the reachability analysis is performed - * as part of the long running operation, which completes when the analysis - * completes. - * - * Even though the test configuration remains the same, the reachability - * result may change due to underlying network configuration changes. - * - * If the endpoint specifications in `ConnectivityTest` become invalid (for - * example, specified resources are deleted in the network, or you lost - * read permissions to the network configurations of listed projects), then - * the reachability result returns a value of `UNKNOWN`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async - */ - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - rerunConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IRerunConnectivityTestRequest, - 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.rerunConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `rerunConnectivityTest()`. - * @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/v1beta1/reachability_service.rerun_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_RerunConnectivityTest_async - */ - async checkRerunConnectivityTestProgress(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.rerunConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific `ConnectivityTest`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Connectivity Test resource name using the form: - * `projects/{project_id}/locations/global/connectivityTests/{test_id}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteConnectivityTest( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteConnectivityTestRequest, - 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.deleteConnectivityTest(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteConnectivityTest()`. - * @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/v1beta1/reachability_service.delete_connectivity_test.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_DeleteConnectivityTest_async - */ - async checkDeleteConnectivityTestProgress(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.deleteConnectivityTest, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all Connectivity Tests owned by a project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. - * 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse - ]>; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; - listConnectivityTests( - request: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): void; - listConnectivityTests( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>, - callback?: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[], - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listConnectivityTests(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest} 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 `listConnectivityTestsAsync()` - * 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. - */ - listConnectivityTestsStream( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.createStream( - this.innerApiCalls.listConnectivityTests as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listConnectivityTests`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the Connectivity Tests: - * `projects/{project_id}/locations/global` - * @param {number} request.pageSize - * Number of `ConnectivityTests` to return. - * @param {string} request.pageToken - * Page token from an earlier query, as returned in `next_page_token`. - * @param {string} request.filter - * Lists the `ConnectivityTests` that match the filter expression. A filter - * expression filters the resources listed in the response. The expression - * must be of the form ` ` where operators: `<`, `>`, - * `<=`, - * `>=`, - * `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is - * roughly synonymous with equality). can refer to a proto or JSON - * field, or a synthetic field. Field names can be camelCase or snake_case. - * - * Examples: - * - Filter by name: - * name = "projects/proj-1/locations/global/connectivityTests/test-1 - * - * - Filter by labels: - * - Resources that have a key called `foo` - * labels.foo:* - * - Resources that have a key called `foo` whose value is `bar` - * labels.foo = bar - * @param {string} request.orderBy - * Field to use to sort the list. - * @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.networkmanagement.v1beta1.ConnectivityTest|ConnectivityTest}. 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/v1beta1/reachability_service.list_connectivity_tests.js - * region_tag:networkmanagement_v1beta1_generated_ReachabilityService_ListConnectivityTests_async - */ - listConnectivityTestsAsync( - request?: protos.google.cloud.networkmanagement.v1beta1.IListConnectivityTestsRequest, - 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['listConnectivityTests']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listConnectivityTests.asyncIterate( - this.innerApiCalls['listConnectivityTests'] 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 connectivityTest resource name string. - * - * @param {string} project - * @param {string} test - * @returns {string} Resource name string. - */ - connectivityTestPath(project:string,test:string) { - return this.pathTemplates.connectivityTestPathTemplate.render({ - project: project, - test: test, - }); - } - - /** - * Parse the project from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; - } - - /** - * Parse the test from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the test. - */ - matchTestFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; - } - - /** - * Return a fully-qualified project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified vpcFlowLogsConfig resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} vpc_flow_logs_config - * @returns {string} Resource name string. - */ - vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ - project: project, - location: location, - vpc_flow_logs_config: vpcFlowLogsConfig, - }); - } - - /** - * Parse the project from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; - } - - /** - * Parse the location from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; - } - - /** - * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the vpc_flow_logs_config. - */ - matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; - } - - /** - * 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.reachabilityServiceStub && !this._terminated) { - return this.reachabilityServiceStub.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-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json deleted file mode 100644 index 0d2fd849ae5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_client_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1beta1.ReachabilityService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListConnectivityTests": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RerunConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteConnectivityTest": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json deleted file mode 100644 index 54de9f63455..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/reachability_service_proto_list.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" -] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts deleted file mode 100644 index d69b58611c2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client.ts +++ /dev/null @@ -1,1523 +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/v1beta1/vpc_flow_logs_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './vpc_flow_logs_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * The VPC Flow Logs service in the Google Cloud Network Management API provides - * configurations that generate Flow Logs. The service and the configuration - * resources created using this service are global. - * @class - * @memberof v1beta1 - */ -export class VpcFlowLogsServiceClient { - 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; - vpcFlowLogsServiceStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of VpcFlowLogsServiceClient. - * - * @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 VpcFlowLogsServiceClient({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 VpcFlowLogsServiceClient; - 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 = 'networkmanagement.' + 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 = { - connectivityTestPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/global/connectivityTests/{test}' - ), - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}' - ), - projectPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}' - ), - vpcFlowLogsConfigPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/vpcFlowLogsConfigs/{vpc_flow_logs_config}' - ), - }; - - // 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 = { - listVpcFlowLogsConfigs: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'vpcFlowLogsConfigs') - }; - - 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: '/v1beta1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1beta1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:getIamPolicy',},{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:setIamPolicy',body: '*',},{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1beta1/{resource=projects/*/locations/global/connectivityTests/*}:testIamPermissions',body: '*',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1beta1/{name=projects/*/locations/global/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/global/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/global}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createVpcFlowLogsConfigResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; - const createVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const updateVpcFlowLogsConfigResponse = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig') as gax.protobuf.Type; - const updateVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - const deleteVpcFlowLogsConfigResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteVpcFlowLogsConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.networkmanagement.v1beta1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createVpcFlowLogsConfigResponse.decode.bind(createVpcFlowLogsConfigResponse), - createVpcFlowLogsConfigMetadata.decode.bind(createVpcFlowLogsConfigMetadata)), - updateVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateVpcFlowLogsConfigResponse.decode.bind(updateVpcFlowLogsConfigResponse), - updateVpcFlowLogsConfigMetadata.decode.bind(updateVpcFlowLogsConfigMetadata)), - deleteVpcFlowLogsConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteVpcFlowLogsConfigResponse.decode.bind(deleteVpcFlowLogsConfigResponse), - deleteVpcFlowLogsConfigMetadata.decode.bind(deleteVpcFlowLogsConfigMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.networkmanagement.v1beta1.VpcFlowLogsService', 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.vpcFlowLogsServiceStub) { - return this.vpcFlowLogsServiceStub; - } - - // Put together the "service stub" for - // google.cloud.networkmanagement.v1beta1.VpcFlowLogsService. - this.vpcFlowLogsServiceStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.networkmanagement.v1beta1.VpcFlowLogsService') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.networkmanagement.v1beta1.VpcFlowLogsService, - 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 vpcFlowLogsServiceStubMethods = - ['listVpcFlowLogsConfigs', 'getVpcFlowLogsConfig', 'createVpcFlowLogsConfig', 'updateVpcFlowLogsConfig', 'deleteVpcFlowLogsConfig']; - for (const methodName of vpcFlowLogsServiceStubMethods) { - const callPromise = this.vpcFlowLogsServiceStub.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.vpcFlowLogsServiceStub; - } - - /** - * 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 'networkmanagement.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 'networkmanagement.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 the details of a specific `VpcFlowLogsConfig`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. - * 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/v1beta1/vpc_flow_logs_service.get_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_GetVpcFlowLogsConfig_async - */ - getVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|undefined, {}|undefined - ]>; - getVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>): void; - getVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - callback: Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>): void; - getVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig, - protos.google.cloud.networkmanagement.v1beta1.IGetVpcFlowLogsConfigRequest|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.getVpcFlowLogsConfig(request, options, callback); - } - -/** - * Creates a new `VpcFlowLogsConfig`. - * If a configuration with the exact same settings already exists (even if the - * ID is different), the creation fails. - * Notes: - * 1. Creating a configuration with state=DISABLED will fail. - * 2. The following fields are not considrered as `settings` for the purpose - * of the check mentioned above, therefore - creating another configuration - * with the same fields but different values for the following fields will - * fail as well: - * - name - * - create_time - * - update_time - * - labels - * - description - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VPC Flow Logs configuration to create: - * `projects/{project_id}/locations/global` - * @param {string} request.vpcFlowLogsConfigId - * Required. ID of the `VpcFlowLogsConfig`. - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig - * Required. A `VpcFlowLogsConfig` 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 - * 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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async - */ - createVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.ICreateVpcFlowLogsConfigRequest, - 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.createVpcFlowLogsConfig(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createVpcFlowLogsConfig()`. - * @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/v1beta1/vpc_flow_logs_service.create_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_CreateVpcFlowLogsConfig_async - */ - async checkCreateVpcFlowLogsConfigProgress(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.createVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Updates an existing `VpcFlowLogsConfig`. - * If a configuration with the exact same settings already exists (even if the - * ID is different), the creation fails. - * Notes: - * 1. The following fields are not considrered as `settings` for the purpose - * of the check mentioned above, therefore - updating another configuration - * with the same fields but different values for the following fields will - * fail as well: - * - name - * - create_time - * - update_time - * - labels - * - description - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. - * @param {google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig} request.vpcFlowLogsConfig - * Required. Only fields specified in update_mask are updated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async - */ - updateVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IUpdateVpcFlowLogsConfigRequest, - 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({ - 'vpc_flow_logs_config.name': request.vpcFlowLogsConfig!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateVpcFlowLogsConfig(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateVpcFlowLogsConfig()`. - * @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/v1beta1/vpc_flow_logs_service.update_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_UpdateVpcFlowLogsConfig_async - */ - async checkUpdateVpcFlowLogsConfigProgress(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.updateVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Deletes a specific `VpcFlowLogsConfig`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. `VpcFlowLogsConfig` resource name using the form: - * `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async - */ - deleteVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVpcFlowLogsConfig( - request: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteVpcFlowLogsConfig( - request?: protos.google.cloud.networkmanagement.v1beta1.IDeleteVpcFlowLogsConfigRequest, - 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.deleteVpcFlowLogsConfig(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteVpcFlowLogsConfig()`. - * @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/v1beta1/vpc_flow_logs_service.delete_vpc_flow_logs_config.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_DeleteVpcFlowLogsConfig_async - */ - async checkDeleteVpcFlowLogsConfigProgress(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.deleteVpcFlowLogsConfig, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * Lists all `VpcFlowLogsConfigs` in a given project. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - * @param {number} [request.pageSize] - * Optional. Number of `VpcFlowLogsConfigs` to return. - * @param {string} [request.pageToken] - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - * @param {string} [request.filter] - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported [CEL logic operators] - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. - * 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 `listVpcFlowLogsConfigsAsync()` - * 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. - */ - listVpcFlowLogsConfigs( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse - ]>; - listVpcFlowLogsConfigs( - request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; - listVpcFlowLogsConfigs( - request: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - callback: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): void; - listVpcFlowLogsConfigs( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>, - callback?: PaginationCallback< - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse|null|undefined, - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig>): - Promise<[ - protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[], - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest|null, - protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsResponse - ]>|void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } - else { - options = optionsOrCallback as 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.listVpcFlowLogsConfigs(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - * @param {number} [request.pageSize] - * Optional. Number of `VpcFlowLogsConfigs` to return. - * @param {string} [request.pageToken] - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - * @param {string} [request.filter] - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported [CEL logic operators] - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig} 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 `listVpcFlowLogsConfigsAsync()` - * 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. - */ - listVpcFlowLogsConfigsStream( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - 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['listVpcFlowLogsConfigs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listVpcFlowLogsConfigs.createStream( - this.innerApiCalls.listVpcFlowLogsConfigs as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listVpcFlowLogsConfigs`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource of the VpcFlowLogsConfig: - * `projects/{project_id}/locations/global` - * @param {number} [request.pageSize] - * Optional. Number of `VpcFlowLogsConfigs` to return. - * @param {string} [request.pageToken] - * Optional. Page token from an earlier query, as returned in - * `next_page_token`. - * @param {string} [request.filter] - * Optional. Lists the `VpcFlowLogsConfigs` that match the filter expression. - * A filter expression must use the supported [CEL logic operators] - * (https://cloud.google.com/vpc/docs/about-flow-logs-records#supported_cel_logic_operators). - * @param {string} [request.orderBy] - * Optional. Field to use to sort the list. - * @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.networkmanagement.v1beta1.VpcFlowLogsConfig|VpcFlowLogsConfig}. 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/v1beta1/vpc_flow_logs_service.list_vpc_flow_logs_configs.js - * region_tag:networkmanagement_v1beta1_generated_VpcFlowLogsService_ListVpcFlowLogsConfigs_async - */ - listVpcFlowLogsConfigsAsync( - request?: protos.google.cloud.networkmanagement.v1beta1.IListVpcFlowLogsConfigsRequest, - 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['listVpcFlowLogsConfigs']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listVpcFlowLogsConfigs.asyncIterate( - this.innerApiCalls['listVpcFlowLogsConfigs'] 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 connectivityTest resource name string. - * - * @param {string} project - * @param {string} test - * @returns {string} Resource name string. - */ - connectivityTestPath(project:string,test:string) { - return this.pathTemplates.connectivityTestPathTemplate.render({ - project: project, - test: test, - }); - } - - /** - * Parse the project from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the project. - */ - matchProjectFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).project; - } - - /** - * Parse the test from ConnectivityTest resource. - * - * @param {string} connectivityTestName - * A fully-qualified path representing ConnectivityTest resource. - * @returns {string} A string representing the test. - */ - matchTestFromConnectivityTestName(connectivityTestName: string) { - return this.pathTemplates.connectivityTestPathTemplate.match(connectivityTestName).test; - } - - /** - * 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 project resource name string. - * - * @param {string} project - * @returns {string} Resource name string. - */ - projectPath(project:string) { - return this.pathTemplates.projectPathTemplate.render({ - project: project, - }); - } - - /** - * Parse the project from Project resource. - * - * @param {string} projectName - * A fully-qualified path representing Project resource. - * @returns {string} A string representing the project. - */ - matchProjectFromProjectName(projectName: string) { - return this.pathTemplates.projectPathTemplate.match(projectName).project; - } - - /** - * Return a fully-qualified vpcFlowLogsConfig resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} vpc_flow_logs_config - * @returns {string} Resource name string. - */ - vpcFlowLogsConfigPath(project:string,location:string,vpcFlowLogsConfig:string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.render({ - project: project, - location: location, - vpc_flow_logs_config: vpcFlowLogsConfig, - }); - } - - /** - * Parse the project from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the project. - */ - matchProjectFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).project; - } - - /** - * Parse the location from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the location. - */ - matchLocationFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).location; - } - - /** - * Parse the vpc_flow_logs_config from VpcFlowLogsConfig resource. - * - * @param {string} vpcFlowLogsConfigName - * A fully-qualified path representing VpcFlowLogsConfig resource. - * @returns {string} A string representing the vpc_flow_logs_config. - */ - matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(vpcFlowLogsConfigName: string) { - return this.pathTemplates.vpcFlowLogsConfigPathTemplate.match(vpcFlowLogsConfigName).vpc_flow_logs_config; - } - - /** - * 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.vpcFlowLogsServiceStub && !this._terminated) { - return this.vpcFlowLogsServiceStub.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-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json deleted file mode 100644 index fd883cb5ab0..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_client_config.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "interfaces": { - "google.cloud.networkmanagement.v1beta1.VpcFlowLogsService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ListVpcFlowLogsConfigs": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteVpcFlowLogsConfig": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json deleted file mode 100644 index 54de9f63455..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/src/v1beta1/vpc_flow_logs_service_proto_list.json +++ /dev/null @@ -1,7 +0,0 @@ -[ - "../../protos/google/cloud/networkmanagement/v1beta1/connectivity_test.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/reachability.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/trace.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs.proto", - "../../protos/google/cloud/networkmanagement/v1beta1/vpc_flow_logs_config.proto" -] diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index c429b7bd73d..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,28 +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 networkmanagement = require('@google-cloud/network-management'); - -function main() { - const reachabilityServiceClient = new networkmanagement.ReachabilityServiceClient(); - const vpcFlowLogsServiceClient = new networkmanagement.VpcFlowLogsServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 6ec4f20b4c2..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,38 +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 {ReachabilityServiceClient, VpcFlowLogsServiceClient} from '@google-cloud/network-management'; - -// check that the client class type name can be used -function doStuffWithReachabilityServiceClient(client: ReachabilityServiceClient) { - client.close(); -} -function doStuffWithVpcFlowLogsServiceClient(client: VpcFlowLogsServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const reachabilityServiceClient = new ReachabilityServiceClient(); - doStuffWithReachabilityServiceClient(reachabilityServiceClient); - // check that the client instance can be created - const vpcFlowLogsServiceClient = new VpcFlowLogsServiceClient(); - doStuffWithVpcFlowLogsServiceClient(vpcFlowLogsServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts deleted file mode 100644 index 279ec3242ac..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_reachability_service_v1beta1.ts +++ /dev/null @@ -1,2064 +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 reachabilityserviceModule 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('v1beta1.ReachabilityServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - 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 = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.servicePath; - assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = reachabilityserviceModule.v1beta1.ReachabilityServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - await client.initialize(); - assert(client.reachabilityServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.reachabilityServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.reachabilityServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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('getConnectivityTest', () => { - it('invokes getConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(expectedResponse); - const [response] = await client.getConnectivityTest(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest() - ); - client.innerApiCalls.getConnectivityTest = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getConnectivityTest( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getConnectivityTest = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getConnectivityTest with closed client', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getConnectivityTest(request), expectedError); - }); - }); - - describe('createConnectivityTest', () => { - it('invokes createConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.createConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createConnectivityTest( - 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.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateConnectivityTestRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkCreateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateConnectivityTest', () => { - it('invokes updateConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateConnectivityTest( - 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.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest() - ); - request.resource ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateConnectivityTestRequest', ['resource', 'name']); - request.resource.name = defaultValue1; - const expectedHeaderRequestParams = `resource.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkUpdateConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('rerunConnectivityTest', () => { - it('invokes rerunConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.rerunConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.rerunConnectivityTest( - 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.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.rerunConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes rerunConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.RerunConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.rerunConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.rerunConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.rerunConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRerunConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRerunConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkRerunConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteConnectivityTest', () => { - it('invokes deleteConnectivityTest without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteConnectivityTest(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteConnectivityTest( - 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.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with call error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteConnectivityTest(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteConnectivityTest with LRO error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteConnectivityTestRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteConnectivityTest = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteConnectivityTest(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteConnectivityTest as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteConnectivityTestProgress without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteConnectivityTestProgress with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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.checkDeleteConnectivityTestProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listConnectivityTests', () => { - it('invokes listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCall(expectedResponse); - const [response] = await client.listConnectivityTests(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests without error using callback', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.innerApiCalls.listConnectivityTests = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listConnectivityTests( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listConnectivityTests = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listConnectivityTests(request), expectedError); - const actualRequest = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listConnectivityTests as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listConnectivityTestsStream without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { - 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.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listConnectivityTestsStream with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listConnectivityTestsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listConnectivityTests, request)); - assert( - (client.descriptors.page.listConnectivityTests.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests without error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.ConnectivityTest()), - ]; - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; - const iterable = client.listConnectivityTestsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listConnectivityTests with error', async () => { - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListConnectivityTestsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listConnectivityTests.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listConnectivityTestsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.networkmanagement.v1beta1.IConnectivityTest[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listConnectivityTests.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listConnectivityTests.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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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 reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - 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('connectivityTest', () => { - const fakePath = "/rendered/path/connectivityTest"; - const expectedParameters = { - project: "projectValue", - test: "testValue", - }; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectivityTestPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectivityTestPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectivityTestPath', () => { - const result = client.connectivityTestPath("projectValue", "testValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectivityTestName', () => { - const result = client.matchProjectFromConnectivityTestName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTestFromConnectivityTestName', () => { - const result = client.matchTestFromConnectivityTestName(fakePath); - assert.strictEqual(result, "testValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('vpcFlowLogsConfig', () => { - const fakePath = "/rendered/path/vpcFlowLogsConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - vpc_flow_logs_config: "vpcFlowLogsConfigValue", - }; - const client = new reachabilityserviceModule.v1beta1.ReachabilityServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('vpcFlowLogsConfigPath', () => { - const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromVpcFlowLogsConfigName', () => { - const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromVpcFlowLogsConfigName', () => { - const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { - const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "vpcFlowLogsConfigValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts deleted file mode 100644 index e972bc7a15c..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/test/gapic_vpc_flow_logs_service_v1beta1.ts +++ /dev/null @@ -1,1948 +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 vpcflowlogsserviceModule 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('v1beta1.VpcFlowLogsServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - 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 = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.servicePath; - assert.strictEqual(servicePath, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'networkmanagement.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'networkmanagement.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); - await client.initialize(); - assert(client.vpcFlowLogsServiceStub); - }); - - it('has close method for the initialized client', done => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.vpcFlowLogsServiceStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.vpcFlowLogsServiceStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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('getVpcFlowLogsConfig', () => { - it('invokes getVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() - ); - client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(expectedResponse); - const [response] = await client.getVpcFlowLogsConfig(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig() - ); - client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getVpcFlowLogsConfig( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVpcFlowLogsConfig with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getVpcFlowLogsConfig = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getVpcFlowLogsConfig with closed client', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.GetVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getVpcFlowLogsConfig(request), expectedError); - }); - }); - - describe('createVpcFlowLogsConfig', () => { - it('invokes createVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.createVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createVpcFlowLogsConfig( - 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.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVpcFlowLogsConfig with call error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createVpcFlowLogsConfig with LRO error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.CreateVpcFlowLogsConfigRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createVpcFlowLogsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateVpcFlowLogsConfigProgress without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkCreateVpcFlowLogsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateVpcFlowLogsConfigProgress with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkCreateVpcFlowLogsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateVpcFlowLogsConfig', () => { - it('invokes updateVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateVpcFlowLogsConfig( - 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.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVpcFlowLogsConfig with call error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateVpcFlowLogsConfig with LRO error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest() - ); - request.vpcFlowLogsConfig ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.UpdateVpcFlowLogsConfigRequest', ['vpcFlowLogsConfig', 'name']); - request.vpcFlowLogsConfig.name = defaultValue1; - const expectedHeaderRequestParams = `vpc_flow_logs_config.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateVpcFlowLogsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateVpcFlowLogsConfigProgress without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkUpdateVpcFlowLogsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateVpcFlowLogsConfigProgress with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkUpdateVpcFlowLogsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteVpcFlowLogsConfig', () => { - it('invokes deleteVpcFlowLogsConfig without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteVpcFlowLogsConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVpcFlowLogsConfig without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteVpcFlowLogsConfig( - 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.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVpcFlowLogsConfig with call error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteVpcFlowLogsConfig(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteVpcFlowLogsConfig with LRO error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.DeleteVpcFlowLogsConfigRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteVpcFlowLogsConfig = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteVpcFlowLogsConfig(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteVpcFlowLogsConfig as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteVpcFlowLogsConfigProgress without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkDeleteVpcFlowLogsConfigProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteVpcFlowLogsConfigProgress with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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.checkDeleteVpcFlowLogsConfigProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listVpcFlowLogsConfigs', () => { - it('invokes listVpcFlowLogsConfigs without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(expectedResponse); - const [response] = await client.listVpcFlowLogsConfigs(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVpcFlowLogsConfigs without error using callback', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listVpcFlowLogsConfigs( - request, - (err?: Error|null, result?: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVpcFlowLogsConfigs with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listVpcFlowLogsConfigs = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listVpcFlowLogsConfigs(request), expectedError); - const actualRequest = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listVpcFlowLogsConfigs as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listVpcFlowLogsConfigsStream without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listVpcFlowLogsConfigsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { - 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.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listVpcFlowLogsConfigsStream with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listVpcFlowLogsConfigs.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listVpcFlowLogsConfigsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig[] = []; - stream.on('data', (response: protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listVpcFlowLogsConfigs, request)); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVpcFlowLogsConfigs without error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - generateSampleMessage(new protos.google.cloud.networkmanagement.v1beta1.VpcFlowLogsConfig()), - ]; - client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; - const iterable = client.listVpcFlowLogsConfigsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listVpcFlowLogsConfigs with error', async () => { - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.networkmanagement.v1beta1.ListVpcFlowLogsConfigsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listVpcFlowLogsConfigsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.networkmanagement.v1beta1.IVpcFlowLogsConfig[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listVpcFlowLogsConfigs.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listVpcFlowLogsConfigs.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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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 vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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('connectivityTest', () => { - const fakePath = "/rendered/path/connectivityTest"; - const expectedParameters = { - project: "projectValue", - test: "testValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.connectivityTestPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.connectivityTestPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('connectivityTestPath', () => { - const result = client.connectivityTestPath("projectValue", "testValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.connectivityTestPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromConnectivityTestName', () => { - const result = client.matchProjectFromConnectivityTestName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchTestFromConnectivityTestName', () => { - const result = client.matchTestFromConnectivityTestName(fakePath); - assert.strictEqual(result, "testValue"); - assert((client.pathTemplates.connectivityTestPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('location', () => { - const fakePath = "/rendered/path/location"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - 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('project', () => { - const fakePath = "/rendered/path/project"; - const expectedParameters = { - project: "projectValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.projectPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.projectPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('projectPath', () => { - const result = client.projectPath("projectValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.projectPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromProjectName', () => { - const result = client.matchProjectFromProjectName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.projectPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('vpcFlowLogsConfig', () => { - const fakePath = "/rendered/path/vpcFlowLogsConfig"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - vpc_flow_logs_config: "vpcFlowLogsConfigValue", - }; - const client = new vpcflowlogsserviceModule.v1beta1.VpcFlowLogsServiceClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.vpcFlowLogsConfigPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('vpcFlowLogsConfigPath', () => { - const result = client.vpcFlowLogsConfigPath("projectValue", "locationValue", "vpcFlowLogsConfigValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromVpcFlowLogsConfigName', () => { - const result = client.matchProjectFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromVpcFlowLogsConfigName', () => { - const result = client.matchLocationFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchVpcFlowLogsConfigFromVpcFlowLogsConfigName', () => { - const result = client.matchVpcFlowLogsConfigFromVpcFlowLogsConfigName(fakePath); - assert.strictEqual(result, "vpcFlowLogsConfigValue"); - assert((client.pathTemplates.vpcFlowLogsConfigPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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-networkmanagement/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-networkmanagement/v1beta1/webpack.config.js deleted file mode 100644 index d975be0ab73..00000000000 --- a/owl-bot-staging/google-cloud-networkmanagement/v1beta1/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: 'ReachabilityService', - filename: './reachability-service.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto index 0759773e2ab..e52ec167970 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/connectivity_test.proto @@ -220,10 +220,16 @@ message Endpoint { optional LoadBalancerType load_balancer_type = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; - // A cluster URI for [Google Kubernetes Engine - // master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // A cluster URI for [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). string gke_master_cluster = 7; + // DNS endpoint of [Google Kubernetes Engine cluster control + // plane](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture). + // Requires gke_master_cluster to be set, can't be used simultaneoulsly with + // ip_address or network. Applicable only to destination endpoint. + string fqdn = 19; + // A [Cloud SQL](https://cloud.google.com/sql) instance URI. string cloud_sql_instance = 8; diff --git a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/trace.proto b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/trace.proto index 0a39fc3ffa5..64494adefe2 100644 --- a/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/trace.proto +++ b/packages/google-cloud-networkmanagement/protos/google/cloud/networkmanagement/v1/trace.proto @@ -1482,6 +1482,10 @@ message DropInfo { // Packet from the unknown peered network is dropped due to no known route // from the source network to the destination IP address. NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82; + + // Sending packets processed by the Private NAT Gateways to the Private + // Service Connect endpoints is not supported. + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83; } // Cause that the packet is dropped. @@ -1509,11 +1513,14 @@ message GKEMasterInfo { // URI of a GKE cluster network. string cluster_network_uri = 4; - // Internal IP address of a GKE cluster master. + // Internal IP address of a GKE cluster control plane. string internal_ip = 5; - // External IP address of a GKE cluster master. + // External IP address of a GKE cluster control plane. string external_ip = 6; + + // DNS endpoint of a GKE cluster control plane. + string dns_endpoint = 7; } // For display only. Metadata associated with a Cloud SQL instance. diff --git a/packages/google-cloud-networkmanagement/protos/protos.d.ts b/packages/google-cloud-networkmanagement/protos/protos.d.ts index 52dd5131da9..9de4cf8c2b2 100644 --- a/packages/google-cloud-networkmanagement/protos/protos.d.ts +++ b/packages/google-cloud-networkmanagement/protos/protos.d.ts @@ -222,6 +222,9 @@ export namespace google { /** Endpoint gkeMasterCluster */ gkeMasterCluster?: (string|null); + /** Endpoint fqdn */ + fqdn?: (string|null); + /** Endpoint cloudSqlInstance */ cloudSqlInstance?: (string|null); @@ -283,6 +286,9 @@ export namespace google { /** Endpoint gkeMasterCluster. */ public gkeMasterCluster: string; + /** Endpoint fqdn. */ + public fqdn: string; + /** Endpoint cloudSqlInstance. */ public cloudSqlInstance: string; @@ -4027,7 +4033,8 @@ export namespace google { REDIS_CLUSTER_UNSUPPORTED_PROTOCOL = 79, NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION = 80, NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION = 81, - NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82 + NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION = 82, + PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED = 83 } } @@ -4045,6 +4052,9 @@ export namespace google { /** GKEMasterInfo externalIp */ externalIp?: (string|null); + + /** GKEMasterInfo dnsEndpoint */ + dnsEndpoint?: (string|null); } /** Represents a GKEMasterInfo. */ @@ -4068,6 +4078,9 @@ export namespace google { /** GKEMasterInfo externalIp. */ public externalIp: string; + /** GKEMasterInfo dnsEndpoint. */ + public dnsEndpoint: string; + /** * Creates a new GKEMasterInfo instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-networkmanagement/protos/protos.js b/packages/google-cloud-networkmanagement/protos/protos.js index b1dcdb37210..2abb12b30b5 100644 --- a/packages/google-cloud-networkmanagement/protos/protos.js +++ b/packages/google-cloud-networkmanagement/protos/protos.js @@ -643,6 +643,7 @@ * @property {string|null} [loadBalancerId] Endpoint loadBalancerId * @property {google.cloud.networkmanagement.v1.LoadBalancerType|null} [loadBalancerType] Endpoint loadBalancerType * @property {string|null} [gkeMasterCluster] Endpoint gkeMasterCluster + * @property {string|null} [fqdn] Endpoint fqdn * @property {string|null} [cloudSqlInstance] Endpoint cloudSqlInstance * @property {string|null} [redisInstance] Endpoint redisInstance * @property {string|null} [redisCluster] Endpoint redisCluster @@ -733,6 +734,14 @@ */ Endpoint.prototype.gkeMasterCluster = ""; + /** + * Endpoint fqdn. + * @member {string} fqdn + * @memberof google.cloud.networkmanagement.v1.Endpoint + * @instance + */ + Endpoint.prototype.fqdn = ""; + /** * Endpoint cloudSqlInstance. * @member {string} cloudSqlInstance @@ -899,6 +908,8 @@ writer.uint32(/* id 17, wireType 2 =*/138).string(message.redisInstance); if (message.redisCluster != null && Object.hasOwnProperty.call(message, "redisCluster")) writer.uint32(/* id 18, wireType 2 =*/146).string(message.redisCluster); + if (message.fqdn != null && Object.hasOwnProperty.call(message, "fqdn")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.fqdn); return writer; }; @@ -965,6 +976,10 @@ message.gkeMasterCluster = reader.string(); break; } + case 19: { + message.fqdn = reader.string(); + break; + } case 8: { message.cloudSqlInstance = reader.string(); break; @@ -1089,6 +1104,9 @@ if (message.gkeMasterCluster != null && message.hasOwnProperty("gkeMasterCluster")) if (!$util.isString(message.gkeMasterCluster)) return "gkeMasterCluster: string expected"; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + if (!$util.isString(message.fqdn)) + return "fqdn: string expected"; if (message.cloudSqlInstance != null && message.hasOwnProperty("cloudSqlInstance")) if (!$util.isString(message.cloudSqlInstance)) return "cloudSqlInstance: string expected"; @@ -1235,6 +1253,8 @@ } if (object.gkeMasterCluster != null) message.gkeMasterCluster = String(object.gkeMasterCluster); + if (object.fqdn != null) + message.fqdn = String(object.fqdn); if (object.cloudSqlInstance != null) message.cloudSqlInstance = String(object.cloudSqlInstance); if (object.redisInstance != null) @@ -1311,6 +1331,7 @@ object.forwardingRule = ""; object.redisInstance = ""; object.redisCluster = ""; + object.fqdn = ""; } if (message.ipAddress != null && message.hasOwnProperty("ipAddress")) object.ipAddress = message.ipAddress; @@ -1355,6 +1376,8 @@ object.redisInstance = message.redisInstance; if (message.redisCluster != null && message.hasOwnProperty("redisCluster")) object.redisCluster = message.redisCluster; + if (message.fqdn != null && message.hasOwnProperty("fqdn")) + object.fqdn = message.fqdn; return object; }; @@ -11825,6 +11848,7 @@ case 80: case 81: case 82: + case 83: break; } if (message.resourceUri != null && message.hasOwnProperty("resourceUri")) @@ -12193,6 +12217,10 @@ case 82: message.cause = 82; break; + case "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": + case 83: + message.cause = 83; + break; } if (object.resourceUri != null) message.resourceUri = String(object.resourceUri); @@ -12351,6 +12379,7 @@ * @property {number} NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION=80 NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION value * @property {number} NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION=81 NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION value * @property {number} NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION=82 NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION value + * @property {number} PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED=83 PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED value */ DropInfo.Cause = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -12437,6 +12466,7 @@ values[valuesById[80] = "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION"] = 80; values[valuesById[81] = "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION"] = 81; values[valuesById[82] = "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION"] = 82; + values[valuesById[83] = "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED"] = 83; return values; })(); @@ -12453,6 +12483,7 @@ * @property {string|null} [clusterNetworkUri] GKEMasterInfo clusterNetworkUri * @property {string|null} [internalIp] GKEMasterInfo internalIp * @property {string|null} [externalIp] GKEMasterInfo externalIp + * @property {string|null} [dnsEndpoint] GKEMasterInfo dnsEndpoint */ /** @@ -12502,6 +12533,14 @@ */ GKEMasterInfo.prototype.externalIp = ""; + /** + * GKEMasterInfo dnsEndpoint. + * @member {string} dnsEndpoint + * @memberof google.cloud.networkmanagement.v1.GKEMasterInfo + * @instance + */ + GKEMasterInfo.prototype.dnsEndpoint = ""; + /** * Creates a new GKEMasterInfo instance using the specified properties. * @function create @@ -12534,6 +12573,8 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.internalIp); if (message.externalIp != null && Object.hasOwnProperty.call(message, "externalIp")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.externalIp); + if (message.dnsEndpoint != null && Object.hasOwnProperty.call(message, "dnsEndpoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dnsEndpoint); return writer; }; @@ -12584,6 +12625,10 @@ message.externalIp = reader.string(); break; } + case 7: { + message.dnsEndpoint = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12631,6 +12676,9 @@ if (message.externalIp != null && message.hasOwnProperty("externalIp")) if (!$util.isString(message.externalIp)) return "externalIp: string expected"; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + if (!$util.isString(message.dnsEndpoint)) + return "dnsEndpoint: string expected"; return null; }; @@ -12654,6 +12702,8 @@ message.internalIp = String(object.internalIp); if (object.externalIp != null) message.externalIp = String(object.externalIp); + if (object.dnsEndpoint != null) + message.dnsEndpoint = String(object.dnsEndpoint); return message; }; @@ -12675,6 +12725,7 @@ object.clusterNetworkUri = ""; object.internalIp = ""; object.externalIp = ""; + object.dnsEndpoint = ""; } if (message.clusterUri != null && message.hasOwnProperty("clusterUri")) object.clusterUri = message.clusterUri; @@ -12684,6 +12735,8 @@ object.internalIp = message.internalIp; if (message.externalIp != null && message.hasOwnProperty("externalIp")) object.externalIp = message.externalIp; + if (message.dnsEndpoint != null && message.hasOwnProperty("dnsEndpoint")) + object.dnsEndpoint = message.dnsEndpoint; return object; }; diff --git a/packages/google-cloud-networkmanagement/protos/protos.json b/packages/google-cloud-networkmanagement/protos/protos.json index 2832516a39f..233f9b17c79 100644 --- a/packages/google-cloud-networkmanagement/protos/protos.json +++ b/packages/google-cloud-networkmanagement/protos/protos.json @@ -169,6 +169,10 @@ "type": "string", "id": 7 }, + "fqdn": { + "type": "string", + "id": 19 + }, "cloudSqlInstance": { "type": "string", "id": 8 @@ -1451,7 +1455,8 @@ "REDIS_CLUSTER_UNSUPPORTED_PROTOCOL": 79, "NO_ADVERTISED_ROUTE_TO_GCP_DESTINATION": 80, "NO_TRAFFIC_SELECTOR_TO_GCP_DESTINATION": 81, - "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82 + "NO_KNOWN_ROUTE_FROM_PEERED_NETWORK_TO_DESTINATION": 82, + "PRIVATE_NAT_TO_PSC_ENDPOINT_UNSUPPORTED": 83 } } } @@ -1473,6 +1478,10 @@ "externalIp": { "type": "string", "id": 6 + }, + "dnsEndpoint": { + "type": "string", + "id": 7 } } },